source: spec/trunk/SPECS/python-packaging.spec@ 1504

Last change on this file since 1504 was 1114, checked in by Silvan Scherrer, 8 years ago

spec: python-packaging: Release version 16.8-2.

File size: 3.9 KB
Line 
1### remark: as soon as setuptools is done, enable it here also !!!
2
3%global pypi_name packaging
4
5%global build_wheel 0
6%global with_python3 0
7%global with_sphinx 0
8%global with_test 0
9
10%global python2_wheelname %{pypi_name}-%{version}-py2.py3-none-any.whl
11%global python3_wheelname %python2_wheelname
12
13Name: python-%{pypi_name}
14Version: 16.8
15Release: 2%{?dist}
16Summary: Core utilities for Python packages
17
18License: BSD or ASL 2.0
19URL: https://github.com/pypa/packaging
20Vendor: bww bitwise works GmbH
21%scm_source github https://github.com/bitwiseworks/%{pypi_name}-os2 %{version}-os2
22
23BuildArch: noarch
24
25#BuildRequires: python2-setuptools
26BuildRequires: python2-devel
27%if 0%{?with_test}
28BuildRequires: python2-pytest
29%endif
30#BuildRequires: python-pretend
31BuildRequires: python2-pyparsing
32BuildRequires: python-six
33
34%if 0%{?with_python3}
35BuildRequires: python3-setuptools
36BuildRequires: python3-devel
37BuildRequires: python3-pytest
38BuildRequires: python3-pretend
39BuildRequires: python3-pyparsing
40BuildRequires: python3-six
41BuildRequires: python3-sphinx
42%endif
43
44%if 0%{?build_wheel}
45BuildRequires: python2-pip
46BuildRequires: python-wheel
47BuildRequires: python%{python3_pkgversion}-pip
48BuildRequires: python%{python3_pkgversion}-wheel
49%endif
50
51%description
52python-packaging provides core utilities for Python packages like utilities for
53dealing with versions, specifiers, markers etc.
54
55%package -n python2-%{pypi_name}
56Summary: %{summary}
57%{?python_provide:%python_provide python2-%{pypi_name}}
58
59Requires: python2-pyparsing
60Requires: python-six
61%description -n python2-%{pypi_name}
62python2-packaging provides core utilities for Python packages like utilities for
63dealing with versions, specifiers, markers etc.
64
65
66%if 0%{?with_python3}
67%package -n python3-%{pypi_name}
68Summary: %{summary}
69%{?python_provide:%python_provide python3-%{pypi_name}}
70
71Requires: python3-pyparsing
72Requires: python3-six
73%description -n python3-%{pypi_name}
74python3-packaging provides core utilities for Python packages like utilities for
75dealing with versions, specifiers, markers etc.
76%endif
77
78%package -n python-%{pypi_name}-doc
79Summary: python-packaging documentation
80Suggests: python2-%{pypi_name} = %{version}-%{release}
81%description -n python-%{pypi_name}-doc
82Documentation for python-packaging
83
84%prep
85%scm_setup
86# Remove bundled egg-info
87rm -rf %{pypi_name}.egg-info
88
89%build
90%if 0%{?build_wheel}
91%py2_build_wheel
92%else
93%py2_build
94%endif
95%if 0%{?with_python3}
96%if 0%{?build_wheel}
97%py3_build_wheel
98%else
99%py3_build
100%endif
101%endif
102# generate html docs
103%if 0%{?with_sphinx}
104sphinx-build-3 docs html
105%endif
106# remove the sphinx-build leftovers
107rm -rf html/.{doctrees,buildinfo}
108# Do not bundle fonts
109rm -rf html/_static/fonts/
110
111%install
112%if 0%{?build_wheel}
113%py2_install_wheel %{python2_wheelname}
114%else
115%py2_install
116%endif
117%if 0%{?with_python3}
118%if 0%{?build_wheel}
119%py3_install_wheel %{python3_wheelname}
120%else
121%py3_install
122%endif
123%endif
124
125%check
126%if 0%{?with_test}
127%%{__python2} -m pytest tests/
128%if 0%{?with_python3}
129%{__python3} -m pytest tests/
130%endif
131%endif
132
133%files -n python2-%{pypi_name}
134%license LICENSE LICENSE.APACHE LICENSE.BSD
135%doc README.rst CHANGELOG.rst CONTRIBUTING.rst
136%{python2_sitelib}/%{pypi_name}*
137
138%if 0%{?with_python3}
139%files -n python3-%{pypi_name}
140%license LICENSE LICENSE.APACHE LICENSE.BSD
141%doc README.rst CHANGELOG.rst CONTRIBUTING.rst
142%{python3_sitelib}/%{pypi_name}/
143%{python3_sitelib}/%{pypi_name}-*.dist-info/
144%endif
145
146%files -n python-%{pypi_name}-doc
147%if 0%{?with_sphinx}
148%doc html
149%endif
150%license LICENSE LICENSE.APACHE LICENSE.BSD
151
152%changelog
153* Thu Apr 13 2017 Silvan Scherrer <silvan.scherrer@aroa.ch> 16.8-2
154- moved source to github
155
156* Mon Feb 27 2017 Silvan Scherrer <silvan.scherrer@aroa.ch> 16.8-1
157- first rpm version (internal version only)
Note: See TracBrowser for help on using the repository browser.