]> git.pld-linux.org Git - packages/python-apipkg.git/blame - python-apipkg.spec
- updated to 2.1.0
[packages/python-apipkg.git] / python-apipkg.spec
CommitLineData
d2f3a18e
JB
1#
2# Conditional build:
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
6
7Summary: Namespace control and lazy-import mechanism
8Summary(pl.UTF-8): Kontrola przestrzeni nazw i mechanizm leniwego importu
9Name: python-apipkg
c29f8715
JB
10Version: 2.1.0
11Release: 1
d2f3a18e
JB
12License: MIT
13Group: Libraries/Python
094a7f6a
JB
14#Source0Download: https://pypi.org/simple/apipkg/
15Source0: https://files.pythonhosted.org/packages/source/a/apipkg/apipkg-%{version}.tar.gz
c29f8715 16# Source0-md5: 831741a57e9fcb2b85c191a046916c8d
d2f3a18e
JB
17URL: http://bitbucket.org/hpk42/apipkg
18%if %{with python2}
094a7f6a 19BuildRequires: python-modules >= 1:2.7
d2f3a18e 20%{?with_tests:BuildRequires: python-pytest}
3800a87f 21BuildRequires: python-setuptools >= 1:30.3.0
094a7f6a 22BuildRequires: python-setuptools_scm
d2f3a18e
JB
23%endif
24%if %{with python3}
094a7f6a 25BuildRequires: python3-modules >= 1:3.4
d2f3a18e 26%{?with_tests:BuildRequires: python3-pytest}
3800a87f 27BuildRequires: python3-setuptools >= 1:30.3.0
094a7f6a 28BuildRequires: python3-setuptools_scm
d2f3a18e
JB
29%endif
30BuildRequires: rpm-pythonprov
31BuildRequires: rpmbuild(macros) >= 1.714
094a7f6a 32Requires: python-modules >= 1:2.7
d2f3a18e
JB
33BuildArch: noarch
34BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
35
36%description
37With apipkg you can control the exported namespace of a Python package
38and greatly reduce the number of imports for your users.
39
40%description -l pl.UTF-8
41Przy użyciu apipkg można kontrolować eksportowaną przestrzeń nazw
42pakietu pythonowego i znacząco zredukować liczbę modułów importowaną
43przez użytkowników.
44
45%package -n python3-apipkg
46Summary: Namespace control and lazy-import mechanism
47Summary(pl.UTF-8): Kontrola przestrzeni nazw i mechanizm leniwego importu
48Group: Libraries/Python
094a7f6a 49Requires: python3-modules >= 1:3.4
d2f3a18e
JB
50
51%description -n python3-apipkg
52With apipkg you can control the exported namespace of a Python package
53and greatly reduce the number of imports for your users.
54
55%description -n python3-apipkg -l pl.UTF-8
56Przy użyciu apipkg można kontrolować eksportowaną przestrzeń nazw
57pakietu pythonowego i znacząco zredukować liczbę modułów importowaną
58przez użytkowników.
59
60%prep
61%setup -q -n apipkg-%{version}
62
63%build
64%if %{with python2}
65%py_build
66
094a7f6a 67%if %{with tests}
c29f8715 68PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
094a7f6a
JB
69PYTHONPATH=$(pwd)/src \
70%{__python} -m pytest
71%endif
d2f3a18e
JB
72%endif
73
74%if %{with python3}
75%py3_build
76
094a7f6a 77%if %{with tests}
c29f8715 78PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
094a7f6a
JB
79PYTHONPATH=$(pwd)/src \
80%{__python3} -m pytest
81%endif
d2f3a18e
JB
82%endif
83
84%install
85rm -rf $RPM_BUILD_ROOT
86
87%if %{with python2}
88%py_install
89
90%py_postclean
c29f8715
JB
91
92install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
93cp -pr example/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
d2f3a18e
JB
94%endif
95
96%if %{with python3}
97%py3_install
c29f8715
JB
98
99install -d $RPM_BUILD_ROOT%{_examplesdir}/python3-apipkg-%{version}
100cp -pr example/* $RPM_BUILD_ROOT%{_examplesdir}/python3-apipkg-%{version}
d2f3a18e
JB
101%endif
102
103%clean
104rm -rf $RPM_BUILD_ROOT
105
106%if %{with python2}
107%files
108%defattr(644,root,root,755)
094a7f6a
JB
109%doc CHANGELOG LICENSE README.rst
110%{py_sitescriptdir}/apipkg
d2f3a18e 111%{py_sitescriptdir}/apipkg-%{version}-py*.egg-info
c29f8715 112%{_examplesdir}/%{name}-%{version}
d2f3a18e 113%endif
d2f3a18e
JB
114
115%if %{with python3}
116%files -n python3-apipkg
117%defattr(644,root,root,755)
094a7f6a
JB
118%doc CHANGELOG LICENSE README.rst
119%{py3_sitescriptdir}/apipkg
d2f3a18e 120%{py3_sitescriptdir}/apipkg-%{version}-py*.egg-info
c29f8715 121%{_examplesdir}/python3-apipkg-%{version}
d2f3a18e 122%endif
This page took 0.179172 seconds and 4 git commands to generate.