From c7003b76d92905d1ed718f4294d16bab2f6c54c2 Mon Sep 17 00:00:00 2001 From: Tomas Hrnciar Date: Tue, 14 Apr 2020 15:00:04 +0200 Subject: [PATCH] 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. --- python-pip.spec | 19 ++++++------------- sources | 3 +-- 2 files changed, 7 insertions(+), 15 deletions(-) diff --git a/python-pip.spec b/python-pip.spec index a3f6f53..1a3ba50 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -55,8 +55,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 @@ -68,15 +68,10 @@ BuildRequires: python-setuptools-wheel BuildRequires: python-wheel-wheel %endif -# to get tests: -# git clone https://github.com/pypa/pip && cd pip -# 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 # Patch until the following issue gets implemented upstream: @@ -307,13 +302,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 @@ -331,7 +325,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 diff --git a/sources b/sources index a898220..d2b9cfb 100644 --- a/sources +++ b/sources @@ -1,4 +1,3 @@ -SHA512 (pip-19.1.1.tar.gz) = b35598fc6077af44d69f32bc3bc4b28630b1761a31b6b814c59069adbea98bdd68071471bf5ebd28551aae8e970b882200938f6751135f246dc8228f799604a3 -SHA512 (pip-19.1.1-tests.tar.gz) = e67d49c87dc06ef1c45733623280571089307f2e4151c6e189d2f286c154c59d0c83e6a252ac5bd677ece0ce03294f909aa9eed128f0795f062224fcbf21c5d7 +SHA512 (pip-19.1.1.tar.gz) = 91cd07118d2f7a39b0ecc5f26ae18de3778ebdde90a40f5fa8cf543dfc8e006647ee2f0f6574db1e102e421962db0d725b0ce7ac75f2bb9591cf4754604c9b1a SHA512 (d2e63fbfc62af3b7050f619b2f5bb8658985b931.tar.gz) = fc7b11c5cbf6322469ce2eaca2a8d7eb60b17398d316f7465ab5d3d38dabd00ee22a3da7437a28f6312f0115f77f2df0d8bf0abc671e055eef06356c94283409 SHA512 (2018.2.tar.gz) = 4c09c43a70ecb3ca3bc9445b01bf209eb382e41d9c969145696dea38551992ed88fd9b725a1264380f3dbdf8acdaf5ada3ef86b44255cdfbdbe4a01a1630912d