python-pip/python-pip.spec
Ondřej Súkup 5c90bd62cc - update to 20.0.2
- add setuptools-45.1.0-py3-none-any.whl for testsuite
 * Fix a regression in generation of compatibility tags
 * Rename an internal module, to avoid ImportErrors due to improper uninstallation
 * Switch to a dedicated CLI tool for vendoring dependencies.
 * Remove wheel tag calculation from pip and use packaging.tags. This should provide more tags ordered better than in prior releases.
 *  Deprecate setup.py-based builds that do not generate an .egg-info directory.
 *  The pip>=20 wheel cache is not retro-compatible with previous versions. Until pip 21.0, pip will continue to take advantage of existing legacy cache entries.
 *  Deprecate undocumented --skip-requirements-regex option.
 *  Deprecate passing install-location-related options via --install-option.
 *  Use literal "abi3" for wheel tag on CPython 3.x, to align with PEP 384 which only defines it for this platform.
 *  Remove interpreter-specific major version tag e.g. cp3-none-any from consideration. This behavior was not documented strictly, and this tag in particular is not useful. Anyone with a use case can create an issue with pypa/packaging.
 *  Wheel processing no longer permits wheels containing more than one top-level .dist-info directory.
 *  Support for the git+git@ form of VCS requirement is being deprecated and will be removed in pip 21.0. Switch to git+https:// or git+ssh://. git+git:// also works but its use is discouraged as it is insecure.
 *  Default to doing a user install (as if --user was passed) when the main site-packages directory is not writeable and user site-packages are enabled.
 *  Warn if a path in PATH starts with tilde during pip install.
 *  Cache wheels built from Git requirements that are considered immutable, because they point to a commit hash.
 *  Add option --no-python-version-warning to silence warnings related to deprecation of Python versions.
 *  Cache wheels that pip wheel built locally, matching what pip install does. This particularly helps performance in workflows where pip wheel is used for building before installing. Users desiring the original behavior can use pip wheel --no-cache-dir
 *  Display CA information in pip debug.
 *  Show only the filename (instead of full URL), when downloading from PyPI.
 *  Suggest a more robust command to upgrade pip itself to avoid confusion when the current pip command is not available as pip.
 *  Define all old pip console script entrypoints to prevent import issues in stale wrapper scripts.
 *  The build step of pip wheel now builds all wheels to a cache first, then copies them to the wheel directory all at once. Before, it built them to a temporary directory and moved them to the wheel directory one by one.
 *  Expand ~ prefix to user directory in path options, configs, and environment variables. Values that may be either URL or path are not currently supported, to avoid ambiguity:
   --find-links
   --constraint, -c
   --requirement, -r
   --editable, -e
 *  Correctly handle system site-packages, in virtual environments created with venv (PEP 405).

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pip?expand=0&rev=76
2020-02-05 10:27:04 +00:00

128 lines
4.0 KiB
RPMSpec

#
# spec file for package python-pip
#
# Copyright (c) 2020 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/
#
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%global flavor @BUILD_FLAVOR@%{nil}
%if "%{flavor}" == "test"
%define psuffix -test
%bcond_without test
%else
%define psuffix %{nil}
%bcond_with test
%endif
Name: python-pip%{psuffix}
Version: 20.0.2
Release: 0
Summary: A Python package management system
License: MIT
URL: http://www.pip-installer.org
Source: https://github.com/pypa/pip/archive/%{version}.tar.gz
Source1: setuptools-45.1.0-py3-none-any.whl
Patch0: pip-shipped-requests-cabundle.patch
BuildRequires: %{python_module setuptools}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
Requires: ca-certificates
Requires: coreutils
Requires: python-setuptools
Requires: python-xml
Requires(post): update-alternatives
Requires(postun): update-alternatives
Recommends: ca-certificates-mozilla
BuildArch: noarch
%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 mock}
BuildRequires: %{python_module pip = %{version}}
BuildRequires: %{python_module pretend}
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module scripttest >= 1.3}
BuildRequires: %{python_module virtualenv >= 1.10}
BuildRequires: ca-certificates
BuildRequires: git
BuildRequires: subversion
%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
%setup -q -n pip-%{version}
%patch0 -p1
%if %{with test}
mkdir -p tests/data/common_wheels
cp %{SOURCE1} 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
rm src/pip/_vendor/certifi/cacert.pem
%build
%python_build
%install
%if ! %{with test}
%python_install
%prepare_alternative pip
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%endif
%if %{with test}
%check
export PYTHONPATH=build/lib
%pytest -k 'not (network or test_config_file_venv_option or test_build_env_allow_only_one_install or test_build_env_requirements_check or test_build_env_overlay_prefix_has_priority or test_build_env_isolation)' 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
%post
# can't use `python_install_alternative` because it's pipX.Y, not pip-X.Y
PRIO=$(echo %{python_version} | tr -d .)
%install_alternative pip %{_bindir}/pip%{python_version} $PRIO
%postun
%uninstall_alternative pip %{_bindir}/pip%{python_version}
%if ! %{with test}
%files %{python_files}
%license LICENSE.txt
%doc AUTHORS.txt NEWS.rst README.rst
%python3_only %{_bindir}/pip
%{_bindir}/pip%{python_version}
%python2_only %{_bindir}/pip2
%python3_only %{_bindir}/pip3
%ghost %{_sysconfdir}/alternatives/pip
%{python_sitelib}/pip-%{version}-py%{python_version}.egg-info
%{python_sitelib}/pip
%endif
%changelog