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