forked from pool/python-pip
		
	- Bug Fixes
    - Handle a timezone indicator of Z when parsing dates in the
      self check. (#12338)
    - Fix bug where installing the same package at the same time
      with multiple pip processes could fail. (#12361)
- Update to 23.3:
  - Process
    - Added reference to vulnerability reporting guidelines to
      pip's security policy.
  - Features
    - Improve extras resolution for multiple constraints on same
      base package. (#11924)
    - Improve use of datastructures to make candidate selection
      1.6x faster. (#12204)
    - Allow pip install --dry-run to use platform and ABI
      overriding options. (#12215)
    - Add is_yanked boolean entry to the installation report
      (--report) to indicate whether the requirement was yanked
      from the index, but was still selected by pip conform to
      PEP 592. (#12224)
  - Bug Fixes
    - Ignore errors in temporary directory cleanup (show a
      warning instead). (#11394)
    - Normalize extras according to PEP 685 from package metadata
      in the resolver for comparison. This ensures extras are
      correctly compared and merged as long as the package
      providing the extra(s) is built with values normalized
      according to the standard. Note, however, that this
      does not solve cases where the package itself contains
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pip?expand=0&rev=111
		
	
		
			
				
	
	
		
			195 lines
		
	
	
		
			5.8 KiB
		
	
	
	
		
			RPMSpec
		
	
	
	
	
	
			
		
		
	
	
			195 lines
		
	
	
		
			5.8 KiB
		
	
	
	
		
			RPMSpec
		
	
	
	
	
	
| #
 | |
| # spec file
 | |
| #
 | |
| # Copyright (c) 2023 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
 | |
| %bcond_with wheel
 | |
| %else
 | |
| %if "%{flavor}" == "wheel"
 | |
| %define psuffix -wheel
 | |
| %bcond_without wheel
 | |
| %bcond_with test
 | |
| %else
 | |
| %define psuffix %{nil}
 | |
| %bcond_with test
 | |
| %bcond_with wheel
 | |
| %endif
 | |
| %endif
 | |
| %global skip_python2 1
 | |
| %if 0%{?suse_version} > 1500
 | |
| %bcond_without libalternatives
 | |
| %else
 | |
| %bcond_with libalternatives
 | |
| %endif
 | |
| %{?sle15_python_module_pythons}
 | |
| Name:           python-pip%{psuffix}
 | |
| Version:        23.3.1
 | |
| 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
 | |
| BuildRequires:  %{python_module base >= 3.7}
 | |
| BuildRequires:  %{python_module setuptools >= 40.8.0}
 | |
| BuildRequires:  fdupes
 | |
| BuildRequires:  python-rpm-macros >= 20210929
 | |
| Requires:       ca-certificates
 | |
| Requires:       coreutils
 | |
| Requires:       python-setuptools
 | |
| Requires:       python-xml
 | |
| Recommends:     ca-certificates-mozilla
 | |
| 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 PyYAML}
 | |
| BuildRequires:  %{python_module Werkzeug}
 | |
| BuildRequires:  %{python_module cryptography}
 | |
| BuildRequires:  %{python_module docutils}
 | |
| BuildRequires:  %{python_module freezegun}
 | |
| BuildRequires:  %{python_module installer}
 | |
| BuildRequires:  %{python_module pretend}
 | |
| BuildRequires:  %{python_module pytest}
 | |
| BuildRequires:  %{python_module scripttest}
 | |
| BuildRequires:  %{python_module setuptools-wheel}
 | |
| BuildRequires:  %{python_module virtualenv >= 1.10}
 | |
| BuildRequires:  %{python_module wheel}
 | |
| BuildRequires:  ca-certificates
 | |
| BuildRequires:  git-core
 | |
| %if 0%{?suse_version} <= 1500
 | |
| BuildRequires:  %{python_module mock}
 | |
| %endif
 | |
| %endif
 | |
| %if %{with wheel}
 | |
| BuildRequires:  %{python_module wheel}
 | |
| %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.
 | |
| 
 | |
| %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}
 | |
| 
 | |
| rm src/pip/_vendor/certifi/cacert.pem
 | |
| 
 | |
| %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
 | |
| sed -i '/\.exe/d' setup.py
 | |
| 
 | |
| %build
 | |
| %if ! %{with wheel}
 | |
| %python_build
 | |
| %else
 | |
| %python_exec setup.py bdist_wheel --universal
 | |
| %endif
 | |
| 
 | |
| %if !%{with test} && !%{with wheel}
 | |
| %install
 | |
| %python_install
 | |
| %python_clone -a %{buildroot}%{_bindir}/pip
 | |
| %python_clone -a %{buildroot}%{_bindir}/pip3
 | |
| # if we just cloned to pip3-2.7 delete it
 | |
| rm -f %{buildroot}%{_bindir}/pip3-2*
 | |
| %python_expand %fdupes %{buildroot}%{$python_sitelib}
 | |
| %endif
 | |
| 
 | |
| %if %{with wheel}
 | |
| %python_expand install -D -m 0644 -t %{buildroot}%{$python_sitelib}/../wheels dist/*.whl
 | |
| %endif
 | |
| 
 | |
| %if %{with test}
 | |
| %check
 | |
| export PYTHONPATH=$(pwd)/build/lib
 | |
| # Looks broken with 22.3.1
 | |
| donttest="test_pip_self_version_check_calls_underlying_implementation"
 | |
| %pytest -m "not network" -k "not ($donttest)" 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
 | |
| 
 | |
| %if !%{with test} && !%{with wheel}
 | |
| %post
 | |
| # keep the alternative groups separate. Users could decide to let pip and pip3 point to
 | |
| # different flavors
 | |
| %python_install_alternative pip
 | |
| %if "%{python_flavor}" != "python2"
 | |
| %python_install_alternative pip3
 | |
| %endif
 | |
| 
 | |
| %postun
 | |
| %python_uninstall_alternative pip
 | |
| %python_uninstall_alternative pip3
 | |
| %endif
 | |
| 
 | |
| %files %{python_files}
 | |
| %if !%{with test} && !%{with wheel}
 | |
| %license LICENSE.txt
 | |
| %doc AUTHORS.txt NEWS.rst README.rst
 | |
| %python_alternative %{_bindir}/pip
 | |
| %if "%{python_flavor}" == "python2"
 | |
| %{_bindir}/pip2
 | |
| %else
 | |
| %python_alternative %{_bindir}/pip3
 | |
| %endif
 | |
| %{_bindir}/pip%{python_bin_suffix}
 | |
| %{python_sitelib}/pip-%{version}*-info
 | |
| %{python_sitelib}/pip
 | |
| %endif
 | |
| 
 | |
| %if %{with wheel}
 | |
| %dir %{python_sitelib}/../wheels
 | |
| %{python_sitelib}/../wheels/*
 | |
| %endif
 | |
| 
 | |
| %changelog
 |