Replace pypi source with tarball from GitHub

Pypi source does not include tests folder so they had to be manually
downloaded from GitHub. This commit replaces pypi source with tarball
from GitHub where tests are included.
This also fixes rpmlint invalid-url warning.
This commit is contained in:
Tomas Hrnciar 2020-04-14 15:00:04 +02:00
parent 8660cdd3be
commit ff4e2c0da0
2 changed files with 7 additions and 16 deletions

View File

@ -47,8 +47,8 @@ Summary: A tool for installing and managing Python packages
# webencodings: BSD
License: MIT and Python and ASL 2.0 and BSD and ISC and LGPLv2 and MPLv2.0 and (ASL 2.0 or BSD)
URL: http://www.pip-installer.org
Source0: %pypi_source
URL: https://pip.pypa.io/
Source0: https://github.com/pypa/pip/archive/%{version}/%{srcname}-%{version}.tar.gz
BuildArch: noarch
@ -60,16 +60,10 @@ BuildRequires: python-setuptools-wheel
BuildRequires: python-wheel-wheel
%endif
# to get tests:
# git clone https://github.com/pypa/pip && cd pip
# VERSION= # define the version you want
# git checkout $VERSION && tar -czvf ../pip-$VERSION-tests.tar.gz tests/
Source1: pip-%{version}-tests.tar.gz
# Themes required to build the docs.
%if %{with doc}
Source2: https://github.com/pypa/pypa-docs-theme/archive/%{pypa_theme_commit_hash}.tar.gz
Source3: https://github.com/python/python-docs-theme/archive/2018.2.tar.gz
Source1: https://github.com/pypa/pypa-docs-theme/archive/%{pypa_theme_commit_hash}.tar.gz
Source2: https://github.com/python/python-docs-theme/archive/2018.2.tar.gz
%endif
# Downstream only patch
@ -248,13 +242,12 @@ A Python wheel of pip to use with venv.
%prep
%setup -q -n %{srcname}-%{version}
tar -xf %{SOURCE1}
%if %{with doc}
pushd docs/html
tar -xf %{SOURCE2}
tar -xf %{SOURCE1}
mv pypa-docs-theme-%{pypa_theme_commit_hash} pypa
tar -xf %{SOURCE3}
tar -xf %{SOURCE2}
mv python-docs-theme-2018.2 python-docs-theme
popd
%endif
@ -271,7 +264,6 @@ popd
# this goes together with patch4
rm src/pip/_vendor/certifi/*.pem
sed -i '/\.pem$/d' src/pip.egg-info/SOURCES.txt
# tests expect wheels in here
ln -s %{python_wheeldir} tests/data/common_wheels

View File

@ -1,4 +1,3 @@
SHA512 (pip-19.3.1.tar.gz) = 954b390580e23d0a85d1fa4cbd2f35171df7930fbe346f9a809477fe133e95f7d30208d79b5d07f30c81ab1b0a9b52f36f3ff6c77dc81a1c9ab9beb2bd8e0aa1
SHA512 (pip-19.3.1-tests.tar.gz) = fb058fcaaff3325341af5f4746be0c7943953c43fb721124758320363532911ca399f254a58e347c72795adc41764600bc6d02efce0e1e27d4b6d130efad9945
SHA512 (pip-19.3.1.tar.gz) = 39446c0ab6e4495d98f22923a2a76901b024d9047b60d92580b21d447a718e5285cfd66f8ad0c20befcfe1abc7f06be29b6a5644d1b30265d3b67399fe76e033
SHA512 (d2e63fbfc62af3b7050f619b2f5bb8658985b931.tar.gz) = fc7b11c5cbf6322469ce2eaca2a8d7eb60b17398d316f7465ab5d3d38dabd00ee22a3da7437a28f6312f0115f77f2df0d8bf0abc671e055eef06356c94283409
SHA512 (2018.2.tar.gz) = 4c09c43a70ecb3ca3bc9445b01bf209eb382e41d9c969145696dea38551992ed88fd9b725a1264380f3dbdf8acdaf5ada3ef86b44255cdfbdbe4a01a1630912d