forked from pool/python-pip
Accepting request 848968 from devel:languages:python
- Actually, test the new structure of package. :$ - Remove the additional sourced setuptools*.whl and use BR on python-setuptools-wheel. - Add wheel subpackage with the generated wheel for this package (bsc#1176262, CVE-2019-20916). - Make wheel a separate build run to avoid the setuptools/wheel build cycle. OBS-URL: https://build.opensuse.org/request/show/848968 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-pip?expand=0&rev=51
This commit is contained in:
commit
2bdcb1dc9d
@ -1,3 +1,4 @@
|
|||||||
<multibuild>
|
<multibuild>
|
||||||
<package>test</package>
|
<package>test</package>
|
||||||
|
<package>wheel</package>
|
||||||
</multibuild>
|
</multibuild>
|
||||||
|
@ -1,3 +1,18 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Nov 16 16:37:45 UTC 2020 - Matej Cepl <mcepl@suse.com>
|
||||||
|
|
||||||
|
- Actually, test the new structure of package. :$
|
||||||
|
- Remove the additional sourced setuptools*.whl and use BR on
|
||||||
|
python-setuptools-wheel.
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri Nov 13 18:51:09 UTC 2020 - Matej Cepl <mcepl@suse.com>
|
||||||
|
|
||||||
|
- Add wheel subpackage with the generated wheel for this package
|
||||||
|
(bsc#1176262, CVE-2019-20916).
|
||||||
|
- Make wheel a separate build run to avoid the setuptools/wheel build
|
||||||
|
cycle.
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Fri Oct 30 00:18:04 UTC 2020 - Benjamin Greiner <code@bnavigator.de>
|
Fri Oct 30 00:18:04 UTC 2020 - Benjamin Greiner <code@bnavigator.de>
|
||||||
|
|
||||||
|
@ -21,9 +21,16 @@
|
|||||||
%if "%{flavor}" == "test"
|
%if "%{flavor}" == "test"
|
||||||
%define psuffix -test
|
%define psuffix -test
|
||||||
%bcond_without test
|
%bcond_without test
|
||||||
|
%bcond_with wheel
|
||||||
|
%else
|
||||||
|
%if "%{flavor}" == "wheel"
|
||||||
|
%define psuffix -wheel
|
||||||
|
%bcond_without wheel
|
||||||
%else
|
%else
|
||||||
%define psuffix %{nil}
|
%define psuffix %{nil}
|
||||||
%bcond_with test
|
%bcond_with test
|
||||||
|
%bcond_with wheel
|
||||||
|
%endif
|
||||||
%endif
|
%endif
|
||||||
Name: python-pip%{psuffix}
|
Name: python-pip%{psuffix}
|
||||||
Version: 20.2.3
|
Version: 20.2.3
|
||||||
@ -33,9 +40,6 @@ License: MIT
|
|||||||
URL: http://www.pip-installer.org
|
URL: http://www.pip-installer.org
|
||||||
# The PyPI archive lacks the tests
|
# The PyPI archive lacks the tests
|
||||||
Source: https://github.com/pypa/pip/archive/%{version}.tar.gz#/pip-%{version}-gh.tar.gz
|
Source: https://github.com/pypa/pip/archive/%{version}.tar.gz#/pip-%{version}-gh.tar.gz
|
||||||
# Wheel used for testing, no need to update regularly beyond the minimum version specified in
|
|
||||||
# tools/requirements/tests-common_wheels.txt
|
|
||||||
Source1: https://files.pythonhosted.org/packages/py3/s/setuptools/setuptools-45.1.0-py3-none-any.whl
|
|
||||||
# PATCH-FIX-OPENSUSE pip-shipped-requests-cabundle.patch -- adapted patch from python-certifi package
|
# PATCH-FIX-OPENSUSE pip-shipped-requests-cabundle.patch -- adapted patch from python-certifi package
|
||||||
Patch0: pip-shipped-requests-cabundle.patch
|
Patch0: pip-shipped-requests-cabundle.patch
|
||||||
BuildRequires: %{python_module setuptools >= 40.8.0}
|
BuildRequires: %{python_module setuptools >= 40.8.0}
|
||||||
@ -61,12 +65,16 @@ BuildRequires: %{python_module mock}
|
|||||||
BuildRequires: %{python_module pretend}
|
BuildRequires: %{python_module pretend}
|
||||||
BuildRequires: %{python_module pytest}
|
BuildRequires: %{python_module pytest}
|
||||||
BuildRequires: %{python_module scripttest}
|
BuildRequires: %{python_module scripttest}
|
||||||
|
BuildRequires: %{python_module setuptools-wheel}
|
||||||
BuildRequires: %{python_module virtualenv >= 1.10}
|
BuildRequires: %{python_module virtualenv >= 1.10}
|
||||||
BuildRequires: %{python_module wheel}
|
BuildRequires: %{python_module wheel}
|
||||||
BuildRequires: ca-certificates
|
BuildRequires: ca-certificates
|
||||||
BuildRequires: git
|
BuildRequires: git
|
||||||
BuildRequires: subversion
|
BuildRequires: subversion
|
||||||
%endif
|
%endif
|
||||||
|
%if %{with wheel}
|
||||||
|
BuildRequires: %{python_module wheel}
|
||||||
|
%endif
|
||||||
%python_subpackages
|
%python_subpackages
|
||||||
|
|
||||||
%description
|
%description
|
||||||
@ -83,7 +91,7 @@ rm src/pip/_vendor/certifi/cacert.pem
|
|||||||
|
|
||||||
%if %{with test}
|
%if %{with test}
|
||||||
mkdir -p tests/data/common_wheels
|
mkdir -p tests/data/common_wheels
|
||||||
cp %{SOURCE1} tests/data/common_wheels/
|
%python_expand cp %{$python_sitelib}/../wheels/setuptools*.whl tests/data/common_wheels/
|
||||||
%endif
|
%endif
|
||||||
# remove shebangs verbosely (if only sed would offer a verbose mode...)
|
# remove shebangs verbosely (if only sed would offer a verbose mode...)
|
||||||
for f in $(find src -name \*.py -exec grep -l '^#!%{_bindir}/env' {} \;); do
|
for f in $(find src -name \*.py -exec grep -l '^#!%{_bindir}/env' {} \;); do
|
||||||
@ -91,9 +99,13 @@ for f in $(find src -name \*.py -exec grep -l '^#!%{_bindir}/env' {} \;); do
|
|||||||
done
|
done
|
||||||
|
|
||||||
%build
|
%build
|
||||||
|
%if ! %{with wheel}
|
||||||
%python_build
|
%python_build
|
||||||
|
%else
|
||||||
|
%python_exec setup.py bdist_wheel --universal
|
||||||
|
%endif
|
||||||
|
|
||||||
%if ! %{with test}
|
%if !%{with test} && !%{with wheel}
|
||||||
%install
|
%install
|
||||||
%python_install
|
%python_install
|
||||||
%python_clone -a %{buildroot}%{_bindir}/pip
|
%python_clone -a %{buildroot}%{_bindir}/pip
|
||||||
@ -103,6 +115,10 @@ rm -f %{buildroot}%{_bindir}/pip3-2*
|
|||||||
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
%if %{with wheel}
|
||||||
|
%python_expand install -D -m 0644 -t %{buildroot}%{$python_sitelib}/../wheels dist/*.whl
|
||||||
|
%endif
|
||||||
|
|
||||||
%if %{with test}
|
%if %{with test}
|
||||||
%check
|
%check
|
||||||
export PYTHONPATH=$(pwd)/build/lib
|
export PYTHONPATH=$(pwd)/build/lib
|
||||||
@ -126,6 +142,7 @@ donttest+=" or test_from_link_vcs_without_source_dir"
|
|||||||
[ -h %{_bindir}/pip ] || rm -f %{_bindir}/pip
|
[ -h %{_bindir}/pip ] || rm -f %{_bindir}/pip
|
||||||
[ -h %{_bindir}/pip3 ] || rm -f %{_bindir}/pip3
|
[ -h %{_bindir}/pip3 ] || rm -f %{_bindir}/pip3
|
||||||
|
|
||||||
|
%if !%{with test} && !%{with wheel}
|
||||||
%post
|
%post
|
||||||
# keep the alternative groups separate. Users could decide to let pip and pip3 point to
|
# keep the alternative groups separate. Users could decide to let pip and pip3 point to
|
||||||
# different flavors
|
# different flavors
|
||||||
@ -137,9 +154,10 @@ donttest+=" or test_from_link_vcs_without_source_dir"
|
|||||||
%postun
|
%postun
|
||||||
%python_uninstall_alternative pip
|
%python_uninstall_alternative pip
|
||||||
%python_uninstall_alternative pip3
|
%python_uninstall_alternative pip3
|
||||||
|
%endif
|
||||||
|
|
||||||
%if ! %{with test}
|
|
||||||
%files %{python_files}
|
%files %{python_files}
|
||||||
|
%if !%{with test} && !%{with wheel}
|
||||||
%license LICENSE.txt
|
%license LICENSE.txt
|
||||||
%doc AUTHORS.txt NEWS.rst README.rst
|
%doc AUTHORS.txt NEWS.rst README.rst
|
||||||
%python_alternative %{_bindir}/pip
|
%python_alternative %{_bindir}/pip
|
||||||
@ -153,4 +171,9 @@ donttest+=" or test_from_link_vcs_without_source_dir"
|
|||||||
%{python_sitelib}/pip
|
%{python_sitelib}/pip
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
%if %{with wheel}
|
||||||
|
%dir %{python_sitelib}/../wheels
|
||||||
|
%{python_sitelib}/../wheels/*
|
||||||
|
%endif
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:68e7fd3508687f94367f1aa090a3ed921cd045a60b73d8b0aa1f305199a0ca28
|
|
||||||
size 583923
|
|
Loading…
x
Reference in New Issue
Block a user