]> git.pld-linux.org Git - packages/python-pip.git/blob - python-pip.spec
rebuild with python 3.10
[packages/python-pip.git] / python-pip.spec
1 # TODO
2 # - can these be removed on linux?
3 #   site-packages/pip/_vendor/distlib/t32.exe
4 #   site-packages/pip/_vendor/distlib/t64.exe
5 #   site-packages/pip/_vendor/distlib/w32.exe
6 #   site-packages/pip/_vendor/distlib/w64.exe
7 #
8 # Conditional build:
9 %bcond_without  python2         # CPython 3.x module
10 %bcond_without  python3         # CPython 3.x module
11 %bcond_without  python3_default # Use Python 3.x for pip executable
12 %bcond_without  apidocs         # Sphinx documentation
13 %bcond_with     tests           # test target (not included in sdist)
14
15 %if %{without python3}
16 %undefine       python3_default
17 %endif
18
19 %define         pypa_docs_theme_ver     d2e63fbfc62af3b7050f619b2f5bb8658985b931
20
21 %define         module          pip
22 %define         pypi_name       pip
23 Summary:        A tool for installing and managing Python 2 packages
24 Summary(pl.UTF-8):      Narzędzie do instalowania i zarządzania pakietami Pythona 2
25 Name:           python-%{module}
26 # keep 20.x here for python2 support
27 Version:        20.3.4
28 Release:        3
29 License:        MIT
30 Group:          Libraries/Python
31 # Source0Download: https://pypi.python.org/simple/pip/
32 Source0:        https://pypi.debian.net/pip/%{pypi_name}-%{version}.tar.gz
33 # Source0-md5:  577a375b66ec109e0ac6a4c4aa99bbd0
34 URL:            https://pip.pypa.io/
35 %if %{with python2}
36 BuildRequires:  python-devel >= 1:2.7
37 BuildRequires:  python-modules >= 1:2.7
38 BuildRequires:  python-setuptools
39 %if %{with tests}
40 BuildRequires:  python-mock
41 BuildRequires:  python-pytest
42 BuildRequires:  python-scripttest >= 1.3
43 BuildRequires:  python-virtualenv >= 1.10
44 %endif
45 %endif
46 %if %{with python3}
47 BuildRequires:  python3-devel >= 1:3.5
48 BuildRequires:  python3-modules >= 1:3.5
49 BuildRequires:  python3-setuptools
50 %if %{with tests}
51 BuildRequires:  python3-mock
52 BuildRequires:  python3-pytest
53 BuildRequires:  python3-scripttest >= 1.3
54 BuildRequires:  python3-virtualenv >= 1.10
55 %endif
56 %endif
57 BuildRequires:  rpm-pythonprov
58 BuildRequires:  rpmbuild(macros) >= 1.714
59 %if %{with apidocs}
60 BuildRequires:  python3-furo
61 BuildRequires:  python3-sphinx_inline_tabs
62 BuildRequires:  sphinx-pdg-3
63 %endif
64 Requires:       python-setuptools
65 BuildArch:      noarch
66 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
67
68 %description
69 Pip is a replacement for easy_install. It uses mostly the same
70 techniques for finding packages, so packages that were made
71 easy_installable should be pip-installable as well.
72
73 %description -l pl.UTF-8
74 Pip to zamiennik easy_install. Wykorzystuje w większości te same
75 techniki do wyszukiwania pakietów, więc pakiety, które dało się
76 zainstalować przez easy_install, powinny także dać się zainstalować
77 przy użyciu pipa.
78
79 %package -n python3-pip
80 Summary:        A tool for installing and managing Python 3 packages
81 Summary(pl.UTF-8):      Narzędzie do instalowania i zarządzania pakietami Pythona 3
82 Group:          Libraries/Python
83 Requires:       python3-setuptools
84
85 %description -n python3-pip
86 Pip is a replacement for easy_install. It uses mostly the same
87 techniques for finding packages, so packages that were made
88 easy_installable should be pip-installable as well.
89
90 %description -n python3-pip -l pl.UTF-8
91 Pip to zamiennik easy_install. Wykorzystuje w większości te same
92 techniki do wyszukiwania pakietów, więc pakiety, które dało się
93 zainstalować przez easy_install, powinny także dać się zainstalować
94 przy użyciu pipa.
95
96 %package -n pip
97 Summary:        A tool for installing and managing Python 3 packages
98 Summary(pl.UTF-8):      Narzędzie do instalowania i zarządzania pakietami Pythona 3
99 Group:          Development/Tools
100 %if %{with python3_default}
101 Requires:       python3-%{module} = %{version}-%{release}
102 %else
103 Requires:       python-%{module} = %{version}-%{release}
104 %endif
105 Conflicts:      python-pip < 7.1.2-3
106
107 %description -n pip
108 Pip is a replacement for easy_install. It uses mostly the same
109 techniques for finding packages, so packages that were made
110 easy_installable should be pip-installable as well.
111
112 %description -n pip -l pl.UTF-8
113 Pip to zamiennik easy_install. Wykorzystuje w większości te same
114 techniki do wyszukiwania pakietów, więc pakiety, które dało się
115 zainstalować przez easy_install, powinny także dać się zainstalować
116 przy użyciu pipa.
117
118 %package apidocs
119 Summary:        Documentation for Python pip modules and installer
120 Summary(pl.UTF-8):      Dokumentacja instalatora i modułów Pythona pip
121 Group:          Documentation
122
123 %description apidocs
124 Documentation for Python pip modules and installer.
125
126 %description apidocs -l pl.UTF-8
127 Dokumentacja instalatora i modułów Pythona pip.
128
129 %prep
130 %setup -q -n %{module}-%{version}
131
132 %build
133 %if %{with python2}
134 %py_build %{?with_tests:test}
135 %endif
136
137 %if %{with python3}
138 %py3_build %{?with_tests:test}
139 %endif
140
141 %if %{with apidocs}
142 PYTHONPATH=$(pwd)/src \
143 sphinx-build-3 -b html docs/html docs/html/_build/html
144 %endif
145
146 %install
147 rm -rf $RPM_BUILD_ROOT
148
149 %if %{with python3}
150 %py3_install
151
152 # RH compatibility
153 ln -sf pip3 $RPM_BUILD_ROOT%{_bindir}/python3-pip
154 %endif
155
156 %if %{with python2}
157 %py_install
158
159 %py_postclean
160
161 # RH compatibility
162 ln -sf pip2 $RPM_BUILD_ROOT%{_bindir}/python-pip
163 %endif
164
165 %if %{with python3_default}
166 ln -sf pip3 $RPM_BUILD_ROOT%{_bindir}/pip
167 %else
168 ln -sf pip2 $RPM_BUILD_ROOT%{_bindir}/pip
169 %endif
170
171 %clean
172 rm -rf $RPM_BUILD_ROOT
173
174 %if %{with python2}
175 %files
176 %defattr(644,root,root,755)
177 %doc AUTHORS.txt LICENSE.txt README.rst
178 %attr(755,root,root) %{_bindir}/pip2
179 %attr(755,root,root) %{_bindir}/pip2.*
180 %attr(755,root,root) %{_bindir}/python-pip
181 %{py_sitescriptdir}/pip-%{version}-py*.egg-info
182 %{py_sitescriptdir}/pip
183 %endif
184
185 %if %{with python3}
186 %files -n python3-pip
187 %defattr(644,root,root,755)
188 %doc AUTHORS.txt LICENSE.txt README.rst
189 %attr(755,root,root) %{_bindir}/pip3
190 %attr(755,root,root) %{_bindir}/pip3.*
191 %attr(755,root,root) %{_bindir}/python3-pip
192 %{py3_sitescriptdir}/pip
193 %{py3_sitescriptdir}/pip-%{version}-py*.egg-info
194 %endif
195
196 %files -n pip
197 %defattr(644,root,root,755)
198 %doc AUTHORS.txt LICENSE.txt README.rst
199 %attr(755,root,root) %{_bindir}/pip
200
201 %if %{with apidocs}
202 %files apidocs
203 %defattr(644,root,root,755)
204 %doc docs/html/_build/html/*
205 %endif
This page took 0.09803 seconds and 3 git commands to generate.