python-pip/python-pip.spec
Matej Cepl 6f0bdab7e0 Accepting request 702370 from home:mcepl:branches:devel:languages:python
- Update to version 19.1.1+git.1557521541.a731e7e3:
  * Docs: capitalize "URL"
  * Upgrade Sphinx version for Read the Docs (#6477)
  * Upwrap import
  * Remove utils/packaging.py's dependence on the current environment.
  * Improve import error handling Fix --no-index usage Fix missing type annotation type
  * Rename _link_package_versions() to evaluate_link().
  * Move _link_package_versions() to CandidateEvaluator.
  * Refine return type of _package_versions() and find_all_candidates().
  * Fix mismerged import
  * Issue #5948: Enable keyring support
  * Move run_with_log_command() after run_stderr_with_prefix().
  * Change to never allow logging errors during tests.
  * Add failing test.
  * Respect --global-option and --install-option for VCS installs.
- Start using upstream git checkout instead of the released
  tarballs so we can get tests/ directory (gh#pypa/pip#6258).
- Enable tests.

- Update to 19.1.1:
  - Restore pyproject.toml handling to how it was with pip 19.0.3
    to prevent the need to add --no-use-pep517 when installing in
    editable mode. (#6434)
  - Fix a regression that caused @ to be quoted in pypiserver
    links. This interfered with parsing the revision string from
    VCS urls. (#6440)
  - Configuration files may now also be stored under sys.prefix
    (#5060)
  - Avoid creating an unnecessary local clone of a Bazaar branch
    when exporting. (#5443)

OBS-URL: https://build.opensuse.org/request/show/702370
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pip?expand=0&rev=65
2019-05-11 17:29:32 +00:00

125 lines
4.0 KiB
RPMSpec

#
# spec file for package python-pip
#
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
#
# 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-%{**}}
# NOTE(saschpe): git invocation and pythonpath issues with testrepository
# enable testing with a build conditional (off by default):
%bcond_without test
Name: python-pip
Version: 19.1.1+git.1557521541.a731e7e3
Release: 0
Summary: A Python package management system
License: MIT
Group: Development/Languages/Python
URL: http://www.pip-installer.org
Source: pip-%{version}.tar.xz
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 docutils}
BuildRequires: %{python_module freezegun}
BuildRequires: %{python_module mock}
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
%define upversion %(echo %{version} |cut -d+ -f 1)
%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
# 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
%python_install
%prepare_alternative pip
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%if %{with test}
%check
%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 .)
%ifpypy3
%install_alternative pip %{_bindir}/pip-%{pypy3_bin_suffix} $PRIO
%else
%install_alternative pip %{_bindir}/pip%{python_version} $PRIO
%endif
%postun
%ifpypy3
%uninstall_alternative pip %{_bindir}/pip-%{pypy3_bin_suffix}
%else
%uninstall_alternative pip %{_bindir}/pip%{python_version}
%endif
%files %{python_files}
%license LICENSE.txt
%doc AUTHORS.txt NEWS.rst README.rst
%{_bindir}/pip
%python2_only %{_bindir}/pip2
%python3_only %{_bindir}/pip3
%ifpypy3
%{_bindir}/pip-%{pypy3_bin_suffix}
%else
%{_bindir}/pip%{python_version}
%endif
%ghost %{_sysconfdir}/alternatives/pip
%{python_sitelib}/pip-%{upversion}-py%{python_version}.egg-info
%{python_sitelib}/pip
%changelog