]> git.pld-linux.org Git - SPECS.git/blob - python-packaging.spec
SPECS updated Wed 28 Jul 14:48:01 CEST 2021
[SPECS.git] / python-packaging.spec
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 %bcond_without  setuptools      # build without setuptools (for bootstraping)
8
9 Summary:        Core utilities for Python packages
10 Summary(pl.UTF-8):      Bazowe funkcje narzędziowe do pakietów Pythona
11 Name:           python-packaging
12 Version:        20.3
13 Release:        3
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:  19e0d1f82a9007b448650ccfeffd0a26
19 URL:            https://github.com/pypa/packaging
20 %if %{with python2}
21 BuildRequires:  python-modules >= 1:2.7
22 %{?with_setuptools:BuildRequires:       python-setuptools}
23 %if %{with tests}
24 BuildRequires:  python-pretend
25 BuildRequires:  python-pyparsing >= 2.0.2
26 BuildRequires:  python-pytest
27 BuildRequires:  python-six
28 %endif
29 %endif
30 %if %{with python3}
31 BuildRequires:  python3-modules >= 1:3.4
32 %{?with_setuptools:BuildRequires:       python3-setuptools}
33 %if %{with tests}
34 BuildRequires:  python3-pretend
35 BuildRequires:  python3-pyparsing >= 2.0.2
36 BuildRequires:  python3-pytest
37 BuildRequires:  python3-six
38 %endif
39 %endif
40 BuildRequires:  rpm-pythonprov
41 BuildRequires:  rpmbuild(macros) >= 1.714
42 %if %{with doc}
43 BuildRequires:  python3-sphinx_rtd_theme
44 BuildRequires:  sphinx-pdg-3
45 %endif
46 Requires:       python-modules >= 1:2.7
47 %if %{without setuptools}
48 # with setuptools these are autogenerated
49 Requires:       python-pyparsing >= 2.0.2
50 Requires:       python-six
51 %endif
52 BuildArch:      noarch
53 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
54
55 %description
56 Core utilities for Python packages.
57
58 %description -l pl.UTF-8
59 Bazowe funkcje narzędziowe do pakietów Pythona.
60
61 %package -n python3-packaging
62 Summary:        Core utilities for Python packages
63 Summary(pl.UTF-8):      Bazowe funkcje narzędziowe do pakietów Pythona
64 Group:          Libraries/Python
65 Requires:       python3-modules >= 1:3.4
66 %if %{without setuptools}
67 # with setuptools these are autogenerated
68 Requires:       python3-pyparsing >= 2.0.2
69 Requires:       python3-six
70 %endif
71
72 %description -n python3-packaging
73 Core utilities for Python packages.
74
75 %description -n python3-packaging -l pl.UTF-8
76 Bazowe funkcje narzędziowe do pakietów Pythona.
77
78 %package apidocs
79 Summary:        API documentation for Python packaging library
80 Summary(pl.UTF-8):      Dokumentacja API biblioteki Pythona packaging
81 Group:          Documentation
82
83 %description apidocs
84 API documentation for Python packaging library.
85
86 %description apidocs -l pl.UTF-8
87 Dokumentacja API biblioteki Pythona packaging.
88
89 %prep
90 %setup -q -n packaging-%{version}
91
92 %build
93 %if %{with python2}
94 %py_build
95
96 %{?with_tests:%{__python} -m pytest}
97 %endif
98
99 %if %{with python3}
100 %py3_build
101
102 %{?with_tests:%{__python3} -m pytest}
103 %endif
104
105 %if %{with doc}
106 %{__make} -C docs html \
107         SPHINXBUILD=sphinx-build-3
108 %endif
109
110 %install
111 rm -rf $RPM_BUILD_ROOT
112
113 %if %{with python2}
114 %py_install
115
116 %py_postclean
117 %endif
118
119 %if %{with python3}
120 %py3_install
121 %endif
122
123 %clean
124 rm -rf $RPM_BUILD_ROOT
125
126 %if %{with python2}
127 %files
128 %defattr(644,root,root,755)
129 %doc CHANGELOG.rst LICENSE LICENSE.BSD README.rst
130 %{py_sitescriptdir}/packaging
131 %{py_sitescriptdir}/packaging-%{version}-py*.egg-info
132 %endif
133
134 %if %{with python3}
135 %files -n python3-packaging
136 %defattr(644,root,root,755)
137 %doc CHANGELOG.rst LICENSE LICENSE.BSD README.rst
138 %{py3_sitescriptdir}/packaging
139 %{py3_sitescriptdir}/packaging-%{version}-py*.egg-info
140 %endif
141
142 %if %{with doc}
143 %files apidocs
144 %defattr(644,root,root,755)
145 %doc docs/_build/html/{_static,development,*.html,*.js}
146 %endif
This page took 0.966685 seconds and 3 git commands to generate.