3 %bcond_without doc # don't build doc
4 %bcond_without tests # py.test tests
5 %bcond_without python2 # CPython 2.x module
6 %bcond_without python3 # CPython 3.x module
7 %bcond_without setuptools # build without setuptools (for bootstraping)
9 Summary: Core utilities for Python packages
10 Summary(pl.UTF-8): Bazowe funkcje narzędziowe do pakietów Pythona
11 Name: python-packaging
14 License: Apache v2.0 or BSD
15 Group: Libraries/Python
16 #Source0Download: https://pypi.org/simple/packaging/
17 Source0: https://files.pythonhosted.org/packages/source/p/packaging/packaging-%{version}.tar.gz
18 # Source0-md5: 8baf8241d1b6b0a5fae9b00f359976a8
19 URL: https://github.com/pypa/packaging
21 BuildRequires: python-modules >= 1:2.6
22 %{?with_setuptools:BuildRequires: python-setuptools}
24 BuildRequires: python-pretend
25 BuildRequires: python-pyparsing
26 BuildRequires: python-pytest
27 BuildRequires: python-six
31 BuildRequires: python3-modules >= 1:3.2
32 %{?with_setuptools:BuildRequires: python3-setuptools}
34 BuildRequires: python3-pretend
35 BuildRequires: python3-pyparsing
36 BuildRequires: python3-pytest
37 BuildRequires: python3-six
40 BuildRequires: rpm-pythonprov
41 BuildRequires: rpmbuild(macros) >= 1.714
43 BuildRequires: python3-sphinx_rtd_theme
44 BuildRequires: sphinx-pdg-3
46 Requires: python-modules >= 1:2.6
48 Requires: python-pyparsing >= 2.0.2
50 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
53 Core utilities for Python packages.
55 %description -l pl.UTF-8
56 Bazowe funkcje narzędziowe do pakietów Pythona.
58 %package -n python3-packaging
59 Summary: Core utilities for Python packages
60 Summary(pl.UTF-8): Bazowe funkcje narzędziowe do pakietów Pythona
61 Group: Libraries/Python
62 Requires: python3-modules >= 1:3.2
63 Requires: python-pyparsing >= 2.0.2
66 %description -n python3-packaging
67 Core utilities for Python packages.
69 %description -n python3-packaging -l pl.UTF-8
70 Bazowe funkcje narzędziowe do pakietów Pythona.
73 Summary: API documentation for Python packaging library
74 Summary(pl.UTF-8): Dokumentacja API biblioteki Pythona packaging
78 API documentation for Python packaging library.
80 %description apidocs -l pl.UTF-8
81 Dokumentacja API biblioteki Pythona packaging.
84 %setup -q -n packaging-%{version}
90 %{?with_tests:%{__python} -m pytest}
96 %{?with_tests:%{__python3} -m pytest}
100 %{__make} -C docs html \
101 SPHINXBUILD=sphinx-build-3
105 rm -rf $RPM_BUILD_ROOT
118 rm -rf $RPM_BUILD_ROOT
122 %defattr(644,root,root,755)
123 %doc CHANGELOG.rst LICENSE LICENSE.BSD README.rst
124 %{py_sitescriptdir}/packaging
125 %{py_sitescriptdir}/packaging-%{version}-py*.egg-info
129 %files -n python3-packaging
130 %defattr(644,root,root,755)
131 %doc CHANGELOG.rst LICENSE LICENSE.BSD README.rst
132 %{py3_sitescriptdir}/packaging
133 %{py3_sitescriptdir}/packaging-%{version}-py*.egg-info
138 %defattr(644,root,root,755)
139 %doc docs/_build/html/{_static,development,*.html,*.js}