3 %bcond_without tests # py.test based unit tests
4 %bcond_without python2 # CPython 2.x module
5 %bcond_without python3 # CPython 3.x module
7 Summary: Namespace control and lazy-import mechanism
8 Summary(pl.UTF-8): Kontrola przestrzeni nazw i mechanizm leniwego importu
13 Group: Libraries/Python
14 #Source0Download: https://pypi.org/simple/apipkg/
15 Source0: https://files.pythonhosted.org/packages/source/a/apipkg/apipkg-%{version}.tar.gz
16 # Source0-md5: 6d2bc4d9358e046cc56efc677c976a5c
17 URL: http://bitbucket.org/hpk42/apipkg
19 BuildRequires: python-modules >= 1:2.7
20 %{?with_tests:BuildRequires: python-pytest}
21 BuildRequires: python-setuptools >= 1:30.3.0
22 BuildRequires: python-setuptools_scm
25 BuildRequires: python3-modules >= 1:3.4
26 %{?with_tests:BuildRequires: python3-pytest}
27 BuildRequires: python3-setuptools >= 1:30.3.0
28 BuildRequires: python3-setuptools_scm
30 BuildRequires: rpm-pythonprov
31 BuildRequires: rpmbuild(macros) >= 1.714
32 Requires: python-modules >= 1:2.7
34 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
37 With apipkg you can control the exported namespace of a Python package
38 and greatly reduce the number of imports for your users.
40 %description -l pl.UTF-8
41 Przy użyciu apipkg można kontrolować eksportowaną przestrzeń nazw
42 pakietu pythonowego i znacząco zredukować liczbę modułów importowaną
45 %package -n python3-apipkg
46 Summary: Namespace control and lazy-import mechanism
47 Summary(pl.UTF-8): Kontrola przestrzeni nazw i mechanizm leniwego importu
48 Group: Libraries/Python
49 Requires: python3-modules >= 1:3.4
51 %description -n python3-apipkg
52 With apipkg you can control the exported namespace of a Python package
53 and greatly reduce the number of imports for your users.
55 %description -n python3-apipkg -l pl.UTF-8
56 Przy użyciu apipkg można kontrolować eksportowaną przestrzeń nazw
57 pakietu pythonowego i znacząco zredukować liczbę modułów importowaną
61 %setup -q -n apipkg-%{version}
68 PYTHONPATH=$(pwd)/src \
77 PYTHONPATH=$(pwd)/src \
78 %{__python3} -m pytest
83 rm -rf $RPM_BUILD_ROOT
96 rm -rf $RPM_BUILD_ROOT
100 %defattr(644,root,root,755)
101 %doc CHANGELOG LICENSE README.rst
102 %{py_sitescriptdir}/apipkg
103 %{py_sitescriptdir}/apipkg-%{version}-py*.egg-info
107 %files -n python3-apipkg
108 %defattr(644,root,root,755)
109 %doc CHANGELOG LICENSE README.rst
110 %{py3_sitescriptdir}/apipkg
111 %{py3_sitescriptdir}/apipkg-%{version}-py*.egg-info