1 | %bcond_with test |
---|
2 | %global pypi_name packaging |
---|
3 | |
---|
4 | #global build_wheel 1 |
---|
5 | %global with_python3 1 |
---|
6 | |
---|
7 | Summary: Core utilities for Python packages |
---|
8 | Name: python-%{pypi_name} |
---|
9 | Version: 20.9 |
---|
10 | Release: 1%{?_dist_release} |
---|
11 | Group: programming |
---|
12 | Vendor: Project Vine |
---|
13 | Distribution: Vine Linux |
---|
14 | |
---|
15 | License: BSD or ASL 2.0 |
---|
16 | URL: https://github.com/pypa/packaging |
---|
17 | Source0: https://files.pythonhosted.org/packages/source/p/%{pypi_name}/%{pypi_name}-%{version}.tar.gz |
---|
18 | |
---|
19 | BuildArch: noarch |
---|
20 | |
---|
21 | # Dependencies with different names in Fedora and Epel7 |
---|
22 | BuildRequires: python-rpm-macros |
---|
23 | BuildRequires: python2-rpm-macros |
---|
24 | BuildRequires: python-setuptools |
---|
25 | BuildRequires: python-devel |
---|
26 | BuildRequires: python-pyparsing |
---|
27 | BuildRequires: python-six |
---|
28 | %if %{with test} |
---|
29 | BuildRequires: python-pytest |
---|
30 | BuildRequires: python-pretend |
---|
31 | %endif |
---|
32 | |
---|
33 | # Build Python 3 subpackage only for Fedora |
---|
34 | %if 0%{?with_python3} |
---|
35 | BuildRequires: python3-rpm-macros |
---|
36 | BuildRequires: python3-setuptools |
---|
37 | BuildRequires: python3-devel |
---|
38 | BuildRequires: python3-pyparsing |
---|
39 | BuildRequires: python3-six |
---|
40 | %if %{with test} |
---|
41 | BuildRequires: python3-pytest |
---|
42 | BuildRequires: python3-pretend |
---|
43 | %endif |
---|
44 | %endif |
---|
45 | |
---|
46 | Requires: python-pyparsing |
---|
47 | Requires: python-six |
---|
48 | %{?python_provide:%python_provide python2-%{pypi_name}} |
---|
49 | |
---|
50 | %description |
---|
51 | python-packaging provides core utilities for Python packages like utilities for |
---|
52 | dealing with versions, specifiers, markers etc. |
---|
53 | |
---|
54 | %if 0%{?with_python3} |
---|
55 | %package -n python3-%{pypi_name} |
---|
56 | Summary: %{summary} |
---|
57 | %{?python_provide:%python_provide python3-%{pypi_name}} |
---|
58 | |
---|
59 | Requires: python3-pyparsing |
---|
60 | Requires: python3-six |
---|
61 | %description -n python3-%{pypi_name} |
---|
62 | python3-packaging provides core utilities for Python packages like utilities for |
---|
63 | dealing with versions, specifiers, markers etc. |
---|
64 | %endif |
---|
65 | |
---|
66 | |
---|
67 | %prep |
---|
68 | %autosetup -n %{pypi_name}-%{version} |
---|
69 | # Remove bundled egg-info |
---|
70 | rm -rf %{pypi_name}.egg-info |
---|
71 | |
---|
72 | |
---|
73 | %build |
---|
74 | %py_build |
---|
75 | |
---|
76 | %if 0%{?with_python3} |
---|
77 | %py3_build |
---|
78 | %endif |
---|
79 | |
---|
80 | |
---|
81 | %install |
---|
82 | %py_install |
---|
83 | |
---|
84 | %if 0%{?with_python3} |
---|
85 | %py3_install |
---|
86 | %endif |
---|
87 | |
---|
88 | |
---|
89 | %check |
---|
90 | %if %{with test} |
---|
91 | %{__python2} -m pytest tests/ |
---|
92 | %{__python3} -m pytest tests/ |
---|
93 | %endif |
---|
94 | |
---|
95 | |
---|
96 | %files |
---|
97 | %license LICENSE LICENSE.APACHE LICENSE.BSD |
---|
98 | %doc README.rst CHANGELOG.rst CONTRIBUTING.rst |
---|
99 | %{python2_sitelib}/%{pypi_name}/ |
---|
100 | %{python2_sitelib}/%{pypi_name}-*-info/ |
---|
101 | |
---|
102 | %if 0%{?with_python3} |
---|
103 | %files -n python3-%{pypi_name} |
---|
104 | %license LICENSE LICENSE.APACHE LICENSE.BSD |
---|
105 | %doc README.rst CHANGELOG.rst CONTRIBUTING.rst |
---|
106 | %{python3_sitelib}/%{pypi_name}/ |
---|
107 | %{python3_sitelib}/%{pypi_name}-*-info/ |
---|
108 | %endif |
---|
109 | |
---|
110 | |
---|
111 | %changelog |
---|
112 | * Tue Feb 23 2021 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> - 20.9-1 |
---|
113 | - new upstream release. |
---|
114 | |
---|
115 | * Sun Aug 16 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> - 20.4-1 |
---|
116 | - new upstream release. |
---|
117 | |
---|
118 | * Wed Nov 28 2018 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> - 18.0-1 |
---|
119 | - new upstream release. |
---|
120 | - initial build for Vine Linux. |
---|
121 | |
---|
122 | * Tue Jul 31 2018 Charalampos Stratakis <cstratak@redhat.com> - 17.1-1 |
---|
123 | - Update to 17.1 |
---|
124 | |
---|
125 | * Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 16.8-11 |
---|
126 | - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild |
---|
127 | |
---|
128 | * Sat Jun 16 2018 Miro Hrončok <mhroncok@redhat.com> - 16.8-10 |
---|
129 | - Rebuilt for Python 3.7 |
---|
130 | |
---|
131 | * Thu Jun 14 2018 Miro Hrončok <mhroncok@redhat.com> - 16.8-9 |
---|
132 | - Bootstrap for Python 3.7 |
---|
133 | |
---|
134 | * Fri Feb 09 2018 Iryna Shcherbina <ishcherb@redhat.com> - 16.8-8 |
---|
135 | - Update Python 2 dependency declarations to new packaging standards |
---|
136 | (See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3) |
---|
137 | |
---|
138 | * Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 16.8-7 |
---|
139 | - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild |
---|
140 | |
---|
141 | * Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 16.8-6 |
---|
142 | - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild |
---|
143 | |
---|
144 | * Wed Mar 22 2017 Lumir Balhar <lbalhar@redhat.com> - 16.8-5 |
---|
145 | - Epel7 compatible spec/package |
---|
146 | |
---|
147 | * Mon Feb 13 2017 Charalampos Stratakis <cstratak@redhat.com> - 16.8-4 |
---|
148 | - Rebuild as wheel |
---|
149 | |
---|
150 | * Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 16.8-3 |
---|
151 | - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild |
---|
152 | |
---|
153 | * Mon Dec 19 2016 Miro Hrončok <mhroncok@redhat.com> - 16.8-2 |
---|
154 | - Rebuild for Python 3.6 |
---|
155 | |
---|
156 | * Wed Nov 02 2016 Lumir Balhar <lbalhar@redhat.com> - 16.8-1 |
---|
157 | - New upstream version |
---|
158 | |
---|
159 | * Fri Sep 16 2016 Lumir Balhar <lbalhar@redhat.com> - 16.7-1 |
---|
160 | - Initial package. |
---|