]> git.pld-linux.org Git - packages/python-packaging.git/blame - python-packaging.spec
do not always require setuptools
[packages/python-packaging.git] / python-packaging.spec
CommitLineData
02ced7fb
JB
1#
2# Conditional build:
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
8Summary: Core utilities for Python packages
9Summary(pl.UTF-8): Bazowe funkcje narzędziowe do pakietów Pythona
10Name: python-packaging
370b6b2a
JB
11Version: 17.1
12Release: 1
02ced7fb
JB
13License: Apache v2.0 or BSD
14Group: Libraries/Python
370b6b2a 15#Source0Download: https://pypi.org/simple/packaging/
02ced7fb 16Source0: https://files.pythonhosted.org/packages/source/p/packaging/packaging-%{version}.tar.gz
370b6b2a 17# Source0-md5: 8baf8241d1b6b0a5fae9b00f359976a8
02ced7fb
JB
18URL: https://github.com/pypa/packaging
19%if %{with python2}
20BuildRequires: python-modules >= 1:2.6
02ced7fb
JB
21%if %{with tests}
22BuildRequires: python-pretend
23BuildRequires: python-pyparsing
24BuildRequires: python-pytest
a1750b2f 25BuildRequires: python-setuptools
02ced7fb
JB
26BuildRequires: python-six
27%endif
28%endif
29%if %{with python3}
30BuildRequires: python3-modules >= 1:3.2
02ced7fb
JB
31%if %{with tests}
32BuildRequires: python3-pretend
33BuildRequires: python3-pyparsing
34BuildRequires: python3-pytest
a1750b2f 35BuildRequires: python3-setuptools
02ced7fb
JB
36BuildRequires: python3-six
37%endif
38%endif
39BuildRequires: rpm-pythonprov
40BuildRequires: rpmbuild(macros) >= 1.714
41%if %{with doc}
42BuildRequires: python3-sphinx_rtd_theme
370b6b2a 43BuildRequires: sphinx-pdg-3
02ced7fb
JB
44%endif
45Requires: python-modules >= 1:2.6
46BuildArch: noarch
47BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
48
49%description
50Core utilities for Python packages.
51
52%description -l pl.UTF-8
53Bazowe funkcje narzędziowe do pakietów Pythona.
54
55%package -n python3-packaging
56Summary: Core utilities for Python packages
57Summary(pl.UTF-8): Bazowe funkcje narzędziowe do pakietów Pythona
58Group: Libraries/Python
59Requires: python3-modules >= 1:3.2
60
61%description -n python3-packaging
62Core utilities for Python packages.
63
64%description -n python3-packaging -l pl.UTF-8
65Bazowe funkcje narzędziowe do pakietów Pythona.
66
67%package apidocs
68Summary: API documentation for Python packaging library
69Summary(pl.UTF-8): Dokumentacja API biblioteki Pythona packaging
70Group: Documentation
71
72%description apidocs
73API documentation for Python packaging library.
74
75%description apidocs -l pl.UTF-8
76Dokumentacja API biblioteki Pythona packaging.
77
78%prep
79%setup -q -n packaging-%{version}
80
81%build
82%if %{with python2}
83%py_build
84
85%{?with_tests:%{__python} -m pytest}
86%endif
87
88%if %{with python3}
89%py3_build
90
91%{?with_tests:%{__python3} -m pytest}
92%endif
93
94%if %{with doc}
370b6b2a
JB
95%{__make} -C docs html \
96 SPHINXBUILD=sphinx-build-3
02ced7fb
JB
97%endif
98
99%install
100rm -rf $RPM_BUILD_ROOT
101
102%if %{with python2}
103%py_install
104
105%py_postclean
106%endif
107
108%if %{with python3}
109%py3_install
110%endif
111
112%clean
113rm -rf $RPM_BUILD_ROOT
114
115%if %{with python2}
116%files
117%defattr(644,root,root,755)
118%doc CHANGELOG.rst LICENSE LICENSE.BSD README.rst
119%{py_sitescriptdir}/packaging
120%{py_sitescriptdir}/packaging-%{version}-py*.egg-info
121%endif
122
123%if %{with python3}
124%files -n python3-packaging
125%defattr(644,root,root,755)
126%doc CHANGELOG.rst LICENSE LICENSE.BSD README.rst
127%{py3_sitescriptdir}/packaging
128%{py3_sitescriptdir}/packaging-%{version}-py*.egg-info
129%endif
130
131%if %{with doc}
132%files apidocs
133%defattr(644,root,root,755)
134%doc docs/_build/html/{_static,development,*.html,*.js}
135%endif
This page took 0.178461 seconds and 4 git commands to generate.