SHA256
1
0
forked from pool/python-pip
python-pip/python-pip.spec

183 lines
5.9 KiB
RPMSpec
Raw Normal View History

- update to 24.1.1: * Actually use system trust stores when the truststore feature is enabled. * Report informative messages about invalid requirements. * Eagerly import the self version check logic to avoid crashes while upgrading or downgrading pip at the same time. * Accommodate for mismatches between different sources of truth for extra names, for packages generated by setuptools. * Accommodate for development versions of CPython ending in + in the version string. * requests provides optional character detection support on some APIs when processing ambiguous bytes. This isn't relevant for pip to function and we're able to remove it due to recent upstream changes. * Drop support for EOL Python 3.7. * Remove support for legacy versions and dependency specifiers. * Packages with non standard-compliant versions or dependency specifiers are now ignored by the resolver. Already installed packages with non standard-compliant versions or dependency specifiers must be uninstalled before upgrading them. * Improve performance of resolution of large dependency trees, with more caching. * Further improve resolution performance of large dependency trees, by caching hash calculations. * Reduce startup time of commands (e.g. show, freeze) that do not access the network by 15-30%. * Reword and improve presentation of uninstallation errors. * Add a 'raw' progress_bar type for simple and parsable download progress reports * pip list no longer performs the pip version check unless OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pip?expand=0&rev=122
2024-06-30 20:46:56 +02:00
#
# spec file for package python-pip
#
# Copyright (c) 2024 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%global flavor @BUILD_FLAVOR@%{nil}
%if "%{flavor}" == "test"
%define psuffix -test
%bcond_without test
%else
%define psuffix %{nil}
%bcond_with test
%endif
%if 0%{?suse_version} > 1500
%bcond_without libalternatives
%else
%bcond_with libalternatives
%endif
# in order to avoid rewriting for subpackage generator
%define mypython python
%{?sle15_python_module_pythons}
Name: python-pip%{psuffix}
- update to 24.2: * Deprecate pip install --editable falling back to setup.py develop when using a setuptools version that does not support PEP 660 (setuptools v63 and older). * Check unsupported packages for the current platform. (#11054) * Check unsupported packages for the current platform. * Use system certificates and certifi certificates to verify HTTPS connections on Python 3.10+. Python 3.9 and earlier only use certifi. To revert to previous behaviour, pass the flag --use-deprecated=legacy-certs. (#11647) * Use system certificates and certifi certificates to verify HTTPS connections on Python 3.10+. Python 3.9 and earlier only use certifi. * To revert to previous behaviour, pass the flag --use- deprecated=legacy-certs. * Improve discovery performance of installed packages when the importlib.metadata backend is used to load distribution metadata (used by default under Python 3.11+). (#12656) * Improve discovery performance of installed packages when the importlib.metadata backend is used to load distribution metadata (used by default under Python 3.11+). * Improve performance when the same requirement string appears many times during resolution, by consistently caching the parsed requirement string. (#12663) * Improve performance when the same requirement string appears many times during resolution, by consistently caching the parsed requirement string. * Minor performance improvement of finding applicable package candidates by not repeatedly calculating their versions (#12664) OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pip?expand=0&rev=124
2024-08-12 18:49:25 +02:00
Version: 24.2
- update to 24.1.1: * Actually use system trust stores when the truststore feature is enabled. * Report informative messages about invalid requirements. * Eagerly import the self version check logic to avoid crashes while upgrading or downgrading pip at the same time. * Accommodate for mismatches between different sources of truth for extra names, for packages generated by setuptools. * Accommodate for development versions of CPython ending in + in the version string. * requests provides optional character detection support on some APIs when processing ambiguous bytes. This isn't relevant for pip to function and we're able to remove it due to recent upstream changes. * Drop support for EOL Python 3.7. * Remove support for legacy versions and dependency specifiers. * Packages with non standard-compliant versions or dependency specifiers are now ignored by the resolver. Already installed packages with non standard-compliant versions or dependency specifiers must be uninstalled before upgrading them. * Improve performance of resolution of large dependency trees, with more caching. * Further improve resolution performance of large dependency trees, by caching hash calculations. * Reduce startup time of commands (e.g. show, freeze) that do not access the network by 15-30%. * Reword and improve presentation of uninstallation errors. * Add a 'raw' progress_bar type for simple and parsable download progress reports * pip list no longer performs the pip version check unless OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pip?expand=0&rev=122
2024-06-30 20:46:56 +02:00
Release: 0
Summary: A Python package management system
License: MIT
URL: https://pip.pypa.io
# The PyPI archive lacks the tests
Source: https://github.com/pypa/pip/archive/%{version}.tar.gz#/pip-%{version}-gh.tar.gz
# PATCH-FIX-OPENSUSE pip-shipped-requests-cabundle.patch -- adapted patch from python-certifi package
Patch0: pip-shipped-requests-cabundle.patch
# PATCH-FIX-UPSTREAM distutils-reproducible-compile.patch gh#python/cpython#8057 mcepl@suse.com
# To get reproducible builds, byte_compile() of distutils.util now sorts filenames.
Patch1: distutils-reproducible-compile.patch
# PATCH-FIX-OPENSUSE: deal missing ca-certificates as "ssl not available"
Patch2: disable-ssl-context-in-buildenv.patch
- update to 24.1.1: * Actually use system trust stores when the truststore feature is enabled. * Report informative messages about invalid requirements. * Eagerly import the self version check logic to avoid crashes while upgrading or downgrading pip at the same time. * Accommodate for mismatches between different sources of truth for extra names, for packages generated by setuptools. * Accommodate for development versions of CPython ending in + in the version string. * requests provides optional character detection support on some APIs when processing ambiguous bytes. This isn't relevant for pip to function and we're able to remove it due to recent upstream changes. * Drop support for EOL Python 3.7. * Remove support for legacy versions and dependency specifiers. * Packages with non standard-compliant versions or dependency specifiers are now ignored by the resolver. Already installed packages with non standard-compliant versions or dependency specifiers must be uninstalled before upgrading them. * Improve performance of resolution of large dependency trees, with more caching. * Further improve resolution performance of large dependency trees, by caching hash calculations. * Reduce startup time of commands (e.g. show, freeze) that do not access the network by 15-30%. * Reword and improve presentation of uninstallation errors. * Add a 'raw' progress_bar type for simple and parsable download progress reports * pip list no longer performs the pip version check unless OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pip?expand=0&rev=122
2024-06-30 20:46:56 +02:00
BuildRequires: %{python_module base >= 3.7}
BuildRequires: %{python_module setuptools >= 40.8.0}
# The rpm python-wheel build is bootstrap friendly since 0.42
BuildRequires: %{python_module wheel}
BuildRequires: fdupes
BuildRequires: python-rpm-macros >= 20210929
Requires: ca-certificates-mozilla
- update to 24.1.1: * Actually use system trust stores when the truststore feature is enabled. * Report informative messages about invalid requirements. * Eagerly import the self version check logic to avoid crashes while upgrading or downgrading pip at the same time. * Accommodate for mismatches between different sources of truth for extra names, for packages generated by setuptools. * Accommodate for development versions of CPython ending in + in the version string. * requests provides optional character detection support on some APIs when processing ambiguous bytes. This isn't relevant for pip to function and we're able to remove it due to recent upstream changes. * Drop support for EOL Python 3.7. * Remove support for legacy versions and dependency specifiers. * Packages with non standard-compliant versions or dependency specifiers are now ignored by the resolver. Already installed packages with non standard-compliant versions or dependency specifiers must be uninstalled before upgrading them. * Improve performance of resolution of large dependency trees, with more caching. * Further improve resolution performance of large dependency trees, by caching hash calculations. * Reduce startup time of commands (e.g. show, freeze) that do not access the network by 15-30%. * Reword and improve presentation of uninstallation errors. * Add a 'raw' progress_bar type for simple and parsable download progress reports * pip list no longer performs the pip version check unless OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pip?expand=0&rev=122
2024-06-30 20:46:56 +02:00
Requires: coreutils
BuildArch: noarch
%if %{with libalternatives}
BuildRequires: alts
Requires: alts
%else
Requires(post): update-alternatives
Requires(postun): update-alternatives
%endif
%if %{with test}
# Test requirements:
BuildRequires: %{python_module pip = %{version}}
BuildRequires: %{python_module PyYAML}
BuildRequires: %{python_module Werkzeug}
BuildRequires: %{python_module cryptography}
BuildRequires: %{python_module freezegun}
BuildRequires: %{python_module installer}
BuildRequires: %{python_module pretend}
BuildRequires: %{python_module pytest-xdist}
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module scripttest}
BuildRequires: %{python_module setuptools-wheel}
BuildRequires: %{python_module virtualenv >= 1.10}
BuildRequires: git-core
%endif
%python_subpackages
%description
Pip is a replacement for easy_install. It uses mostly the same techniques for
finding packages, so packages that were made easy_installable should be
pip-installable as well.
%package wheel
Summary: The pip wheel for custom tests and install requirements
Requires: %mypython(abi) = %python_version
%description wheel
This packages provides the pip wheel as separate file for cases where
the wheel needs to be used directly in test or install setups
%prep
# Unbundling is not advised by upstream. See src/pip/_vendor/README.rst
# Exception: Use our own cabundle. Adapted patch from python-certifi package
%autosetup -p1 -n pip-%{version}
%if %{with test}
mkdir -p tests/data/common_wheels
%python_expand cp %{$python_sitelib}/../wheels/setuptools*.whl tests/data/common_wheels/
%endif
# remove shebangs verbosely (if only sed would offer a verbose mode...)
for f in $(find src -name \*.py -exec grep -l '^#!%{_bindir}/env' {} \;); do
sed -i 's|^#!%{_bindir}/env .*$||g' $f
done
# Remove windows executable binaries
# bsc#1212015
rm -v src/pip/_vendor/distlib/*.exe
%build
%if !%{with test}
%{python_expand # bootstrap with built-in pip
$python -m venv build/env
build/env/bin/python -m ensurepip
export PYTHONPATH=build/env/lib/python%{$python_bin_suffix}/site-packages
%{$python_pyproject_wheel}
}
%endif
%install
%if !%{with test}
%{python_expand # use pip bootstrapped above
export PYTHONPATH=build/env/lib/python%{$python_bin_suffix}/site-packages
%{$python_pyproject_install}
install -D -m 0644 -t %{buildroot}%{$python_sitelib}/../wheels dist/*.whl
%fdupes %{buildroot}%{$python_sitelib}
}
%{python_expand # Fix shebang path for "pip3.XX" binaries
sed -i "1s|#\!.*python.*|#\!/usr/bin/$python|" %{buildroot}%{_bindir}/pip%{$python_bin_suffix}
}
%python_clone -a %{buildroot}%{_bindir}/pip
%python_clone -a %{buildroot}%{_bindir}/pip3
%python_expand %fdupes %{buildroot}%{_bindir}
%endif
%if %{with test}
%check
%pytest -m "not network" tests/unit
%endif
%pre
# Since /usr/bin/pip became ghosted to be used with update-alternatives, we have to get rid
# of the old binary resulting from the non-update-alternatives-ified package:
[ -h %{_bindir}/pip ] || rm -f %{_bindir}/pip
[ -h %{_bindir}/pip3 ] || rm -f %{_bindir}/pip3
# If libalternatives is used: Removing old update-alternatives entries.
%python_libalternatives_reset_alternative pip
%post
# keep the alternative groups separate. Users could decide to let pip and pip3 point to
# different flavors
%python_install_alternative pip
%python_install_alternative pip3
%postun
%python_uninstall_alternative pip
%python_uninstall_alternative pip3
%if !%{with test}
%files %{python_files}
%license LICENSE.txt
%doc AUTHORS.txt NEWS.rst README.rst
%python_alternative %{_bindir}/pip
%python_alternative %{_bindir}/pip3
%{_bindir}/pip%{python_bin_suffix}
%{python_sitelib}/pip-%{version}.dist-info
%{python_sitelib}/pip
%files %{python_files wheel}
%dir %{python_sitelib}/../wheels
%{python_sitelib}/../wheels/*
%endif
%changelog