Compare commits
No commits in common. "c8-beta" and "c9s" have entirely different histories.
|
@ -1,2 +1,7 @@
|
|||
SOURCES/pip-23.2.1-man.tar.gz
|
||||
SOURCES/pip-23.2.1.tar.gz
|
||||
/*.tar.gz
|
||||
/*.zip
|
||||
/pip-*/
|
||||
/pip/
|
||||
/results_python-pip/
|
||||
*.rpm
|
||||
|
||||
|
|
|
@ -1,2 +0,0 @@
|
|||
e78411dc8b3a57af0c84b2b9a13365d2a87ffc36 SOURCES/pip-23.2.1-man.tar.gz
|
||||
f90fd7e09cdb6f87b7498942fd41157363868a3f SOURCES/pip-23.2.1.tar.gz
|
|
@ -0,0 +1,7 @@
|
|||
--- !Policy
|
||||
|
||||
product_versions:
|
||||
- rhel-9
|
||||
decision_context: osci_compose_gate
|
||||
rules:
|
||||
- !PassingTestCaseRule {test_case_name: osci.brew-build.tier0.functional}
|
|
@ -0,0 +1,9 @@
|
|||
# This is just temporary, when upstream merges PRs it can be removed
|
||||
# https://github.com/psf/requests/pull/5410
|
||||
addFilter(r'(non-executable-script|wrong-script-interpreter) .+/pip/_vendor/requests/certs.py\b')
|
||||
|
||||
# This file is actually a script but in the vendored context of pip, it is never executed
|
||||
addFilter(r'non-executable-script .+/pip/_vendor/distro/distro.py\b')
|
||||
|
||||
# We ship README with the main package but not with the wheel
|
||||
addFilter(r'python-pip-wheel.noarch: W: no-documentation')
|
|
@ -50,15 +50,6 @@ License: MIT and Python and ASL 2.0 and BSD and ISC and LGPLv2 and MPLv2.
|
|||
URL: https://pip.pypa.io/
|
||||
Source0: https://github.com/pypa/pip/archive/%{upstream_version}/%{srcname}-%{upstream_version}.tar.gz
|
||||
|
||||
# To generate the man pages for RHEL8 on a system with Python >= 3.7
|
||||
# rhpkg prep
|
||||
# cd into the pip folder
|
||||
# sed -i '/myst_parser/d;/sphinx_copybutton/d;/sphinx_inline_tabs/d;/sphinxcontrib.towncrier/d' docs/html/conf.py
|
||||
# sphinx-build-3 -b man docs/man docs/build/man -c docs/html
|
||||
# tar -czf pip-23.2.1-man.tar.gz --exclude=".[^/]*" -v docs/build/man
|
||||
# mv pip-23.2.1-man.tar.gz ..
|
||||
Source1: pip-%{base_version}-man.tar.gz
|
||||
|
||||
BuildArch: noarch
|
||||
|
||||
# Prevent removing of the system packages installed under /usr/lib
|
||||
|
@ -161,14 +152,6 @@ BuildRequires: python%{python3_pkgversion}-installer
|
|||
# Side note: pip bundles pkg_resources from setuptools for internal usage.
|
||||
Recommends: python%{python3_pkgversion}-setuptools
|
||||
|
||||
# Require alternatives version that implements the --keep-foreign flag and fixes rhbz#2203820
|
||||
Requires(postun): alternatives >= 1.19.2-1
|
||||
|
||||
# python3.12 installs the alternatives master symlink to which we attach a slave
|
||||
Requires: python%{python3_pkgversion}
|
||||
Requires(post): python%{python3_pkgversion}
|
||||
Requires(postun): python%{python3_pkgversion}
|
||||
|
||||
# Virtual provides for the packages bundled by pip:
|
||||
%{bundled %{python3_pkgversion}}
|
||||
|
||||
|
@ -211,6 +194,10 @@ sed -i '/\.exe/d' setup.py
|
|||
%build
|
||||
%py3_build_wheel
|
||||
|
||||
export PYTHONPATH=./src/
|
||||
sphinx-build-3 -b man docs/man docs/build/man -c docs/html
|
||||
|
||||
|
||||
%install
|
||||
# The following is similar to %%pyproject_install, but we don't have
|
||||
# /usr/bin/pip yet, so we install using the wheel directly.
|
||||
|
@ -230,7 +217,6 @@ sed -i '/\.exe/d' setup.py
|
|||
'pip==%{upstream_version}'
|
||||
|
||||
# Install the man pages
|
||||
tar -xvf %{SOURCE1}
|
||||
pushd docs/build/man
|
||||
install -d %{buildroot}%{_mandir}/man1
|
||||
for MAN in *1; do
|
||||
|
@ -266,11 +252,6 @@ install -p dist/%{python_wheel_name} -t %{buildroot}%{python_wheel_dir}
|
|||
rm %{buildroot}%{_bindir}/pip
|
||||
rm %{buildroot}%{_bindir}/pip3
|
||||
|
||||
# All ghost files controlled by alternatives need to exist for the files
|
||||
# section check to succeed
|
||||
touch %{buildroot}%{_bindir}/pip3
|
||||
touch %{buildroot}%{_bindir}/pip-3
|
||||
|
||||
%check
|
||||
%if 0%{?rhel} >= 9
|
||||
# The test cannot run on RHEL8 due to the test script missing from RPM.
|
||||
|
@ -293,34 +274,6 @@ pytest_k='not completion'
|
|||
%endif
|
||||
|
||||
|
||||
%post -n python%{python3_pkgversion}-%{srcname}
|
||||
alternatives --keep-foreign --add-slave python3 %{_bindir}/python%{python3_version} \
|
||||
%{_bindir}/pip3 \
|
||||
pip3 \
|
||||
%{_bindir}/pip%{python3_version}
|
||||
alternatives --keep-foreign --add-slave python3 %{_bindir}/python%{python3_version} \
|
||||
%{_bindir}/pip-3 \
|
||||
pip-3 \
|
||||
%{_bindir}/pip-%{python3_version}
|
||||
|
||||
%postun -n python%{python3_pkgversion}-%{srcname}
|
||||
# Do this only during uninstall process (not during update)
|
||||
if [ $1 -eq 0 ]; then
|
||||
# Only remove the slave links if the master link for python3 still exists.
|
||||
# Due to a possible bug in yum, python3.12 gets removed before python3.12-pip
|
||||
# even though we have declared Requires(postun): python3.12
|
||||
EXISTS=`alternatives --display python3 | \
|
||||
grep -c "^/usr/bin/python%{python3_version} - priority [0-9]*"`
|
||||
|
||||
if [ $EXISTS -ne 0 ]; then
|
||||
alternatives --keep-foreign --remove-slave python3 %{_bindir}/python%{python3_version} \
|
||||
pip3
|
||||
alternatives --keep-foreign --remove-slave python3 %{_bindir}/python%{python3_version} \
|
||||
pip-3
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
%files -n python%{python3_pkgversion}-%{srcname}
|
||||
%doc README.rst
|
||||
%license %{python3_sitelib}/pip-%{upstream_version}.dist-info/LICENSE.txt
|
||||
|
@ -333,8 +286,6 @@ fi
|
|||
%{python3_sitelib}/pip*
|
||||
%dir %{bashcompdir}
|
||||
%{bashcompdir}/pip%{python3_pkgversion}
|
||||
%ghost %{_bindir}/pip3
|
||||
%ghost %{_bindir}/pip-3
|
||||
|
||||
%files -n %{python_wheel_pkg_prefix}-%{srcname}-wheel
|
||||
%license LICENSE.txt
|
|
@ -0,0 +1,5 @@
|
|||
# completely disabled inspections:
|
||||
inspections:
|
||||
# we know about RIGHT-TO-LEFT OVERRIDE in AUTHORS.txt
|
||||
# (fine tuning of this inspection does not seem to work)
|
||||
unicode: off
|
|
@ -0,0 +1 @@
|
|||
SHA512 (pip-23.2.1.tar.gz) = a6c629976c332cffe5dff0ec1e201d694c7a42fa8def202ebf1db251a6dbd90091eaac89c36a354a0cf0c60cdb267b4e0ec9ff6a88b0ac61cfaafdf159e34fc8
|
|
@ -0,0 +1,40 @@
|
|||
#!/bin/sh -eux
|
||||
# This script requires root privileges and you should never run it on your own machine
|
||||
test $EUID -eq 0
|
||||
|
||||
PYTHON_VERSION=$(/usr/bin/python3.12 -c 'import sys; print("{}.{}".format(*sys.version_info))')
|
||||
RPM_SITELIB="/usr/lib/python${PYTHON_VERSION}/site-packages"
|
||||
LOCAL_SITELIB="/usr/local/lib/python${PYTHON_VERSION}/site-packages"
|
||||
USER_SITELIB="/home/fedora-test-user/.local/lib/python${PYTHON_VERSION}/site-packages"
|
||||
|
||||
# First, let's install older Pello with pip as if it was installed by RPM
|
||||
# This is an approximation, but it usually works
|
||||
RPM_BUILD_ROOT=/ /usr/bin/pip-3.12 install 'Pello==1.0.1'
|
||||
|
||||
# Now, we'll upgrade it with regular pip
|
||||
/usr/bin/pip-3.12 install --upgrade 'Pello==1.0.2'
|
||||
|
||||
# pip should see it
|
||||
/usr/bin/pip-3.12 freeze | grep '^Pello==1\.0\.2$'
|
||||
|
||||
# Both installations should still exist
|
||||
test -d "${RPM_SITELIB}/Pello-1.0.1-py${PYTHON_VERSION}.egg-info" || test -d "${RPM_SITELIB}/Pello-1.0.1.dist-info"
|
||||
test -d "${LOCAL_SITELIB}/Pello-1.0.2.dist-info"
|
||||
|
||||
# Let's ditch the local one
|
||||
/usr/bin/pip-3.12 uninstall --yes Pello
|
||||
|
||||
# It should only remove one of them
|
||||
test -d "${RPM_SITELIB}/Pello-1.0.1-py${PYTHON_VERSION}.egg-info" || test -d "${RPM_SITELIB}/Pello-1.0.1.dist-info"
|
||||
! test -d "${LOCAL_SITELIB}/Pello-1.0.2.dist-info"
|
||||
|
||||
# And pip should still see the RPM-installed one
|
||||
/usr/bin/pip-3.12 freeze | grep '^Pello==1\.0\.1$'
|
||||
|
||||
# Again, but as regular user
|
||||
useradd fedora-test-user
|
||||
su fedora-test-user -c '/usr/bin/pip-3.12 install "Pello==1.0.2"'
|
||||
test -d "${USER_SITELIB}/Pello-1.0.2.dist-info"
|
||||
su fedora-test-user -c '/usr/bin/pip-3.12 freeze' | grep '^Pello==1\.0\.2$'
|
||||
su fedora-test-user -c '/usr/bin/pip-3.12 uninstall --yes Pello'
|
||||
su fedora-test-user -c '/usr/bin/pip-3.12 freeze' | grep '^Pello==1\.0\.1$'
|
|
@ -0,0 +1,28 @@
|
|||
---
|
||||
- hosts: localhost
|
||||
roles:
|
||||
- role: standard-test-basic
|
||||
tags:
|
||||
- classic
|
||||
repositories:
|
||||
- repo: "https://src.fedoraproject.org/tests/python.git"
|
||||
dest: "python"
|
||||
tests:
|
||||
- smoke312:
|
||||
dir: python/smoke
|
||||
run: VERSION=3.12 ./venv.sh
|
||||
- smoke312_virtualenv:
|
||||
dir: python/smoke
|
||||
run: VERSION=3.12 METHOD=virtualenv ./venv.sh
|
||||
- pip_install_upgrade
|
||||
required_packages:
|
||||
- 'https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm'
|
||||
- 'https://dl.fedoraproject.org/pub/epel/epel-next-release-latest-9.noarch.rpm'
|
||||
- gcc
|
||||
- virtualenv
|
||||
- python3.12-devel
|
||||
- python3.12-pip
|
||||
- python3-tox
|
||||
- grep
|
||||
- util-linux
|
||||
- shadow-utils
|
Loading…
Reference in New Issue