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