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
commit f6c63603fb
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
@ -242,13 +236,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
@ -262,7 +255,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