Todd R 2017-04-14 16:46:04 +00:00 committed by Git OBS Bridge
parent b9cac7281f
commit 44afbd60a4
8 changed files with 75 additions and 1217 deletions

View File

@ -1,4 +0,0 @@
<multibuild>
<package>test</package>
<package>wheel</package>
</multibuild>

View File

@ -1,15 +0,0 @@
---
src/pip/_vendor/distlib/wheel.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/src/pip/_vendor/distlib/wheel.py
+++ b/src/pip/_vendor/distlib/wheel.py
@@ -538,7 +538,7 @@ class Wheel(object):
maker.source_dir = workdir
maker.target_dir = None
try:
- for zinfo in zf.infolist():
+ for zinfo in sorted(zf.infolist()):
arcname = zinfo.filename
if isinstance(arcname, text_type):
u_arcname = arcname

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:a9828528aa21cf87093e9332f94ea65931a51c443216f5d3a8f14451ef4f2bbf
size 9325766

View File

@ -0,0 +1,13 @@
diff -ruN a/pip/_vendor/requests/certs.py b/pip/_vendor/requests/certs.py
--- a/pip/_vendor/requests/certs.py 2014-05-16 20:03:31.000000000 +0200
+++ b/pip/_vendor/requests/certs.py 2014-07-03 09:54:46.751966582 +0200
@@ -19,8 +19,7 @@
except ImportError:
def where():
"""Return the preferred certificate bundle."""
- # vendored bundle inside Requests
- return os.path.join(os.path.dirname(__file__), 'cacert.pem')
+ return "/etc/ssl/ca-bundle.pem"
if __name__ == '__main__':
print(where())

3
pip-9.0.1.tar.gz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:09f243e1a7b461f654c26a725fa373211bb7ff17a9300058b205c61658ca940d
size 1197370

View File

@ -1,114 +0,0 @@
---
src/pip/_vendor/certifi/core.py | 70 ++++------------------------------------
tests/unit/test_options.py | 5 ++
2 files changed, 13 insertions(+), 62 deletions(-)
--- a/src/pip/_vendor/certifi/core.py
+++ b/src/pip/_vendor/certifi/core.py
@@ -5,72 +5,18 @@ certifi.py
~~~~~~~~~~
This module returns the installation location of cacert.pem or its contents.
-"""
-import os
-
-class _PipPatchedCertificate(Exception):
- pass
+Patched by openSUSE: return the system bundle
+"""
+def read_text(_module=None, _path=None, encoding="ascii"):
+ with open(where(), "r", encoding=encoding) as data:
+ return data.read()
-try:
- # Return a certificate file on disk for a standalone pip zipapp running in
- # an isolated build environment to use. Passing --cert to the standalone
- # pip does not work since requests calls where() unconditionally on import.
- _PIP_STANDALONE_CERT = os.environ.get("_PIP_STANDALONE_CERT")
- if _PIP_STANDALONE_CERT:
- def where():
- return _PIP_STANDALONE_CERT
- raise _PipPatchedCertificate()
-
- from importlib.resources import path as get_path, read_text
-
- _CACERT_CTX = None
- _CACERT_PATH = None
-
- def where():
- # This is slightly terrible, but we want to delay extracting the file
- # in cases where we're inside of a zipimport situation until someone
- # actually calls where(), but we don't want to re-extract the file
- # on every call of where(), so we'll do it once then store it in a
- # global variable.
- global _CACERT_CTX
- global _CACERT_PATH
- if _CACERT_PATH is None:
- # This is slightly janky, the importlib.resources API wants you to
- # manage the cleanup of this file, so it doesn't actually return a
- # path, it returns a context manager that will give you the path
- # when you enter it and will do any cleanup when you leave it. In
- # the common case of not needing a temporary file, it will just
- # return the file system location and the __exit__() is a no-op.
- #
- # We also have to hold onto the actual context manager, because
- # it will do the cleanup whenever it gets garbage collected, so
- # we will also store that at the global level as well.
- _CACERT_CTX = get_path("pip._vendor.certifi", "cacert.pem")
- _CACERT_PATH = str(_CACERT_CTX.__enter__())
-
- return _CACERT_PATH
-
-except _PipPatchedCertificate:
- pass
-
-except ImportError:
- # This fallback will work for Python versions prior to 3.7 that lack the
- # importlib.resources module but relies on the existing `where` function
- # so won't address issues with environments like PyOxidizer that don't set
- # __file__ on modules.
- def read_text(_module, _path, encoding="ascii"):
- with open(where(), "r", encoding=encoding) as data:
- return data.read()
-
- # If we don't have importlib.resources, then we will just do the old logic
- # of assuming we're on the filesystem and munge the path directly.
- def where():
- f = os.path.dirname(__file__)
- return os.path.join(f, "cacert.pem")
+def where():
+ return "/etc/ssl/ca-bundle.pem"
def contents():
- return read_text("certifi", "cacert.pem", encoding="ascii")
+ return read_text(encoding="ascii")
--- a/tests/unit/test_options.py
+++ b/tests/unit/test_options.py
@@ -1,4 +1,5 @@
import os
+import os.path
from contextlib import contextmanager
from optparse import Values
from tempfile import NamedTemporaryFile
@@ -11,6 +12,7 @@ from pip._internal.cli.main import main
from pip._internal.commands import create_command
from pip._internal.commands.configuration import ConfigurationCommand
from pip._internal.exceptions import PipError
+from pip._vendor.certifi import where
from tests.lib.options_helpers import AddFakeCommandMixin
from tests.lib.path import Path
@@ -620,6 +622,9 @@ class TestOptionsConfigFiles:
else:
assert expect == cmd._determine_file(options, need_value=False)
+ def test_certificates(self):
+ assert os.path.exists(where())
+
class TestOptionsExpandUser(AddFakeCommandMixin):
def test_cache_dir(self) -> None:

View File

@ -1,945 +1,3 @@
-------------------------------------------------------------------
Wed Aug 10 10:33:35 UTC 2022 - Dirk Müller <dmueller@suse.com>
- skip subversion tests, not that relevant to pull in
dozens of dependencies into small bootstrap
-------------------------------------------------------------------
Thu Jun 23 20:08:32 UTC 2022 - Matej Cepl <mcepl@suse.com>
- Add distutils-reproducible-compile.patch to make installed
files ordered correctly and thus builds reproducible again
(port of the fix for bpo#29708 and gh#python/cpython#8057).
-------------------------------------------------------------------
Sat Mar 19 17:14:58 UTC 2022 - Ben Greiner <code@bnavigator.de>
- Avoid cycle: BuildRequire ca-certificates only in tests
-------------------------------------------------------------------
Fri Mar 18 09:32:29 UTC 2022 - Ben Greiner <code@bnavigator.de>
- Update requirements: v22 is not compatible with Python 3.6 and
thus not suitable for SLE/Leap 15.
-------------------------------------------------------------------
Thu Mar 17 10:28:24 UTC 2022 - Matej Cepl <mcepl@suse.com>
- Update to 22.0.4:
- Drop the doctype check, that presented a warning for index
pages that use non-compliant HTML 5.
- Update to 22.0.3:
- Print the exception via rich.traceback, when running with
--debug.
- Only calculate topological installation order, for packages
that are going to be installed/upgraded.
- This fixes an AssertionError that occured when determining
installation order, for a very specific combination of
upgrading-already-installed-package + change of dependencies
+ fetching some packages from a package index. This
combination was especially common in Read the Docs'
builds.
- Use html.parser by default, instead of falling back
to html5lib when --use-deprecated=html5lib is not
passed.
- Clarify that using per-requirement overrides disables the
usage of wheels.
- Update to 22.0.2:
- Instead of failing on index pages that use non-compliant
HTML 5, print a deprecation warning and fall back to
html5lib-based parsing for now. This simplifies the migration
for non-compliant index pages, by letting such indexes
function with a warning.
- Update to 22.0.1:
- Accept lowercase <!doctype html> on index pages.
- Properly handle links parsed by html5lib, when using
--use-deprecated=html5lib.
- Update to 22.0:
- Completely replace :pypi:`tox` in our development workflow,
with :pypi:`nox`.
- Deprecate alternative progress bar styles, leaving only on
and off as available choices.
- Drop support for Python 3.6.
- Disable location mismatch warnings on Python versions prior
to 3.10.
- These warnings were helping identify potential issues as part
of the sysconfig -> distutils transition, and we no longer
need to rely on reports from older Python versions for
information on the transition.
- Changed PackageFinder to parse HTML documents using the
stdlib :class:`html.parser.HTMLParser` class instead of the
html5lib package.
- For now, the deprecated html5lib code remains and can be used
with the --use-deprecated=html5lib command line option.
However, it will be removed in a future pip release.
- Utilise rich for presenting pip's default download progress
bar.
- Present a better error message when an invalid wheel file is
encountered, providing more context where the invalid wheel
file is.
- Documents the --require-virtualenv flag for pip install.
- pip install <tab> autocompletes paths.
- Allow Python distributors to opt-out from or opt-in to the
sysconfig installation scheme backend by setting
sysconfig._PIP_USE_SYSCONFIG to True or False.
- Make it possible to deselect tests requiring cryptography
package on systems where it cannot be installed.
- Start using Rich for presenting error messages in
a consistent format.
- Improve presentation of errors from subprocesses.
- Forward pip's verbosity configuration to VCS tools to control
their output accordingly.
- Optimize installation order calculation to improve
performance when installing requirements that form a complex
dependency graph with a large amount of edges.
- When a package is requested by the user for upgrade,
correctly identify that the extra-ed variant of that same
package depended by another user-requested package is
requesting the same package, and upgrade it accordingly.
- Prevent pip from installing yanked releases unless explicitly
pinned via the == or === operators.
- Stop backtracking on build failures, by instead surfacing
them to the user and aborting immediately. This behaviour
provides more immediate feedback when a package cannot be
built due to missing build dependencies or platform
incompatibility.
- Silence Value for <location> does not match warning caused by
an erroneous patch in Slackware-distributed Python 3.9.
- Fix an issue where pip did not consider dependencies with and
without extras to be equal
-------------------------------------------------------------------
Sun Nov 7 17:07:30 UTC 2021 - Dirk Müller <dmueller@suse.com>
- update to 21.3.1:
* Always refuse installing or building projects that have no ``pyproject.toml`` nor
``setup.py``.
* Tweak running-as-root detection, to check ``os.getuid`` if it exists, on
Unix-y and non-Linux/non-MacOS machines.
* When installing projects with a ``pyproject.toml`` in editable mode, and the build
backend does not support :pep:`660`, prepare metadata using
``prepare_metadata_for_build_wheel`` instead of ``setup.py egg_info``. Also, refuse
installing projects that only have a ``setup.cfg`` and no ``setup.py`` nor
``pyproject.toml``. These restore the pre-21.3 behaviour.
* Restore compatibility of where configuration files are loaded from on MacOS
* Upgrade pep517 to 0.12.0
* Improve deprecation warning regarding the copying of source trees when
installing from a local directory.
* Suppress location mismatch warnings when pip is invoked from a Python source
tree, so ``ensurepip`` does not emit warnings on CPython ``make install``.
* On Python 3.10 or later, the installation scheme backend has been changed to use
``sysconfig``. This is to anticipate the deprecation of ``distutils`` in Python
3.10, and its scheduled removal in 3.12. For compatibility considerations, pip
installations running on Python 3.9 or lower will continue to use ``distutils``.
* Remove the ``--build-dir`` option and aliases, one last time.
* In-tree builds are now the default. ``--use-feature=in-tree-build`` is now
ignored. ``--use-deprecated=out-of-tree-build`` may be used temporarily to ease
the transition.
* Un-deprecate source distribution re-installation behaviour.
* Replace vendored appdirs with platformdirs.
* Support `PEP 610 <https://www.python.org/dev/peps/pep-0610/>`_ to detect
editable installs in ``pip freeze`` and ``pip list``. The ``pip list`` column output
has a new ``Editable project location`` column, and the JSON output has a new
``editable_project_location`` field.
* ``pip freeze`` will now always fallback to reporting the editable project
location when it encounters a VCS error while analyzing an editable
requirement. Before, it sometimes reported the requirement as non-editable.
* ``pip show`` now sorts ``Requires`` and ``Required-By`` alphabetically.
* Do not raise error when there are no files to remove with ``pip cache purge/remove``.
Instead log a warning and continue (to log that we removed 0 files).
* When backtracking during dependency resolution, prefer the dependencies
which are involved in the most recent conflict. This can significantly
reduce the amount of backtracking required.
* Cache requirement objects, to improve performance reducing reparses of requirement strings.
* Support editable installs for projects that have a ``pyproject.toml`` and use a
build backend that supports :pep:`660`.
* When a revision is specified in a Git URL, use git's partial clone feature
to speed up source retrieval.
* Add a ``--debug`` flag, to enable a mode that doesn't log errors and
propagates them to the top level instead. This is primarily to aid with
debugging pip's crashes.
* If a host is explicitly specified as trusted by the user (via the
--trusted-host option), cache HTTP responses from it in addition to HTTPS
ones.
* Present a better error message, when a ``file:`` URL is not found.
* Fix the auth credential cache to allow for the case in which
the index url contains the username, but the password comes
from an external source, such as keyring.
* Fix double unescape of HTML ``data-requires-python`` and ``data-yanked`` attributes.
* New resolver: Fixes depth ordering of packages during resolution, e.g. a
dependency 2 levels deep will be ordered before a dependecy 3 levels deep.
- drop remove_mock.patch (upstream)
-------------------------------------------------------------------
Wed Sep 8 16:07:38 UTC 2021 - Stefan Schubert <schubi@suse.de>
- Use libalternatives instead of update-alternatives.
-------------------------------------------------------------------
Mon Jan 4 08:43:14 UTC 2021 - Paolo Stivanin <info@paolostivanin.com>
- Update to 20.2.4:
Deprecations and Removals
* Document that certain removals can be fast tracked.
* Document that Python versions are generally supported until
PyPI usage falls below 5%
Features
* New resolver: Avoid accessing indexes when the installed
candidate is preferred and considered good enough
* Improve error message friendliness when an environment
has packages with corrupted metadata
* Cache package listings on index packages so they are guarenteed
to stay stable during a pip command session. This also improves
performance when a index page is accessed multiple times during
the command session
* New resolver: Tweak resolution logic to improve user experience
when user-supplied requirements conflict
Bug Fixes
* New resolver: Correctly respect ``Requires-Python`` metadata
to reject incompatible packages in ``--no-deps`` mode
* New resolver: Pick up hash declarations in constraints files
and use them to filter available distributions
* New resolver: If a package appears multiple times in user
specification with different ``--hash`` options, only hashes
that present in all specifications should be allowed
-------------------------------------------------------------------
Mon Dec 14 00:14:23 UTC 2020 - Benjamin Greiner <code@bnavigator.de>
- Fix the condition to really not break Python 2.7 in Leap
-------------------------------------------------------------------
Sun Dec 13 21:23:26 UTC 2020 - Matej Cepl <mcepl@suse.com>
- We don't need to break Python 2.7
-------------------------------------------------------------------
Fri Dec 11 22:13:56 UTC 2020 - Matej Cepl <mcepl@suse.com>
- Add remove_mock.patch to remove dependency on the external mock
package (gh#pypa/pip#9266).
-------------------------------------------------------------------
Mon Nov 16 16:37:45 UTC 2020 - Matej Cepl <mcepl@suse.com>
- Actually, test the new structure of package. :$
- Remove the additional sourced setuptools*.whl and use BR on
python-setuptools-wheel.
-------------------------------------------------------------------
Fri Nov 13 18:51:09 UTC 2020 - Matej Cepl <mcepl@suse.com>
- Add wheel subpackage with the generated wheel for this package
(bsc#1176262, CVE-2019-20916).
- Make wheel a separate build run to avoid the setuptools/wheel build
cycle.
-------------------------------------------------------------------
Fri Oct 30 00:18:04 UTC 2020 - Benjamin Greiner <code@bnavigator.de>
- Make executables setup compatible with multiple python3 flavors
* gh#openSUSE/python-rpm-macros#66
* update-alternatives for pip3
* use %python_clone and %python_install_alternative for sip and
sip3
* use original bin/sip%{python_bin_suffix} as is
* effect: consistent shebangs and specifiers inside the
entry_point scripts
-------------------------------------------------------------------
Sun Oct 11 13:08:15 UTC 2020 - Benjamin Greiner <code@bnavigator.de>
- Update to 20.2.3
Deprecations and Removals
* Deprecate support for Python 3.5 (#8181)
Features
* Make the setup.py install deprecation warning less
noisy. We warn only when setup.py install succeeded and
setup.py bdist_wheel failed, as situations where both
fails are most probably irrelevant to this deprecation.
(#8752)
- 20.2.2
Bug Fixes
* Only attempt to use the keyring once and if it fails, dont try
again. This prevents spamming users with several keyring unlock
prompts when they cannot unlock or dont want to do so. (#8090)
* Fix regression that distributions in system site-packages are
not correctly found when a virtual environment is configured
with system-site-packages on. (#8695)
* Disable caching for range requests, which causes corrupted
wheels when pip tries to obtain metadata using the feature
fast-deps. (#8701, #8716)
* Always use UTF-8 to read pyvenv.cfg to match the built-in venv.
(#8717)
* 2020 Resolver: Correctly handle marker evaluation in
constraints and exclude them if their markers do not match the
current environment. (#8724)
- 20.2.1
Features
* Ignore require-virtualenv in pip list (#8603)
Bug Fixes
* Correctly find already-installed distributions with dot (.) in
the name and uninstall them when needed. (#8645)
* Trace a better error message on installation failure due to
invalid .data files in wheels. (#8654)
* Fix SVN version detection for alternative SVN distributions.
(#8665)
* New resolver: Correctly include the base package when specified
with extras in --no-deps mode. (#8677)
* Use UTF-8 to handle ZIP archive entries on Python 2 according
to PEP 427, so non-ASCII paths can be resolved as expected.
(#8684)
Improved Documentation
* Add details on old resolver deprecation and removal to
migration documentation. (#8371)
* Fix feature flag name in docs. (#8660)
- 20.2 (2020-07-29)
Deprecations and Removals
* Deprecate setup.py-based builds that do not generate an .egg-
info directory. (#6998, #8617)
* Disallow passing install-location-related arguments in --
install-options. (#7309)
* Add deprecation warning for invalid requirements format
“base>=1.0[extra]” (#8288)
* Deprecate legacy setup.py install when building a wheel failed
for source distributions without pyproject.toml (#8368)
* Deprecate -b/--build/--build-dir/--build-directory. Its current
behaviour is confusing and breaks in case different versions of
the same distribution need to be built during the resolution
process. Using the TMPDIR/TEMP/TMP environment variable,
possibly combined with --no-clean covers known use cases.
(#8372)
* Remove undocumented and deprecated option --always-unzip
(#8408)
Features
* Log debugging information about pip, in pip install --verbose.
(#3166)
* Refine error messages to avoid showing Python tracebacks when
an HTTP error occurs. (#5380)
* Install wheel files directly instead of extracting them to a
temp directory. (#6030)
* Add a beta version of pips next-generation dependency
resolver.
* Move pips new resolver into beta, remove the --unstable-
feature=resolver flag, and enable the --use-feature=2020-
resolver flag. The new resolver is significantly stricter and
more consistent when it receives incompatible instructions, and
reduces support for certain kinds of Constraints Files, so some
workarounds and workflows may break. More details about how to
test and migrate, and how to report issues, at Changes to the
pip dependency resolver in 20.2 (2020) . Maintainers are
preparing to release pip 20.3, with the new resolver on by
default, in October. (#6536)
* Introduce a new ResolutionImpossible error, raised when pip
encounters un-satisfiable dependency conflicts (#8546, #8377)
* Add a subcommand debug to pip config to list available
configuration sources and the key-value pairs defined in them.
(#6741)
* Warn if index pages have unexpected content-type (#6754)
* Allow specifying --prefer-binary option in a requirements file (#7693)
* Generate PEP 376 REQUESTED metadata for user supplied
requirements installed by pip. (#7811)
* Warn if package url is a vcs or an archive url with invalid
scheme (#8128)
* Parallelize network operations in pip list. (#8504)
* Allow the new resolver to obtain dependency information through
wheels lazily downloaded using HTTP range requests. To enable
this feature, invoke pip with --use-feature=fast-deps. (#8588)
* Support --use-feature in requirements files (#8601)
* Bug Fixes
* Use canonical package names while looking up already installed
packages. (#5021)
* Fix normalizing path on Windows when installing package on
another logical disk. (#7625)
* The VCS commands run by pip as subprocesses dont merge stdout
and stderr anymore, improving the output parsing by subsequent
commands. (#7968)
* Correctly treat non-ASCII entry point declarations in wheels so
they can be installed on Windows. (#8342)
* Update author email in config and tests to reflect
decommissioning of pypa-dev list. (#8454)
* Headers provided by wheels in .data directories are now
correctly installed into the user-provided locations, such as
--prefix, instead of the virtual environment pip is running in.
(#8521)
Vendored Libraries
* Vendored htmlib5 no longer imports deprecated
xml.etree.cElementTree on Python 3.
* Upgrade appdirs to 1.4.4
* Upgrade certifi to 2020.6.20
* Upgrade distlib to 0.3.1
* Upgrade html5lib to 1.1
* Upgrade idna to 2.10
* Upgrade packaging to 20.4
* Upgrade requests to 2.24.0
* Upgrade six to 1.15.0
* Upgrade toml to 0.10.1
* Upgrade urllib3 to 1.25.9
Improved Documentation
* Add --no-input option to pip docs (#7688)
* List of options supported in requirements file are extracted
from source of truth, instead of being maintained manually.
(#7908)
* Fix pip config docstring so that the subcommands render
correctly in the docs (#8072)
* replace links to the old pypa-dev mailing list with https://
mail.python.org/mailman3/lists/distutils-sig.python.org/
(#8353)
* Fix example for defining multiple values for options which
support them (#8373)
* Add documentation for the ResolutionImpossible error that helps
the user fix dependency conflicts (#8459)
* Add feature flags to docs (#8512)
* Document how to install package extras from git branch and
source distributions. (#8576)
- 20.2b1
Bug Fixes
* Correctly treat wheels containing non-ASCII file contents so
they can be installed on Windows. (#5712)
* Prompt the user for password if the keyring backend doesnt
return one (#7998)
Improved Documentation
* Add GitHub issue template for reporting when the dependency
resolver fails (#8207)
- 20.1.1
Deprecations and Removals
* Revert building of local directories in place, restoring the
pre-20.1 behaviour of copying to a temporary directory. (#7555)
* Drop parallelization from pip list --outdated. (#8167)
Bug Fixes
* Fix metadata permission issues when umask has the executable
bit set. (#8164)
* Avoid unnecessary message about the wheel package not being
installed when a wheel would not have been built. Additionally,
clarify the message. (#8178)
- 20.1
Process
* Document that pip 21.0 will drop support for Python 2.7.
Features
* Add pip cache dir to show the cache directory. (#7350)
Bug Fixes
* Abort pip cache commands early when cache is disabled. (#8124)
* Correctly set permissions on metadata files during wheel
installation, to permit non-privileged users to read from
system site-packages. (#8139)
- 20.1b1
Deprecations and Removals
* Remove emails from AUTHORS.txt to prevent usage for spamming,
and only populate names in AUTHORS.txt at time of release
(#5979)
* Remove deprecated --skip-requirements-regex option. (#7297)
* Building of local directories is now done in place, instead of
a temporary location containing a copy of the directory tree.
(#7555)
* Remove unused tests/scripts/test_all_pip.py test script and the
tests/scripts folder. (#7680)
Features
* pip now implements PEP 610, so pip freeze has better fidelity
in presence of distributions installed from Direct URL
requirements. (#609)
* Add pip cache command for inspecting/managing pips wheel
cache. (#6391)
* Raise error if --user and --target are used together in pip
install (#7249)
* Significantly improve performance when --find-links points to a
very large HTML page. (#7729)
* Indicate when wheel building is skipped, due to lack of the
wheel package. (#7768)
* Change default behaviour to always cache responses from
trusted-host source. (#7847)
* An alpha version of a new resolver is available via --unstable-
feature=resolver. (#988)
Bug Fixes
* Correctly freeze a VCS editable package when it is nested
inside another VCS repository. (#3988)
* Correctly handle %2F in URL parameters to avoid accidentally
unescape them into /. (#6446)
* Reject VCS URLs with an empty revision. (#7402)
* Warn when an invalid URL is passed with --index-url (#7430)
* Use better mechanism for handling temporary files, when
recording metadata about installed files (RECORD) and the
installer (INSTALLER). (#7699)
* Correctly detect global site-packages availability of virtual
environments created by PyPAs virtualenv>=20.0. (#7718)
* Remove current directory from sys.path when invoked as
python -m pip <command> (#7731)
* Stop failing uninstallation, when trying to remove non-
existent files. (#7856)
* Prevent an infinite recursion with pip wheel when $TMPDIR is
within the source directory. (#7872)
* Significantly speedup pip list --outdated by parallelizing
index interaction. (#7962)
* Improve Windows compatibility when detecting writability in
folder. (#8013)
Vendored Libraries
* Update semi-supported debundling script to reflect that
appdirs is vendored.
* Add ResolveLib as a vendored dependency.
* Upgrade certifi to 2020.04.05.1
* Upgrade contextlib2 to 0.6.0.post1
* Upgrade distro to 1.5.0.
* Upgrade idna to 2.9.
* Upgrade msgpack to 1.0.0.
* Upgrade packaging to 20.3.
* Upgrade pep517 to 0.8.2.
* Upgrade pyparsing to 2.4.7.
* Remove pytoml as a vendored dependency.
* Upgrade requests to 2.23.0.
* Add toml as a vendored dependency.
* Upgrade urllib3 to 1.25.8.
Improved Documentation
* Emphasize that VCS URLs using git, git+git and git+http are
insecure due to lack of authentication and encryption (#1983)
* Clarify the usage of --no-binary command. (#3191)
* Clarify the usage of freeze command in the example of Using pip in your program (#7008)
* Add a “Copyright” page. (#7767)
* Added example of defining multiple values for options which
support them (#7803)
- Test on test flavor without installing package
- Update pip-shipped-requests-cabundle.patch for newer certifi
-------------------------------------------------------------------
Thu Mar 19 09:42:10 UTC 2020 - Tomáš Chvátal <tchvatal@suse.com>
- Skip virtualenv tests that are pinned to old virtualenv 16
-------------------------------------------------------------------
Wed Feb 5 10:19:17 UTC 2020 - Ondřej Súkup <mimi.vx@gmail.com>
- update to 20.0.2
- add setuptools-45.1.0-py3-none-any.whl for testsuite
- drop pytest5.patch
* 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).
* Fix case sensitive comparison of pip freeze when used with -r option.
* Enforce PEP 508 requirement format in pyproject.toml build-system.requires.
* Make ensure_dir() also ignore ENOTEMPTY as seen on Windows.
* Fix building packages which specify backend-path in pyproject.toml.
* Do not attempt to run setup.py clean after a pep517 build error, since a setup.py may not exist in that case.
* Fix passwords being visible in the index-url in "Downloading <url>" message.
* Change method from shutil.remove to shutil.rmtree in noxfile.py.
* Skip running tests which require subversion, when svn isn't installed
* Fix not sending client certificates when using --trusted-host.
* Make sure pip wheel never outputs pure python wheels with a python implementation tag. Better fix/workaround for #3025 by using a per-implementation wheel cache instead of caching pure python wheels with an implementation tag in their name.
* Include subdirectory URL fragments in cache keys.
* Fix typo in warning message when any of --build-option, --global-option and --install-option is used in requirements.txt
* Fix the logging of cached HTTP response shown as downloading.
* Effectively disable the wheel cache when it is not writable, as is the case with the http cache.
* Correctly handle relative cache directory provided via --cache-dir.
*
-------------------------------------------------------------------
Fri Oct 18 11:28:38 UTC 2019 - Marketa Calabkova <mcalabkova@suse.com>
- Update to version 19.3.1
* Document Python 3.8 support.
* Fix bug that prevented installation of PEP 517 packages without setup.py.
* Remove undocumented support for un-prefixed URL requirements pointing to SVN repositories.
* Remove the deprecated --venv option from pip config.
* Make pip show warn about packages not found.
* Abort installation if any archive contains a file which would be placed outside the extraction location.
* pip's CLI completion code no longer prints a Traceback if it is interrupted.
* Ignore errors copying socket files for local source installs (in Python 3).
* Skip copying .tox and .nox directories to temporary build directories
* Ignore "require_virtualenv" in pip config
-------------------------------------------------------------------
Tue Aug 13 08:19:21 UTC 2019 - mimi.vx@gmail.com
- Update to version 19.2.2:
* Merge pull request #6827 from cjerdonek/issue-6804-find-links-expansion
* Fix handling of tokens (single part credentials) in URLs (#6818)
* Simplify the handling of "typing.cast"
-------------------------------------------------------------------
Thu Aug 08 13:57:29 UTC 2019 - mimi.vx@gmail.com
- Update to version 19.2.1:
* Fix a ``NoneType`` ``AttributeError`` when evaluating hashes and no hashes provided
* Drop support for EOL Python 3.4.
* Credentials will now be loaded using keyring when installed
* Fully support using --trusted-host inside requirements files
* Update timestamps in pip's --log file to include milliseconds
* Respect whether a file has been marked as "yanked" from a simple repository (see PEP 592 for details)
* When choosing candidates to install, prefer candidates with a hash matching one of the user-provided hashes
* Improve the error message when METADATA or PKG-INFO is None when accessing metadata
* Add a new command pip debug that can display e.g. the list of compatible tags for the current Python
* Display hint on installing with --pre when search results include pre-release versions
* Report to Warehouse that pip is running under CI if the PIP_IS_CI environment variable is set
* Allow --python-version to be passed as a dotted version string (e.g. 3.7 or 3.7.3)
* Log the final filename and SHA256 of a .whl file when done building a wheel
* Include the wheel's tags in the log message explanation when a candidate wheel link is found incompatible
* Add a --path argument to pip freeze to support --target installations
* Add a --path argument to pip list to support --target installations
-------------------------------------------------------------------
Mon Jul 22 08:24:11 UTC 2019 - Tomáš Chvátal <tchvatal@suse.com>
- Add patch to build with pytest5, also sent upstream:
* pytest5.patch
-------------------------------------------------------------------
Wed May 15 14:15:56 UTC 2019 - Matej Cepl <mcepl@cepl.eu>
- Update to version 19.1.1+git.1557777841.63878672:
* Update news file to match usual style
* fix-5963: assert error message
* Simplify CandidateEvaluator.evaluate_link().
* Fix 6486 mac gitignore (#6487)
* Store instances in the VcsSupport registry instead of classes.
* Remove unused cls argument from VcsSupport.unregister().
* fix-5963: Add news file
* fix-5963: fail elegantly on missing name or section in config set / unset
* Remove unnecessary slices.
* Fix typo.
-------------------------------------------------------------------
Wed May 15 15:35:34 CEST 2019 - Matej Cepl <mcepl@suse.com>
- Switch to multibuild, so testing is separate from the building
of the package itself.
-------------------------------------------------------------------
Sat May 11 13:41:41 UTC 2019 - Matej Cepl <mcepl@cepl.eu>
- 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.
-------------------------------------------------------------------
Fri May 10 23:17:02 CEST 2019 - Matej Cepl <mcepl@suse.com>
- 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)
- Include in pip's User-Agent string whether it looks like pip
is running under CI. (#5499)
- A custom (JSON-encoded) string can now be added to pip's
User-Agent using the PIP_USER_AGENT_USER_DATA environment
variable. (#5549)
- For consistency, passing --no-cache-dir no longer affects
whether wheels will be built. In this case, a temporary
directory is used. (#5749)
- Command arguments in subprocess log messages are now quoted
using shlex.quote(). (#6290)
- Prefix warning and error messages in log output with WARNING
and ERROR. (#6298)
- Using --build-options in a PEP 517 build now fails with an
error, rather than silently ignoring the option. (#6305)
- Error out with an informative message if one tries to install
a pyproject.toml-style (PEP 517) source tree using --editable
mode. (#6314)
- When downloading a package, the ETA and average speed now
only update once per second for better legibility. (#6319)
- The stdout and stderr from VCS commands run by pip as
subprocesses (e.g. git, hg, etc.) no longer pollute pip's
stdout. (#1219)
- Fix handling of requests exceptions when dependencies are
debundled. (#4195)
- Make pip's self version check avoid recommending upgrades to
prereleases if the currently-installed version is stable.
(#5175)
- Fixed crash when installing a requirement from a URL that
comes from a dependency without a URL. (#5889)
- Improve handling of file URIs: correctly handle
file://localhost/... and don't try to use UNC paths on Unix.
(#5892)
- Fix utils.encoding.auto_decode() LookupError with invalid
encodings. utils.encoding.auto_decode() was broken when
decoding Big Endian BOM byte-strings on Little Endian or vice
versa. (#6054)
- Fix incorrect URL quoting of IPv6 addresses. (#6285)
- Redact the password from the extra index URL when using pip
-v. (#6295)
- The spinner no longer displays a completion message after
subprocess calls not needing a spinner. It also no longer
incorrectly reports an error after certain subprocess calls
to Git that succeeded. (#6312)
- Fix the handling of editable mode during installs when
pyproject.toml is present but PEP 517 doesn't require the
source tree to be treated as pyproject.toml-style. (#6370)
- Fix NameError when handling an invalid requirement. (#6419)
- Make dashes render correctly when displaying long options
like --find-links in the text. (#6422)
-------------------------------------------------------------------
Sun Mar 10 16:35:47 UTC 2019 - Arun Persaud <arun@gmx.de>
- update to version 19.0.3:
* Fix an IndexError crash when a legacy build of a wheel
fails. (#6252)
* Fix a regression introduced in 19.0.2 where the filename in a
RECORD file of an installed file would not be updated when
installing a wheel. (#6266)
-------------------------------------------------------------------
Tue Feb 12 10:06:06 UTC 2019 - Jan Engelhardt <jengelh@inai.de>
- Avoid name repetition in summary. Summary should not be a
sentence (let alone three).
-------------------------------------------------------------------
Mon Feb 11 13:54:34 UTC 2019 - Hans-Peter Jansen <hpj@urpla.net>
- Update to 19.0.2 (2019-02-09):
+ Bug Fixes
* Fix a crash where PEP 517-based builds using --no-cache-dir
would fail in some circumstances with an AssertionError due
to not finalizing a build directory internally. (#6197)
* Provide a better error message if attempting an editable
install of a directory with a pyproject.toml but no setup.py.
(#6170)
* The implicit default backend used for projects that provide a
pyproject.toml file without explicitly specifying build-
backend now behaves more like direct execution of setup.py,
and hence should restore compatibility with projects that
were unable to be installed with pip 19.0. This raised the
minimum required version of setuptools for such builds to
40.8.0. (#6163)
* Allow RECORD lines with more than three elements, and display
a warning. (#6165)
* AdjacentTempDirectory fails on unwritable directory instead
of locking up the uninstall command. (#6169)
* Make failed uninstalls roll back more reliably and better at
avoiding naming conflicts. (#6194)
* Ensure the correct wheel file is copied when building PEP 517
distribution is built. (#6196)
* The Python 2 end of life warning now only shows on CPython,
which is the implementation that has announced end of life
plans. (#6207)
+ Improved Documentation
* Re-write README and documentation index (#5815)
- Update to 19.0.1 (2019-01-23):
+ Bug Fixes
* Fix a crash when using no-cache-dir with PEP 517
distributions (#6158, #6171)
- Update to 19.0 (2019-01-22):
+ Deprecations and Removals
* Deprecate support for Python 3.4 (#6106)
* Start printing a warning for Python 2.7 to warn of impending
Python 2.7 End-of-life and prompt users to start migrating to
Python 3. (#6148)
* Remove the deprecated --process-dependency-links option.
(#6060)
* Remove the deprecated SVN editable detection based on
dependency links during freeze. (#5866)
+ Features
* Implement PEP 517 (allow projects to specify a build backend
via pyproject.toml). (#5743)
* Implement manylinux2010 platform tag support. manylinux2010
is the successor to manylinux1. It allows carefully compiled
binary wheels to be installed on compatible Linux platforms.
(#5008)
* Improve build isolation: handle .pth files, so namespace
packages are correctly supported under Python 3.2 and
earlier. (#5656)
* Include the package name in a freeze warning if the package
is not installed. (#5943)
* Warn when dropping an --[extra-]index-url value that points
to an existing local directory. (#5827)
* Prefix pips --log file lines with their timestamp. (#6141)
+ Bug Fixes
* Avoid creating excessively long temporary paths when
uninstalling packages. (#3055)
* Redact the password from the URL in various log messages.
(#4746, #6124)
* Avoid creating excessively long temporary paths when
uninstalling packages. (#3055)
* Avoid printing a stack trace when given an invalid
requirement. (#5147)
* Present 401 warning if username/password do not work for URL
(#4833)
* Handle requests.exceptions.RetryError raised in PackageFinder
that was causing pip to fail silently when some indexes were
unreachable. (#5270, #5483)
* Handle a broken stdout pipe more gracefully (e.g. when
running pip list | head). (#4170)
* Fix crash from setting PIP_NO_CACHE_DIR=yes. (#5385)
* Fix crash from unparseable requirements when checking
installed packages. (#5839)
* Fix content type detection if a directory named like an
archive is used as a package source. (#5838)
* Fix listing of outdated packages that are not dependencies of
installed packages in pip list --outdated --not-required
(#5737)
* Fix sorting TypeError in move_wheel_files() when installing
some packages. (#5868)
* Fix support for invoking pip using python src/pip ....
(#5841)
* Greatly reduce memory usage when installing wheels containing
large files. (#5848)
* Editable non-VCS installs now freeze as editable. (#5031)
* Editable Git installs without a remote now freeze as
editable. (#4759)
* Canonicalize sdist file names so they can be matched to a
canonicalized package name passed to pip install. (#5870)
* Properly decode special characters in SVN URL credentials.
(#5968)
* Make PIP_NO_CACHE_DIR disable the cache also for truthy
values like "true", "yes", "1", etc. (#5735)
+ Vendored Libraries
* Include license text of vendored 3rd party libraries. (#5213)
* Update certifi to 2018.11.29
* Update colorama to 0.4.1
* Update distlib to 0.2.8
* Update idna to 2.8
* Update packaging to 19.0
* Update pep517 to 0.5.0
* Update pkg_resources to 40.6.3 (via setuptools)
* Update pyparsing to 2.3.1
* Update pytoml to 0.1.20
* Update requests to 2.21.0
* Update six to 1.12.0
* Update urllib3 to 1.24.1
+ Improved Documentation
* Include the Vendoring Policy in the documentation. (#5958)
* Add instructions for running pip from source to Development
documentation. (#5949)
* Remove references to removed #egg=<name>-<version>
functionality (#5888)
* Fix omission of command name in HTML usage documentation
(#5984)
- Fix patch pip-8.1.2-shipped-requests-cabundle.patch
this version is long gone
- Rename patch to pip-shipped-requests-cabundle.patch
- Fix and show shebang removal
-------------------------------------------------------------------
Thu Dec 6 13:19:11 UTC 2018 - Tomáš Chvátal <tchvatal@suse.com>
- Fix fdupes call
-------------------------------------------------------------------
Sat Oct 20 15:36:00 UTC 2018 - Arun Persaud <arun@gmx.de>
- specfile:
* remove devel from noarch
- update to version 18.1:
* Features
+ Allow PEP 508 URL requirements to be used as dependencies.
+ As a security measure, pip will raise an exception when
installing packages from PyPI if those packages depend on
packages not also hosted on PyPI. In the future, PyPI will block
uploading packages with such external URL dependencies
directly. (#4187)
+ Upgrade pyparsing to 2.2.1. (#5013)
+ Allows dist options (abi, python-version, platform,
implementation) when installing with target (#5355)
+ Support passing svn+ssh URLs with a username to pip install
-e. (#5375)
+ pip now ensures that the RECORD file is sorted when installing
from a wheel file. (#5525)
+ Add support for Python 3.7. (#5561)
+ Malformed configuration files now show helpful error messages,
instead of tracebacks. (#5798)
* Bug Fixes
+ Checkout the correct branch when doing an editable Git
install. (#2037)
+ Run self-version-check only on commands that may access the
index, instead of trying on every run and failing to do so due
to missing options. (#5433)
+ Allow a Git ref to be installed over an existing
installation. (#5624)
+ Show a better error message when a configuration option has an
invalid value. (#5644)
+ Always revalidate cached simple API pages instead of blindly
caching them for up to 10 minutes. (#5670)
+ Avoid caching self-version-check information when cache is
disabled. (#5679)
+ Avoid traceback printing on autocomplete after flags in the
CLI. (#5751)
+ Fix incorrect parsing of egg names if pip needs to guess the
package name. (#5819)
* Vendored Libraries
+ Upgrade certifi to 2018.8.24
+ Upgrade packaging to 18.0
+ Add pep517 version 0.2
+ Upgrade pytoml to 0.1.19
+ Upgrade pkg_resources to 40.4.3 (via setuptools)
* Improved Documentation
+ Fix “Requirements Files” reference in User Guide
(#user_guide_fix_requirements_file_ref)
-------------------------------------------------------------------
Mon Jul 23 21:03:56 UTC 2018 - mimi.vx@gmail.com
- update to 18.0
- refresh pip-8.1.2-shipped-requests-cabundle.patch
* drop python 3.3 support
* Remove the legacy format from pip list.
* Remove support for cleaning up #egg fragment postfixes
* Remove the shim for the old get-pip.py location
* Introduce a new --prefer-binary flag, to prefer older wheels
over newer source packages.
* Improve autocompletion function on file name completion
* Add support for installing PEP 518 build dependencies from source
* Improve status message when upgrade is skipped due to only-if-needed strategy
-------------------------------------------------------------------
Fri Apr 20 07:48:59 UTC 2018 - mimi.vx@gmail.com
- update to 10.0.1
- refactor pip-8.1.2-shipped-requests-cabundle.patch
* Switch the default repository to the new "PyPI 2.0" running at https://pypi.org/
* big bunch of changes from 9.0.1 in NEWS.rst
-------------------------------------------------------------------
Wed Mar 29 13:52:06 UTC 2017 - jmatejek@suse.com
- uninstall alternatives in %postun
-------------------------------------------------------------------
Thu Feb 23 15:31:57 UTC 2017 - jmatejek@suse.com

View File

@ -1,7 +1,7 @@
#
# spec file
# spec file for package python-pip
#
# Copyright (c) 2022 SUSE LLC
# Copyright (c) 2017 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
@ -12,87 +12,45 @@
# 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/
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
%if 0%{?suse_version} > 1500
%bcond_without libalternatives
%else
%bcond_with libalternatives
%endif
# NOTE(saschpe): git invocation and pythonpath issues with testrepository
# enable testing with a build conditional (off by default):
%bcond_with test
%{?!python_module:%define python_module() python3-%{**}}
%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
Name: python-pip%{psuffix}
Version: 22.0.4
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-pip
Version: 9.0.1
Release: 0
Summary: A Python package management system
Url: http://www.pip-installer.org
Summary: Pip installs packages. Python packages. An easy_install replacement
License: MIT
URL: http://www.pip-installer.org
# 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}
Group: Development/Languages/Python
Source: https://pypi.io/packages/source/p/pip/pip-%{version}.tar.gz
Patch0: pip-8.1.2-shipped-requests-cabundle.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: %{python_module devel}
BuildRequires: %{python_module setuptools}
BuildRequires: fdupes
BuildRequires: python-rpm-macros >= 20210929
BuildRequires: python-rpm-macros
%if %{with test}
# Test requirements:
BuildRequires: %{python_module mock}
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module scripttest >= 1.3}
BuildRequires: %{python_module virtualenv >= 1.10}
%endif
Requires: ca-certificates
Requires: coreutils
Requires: python-setuptools
Requires: python-xml
%if %{with libalternatives}
Requires: alts
BuildRequires: alts
%else
Requires(post): update-alternatives
Requires(postun):update-alternatives
%endif
Recommends: ca-certificates-mozilla
Requires(post): update-alternatives
Requires(postun): update-alternatives
BuildArch: noarch
%if %{with test}
# Test requirements:
BuildRequires: %{python_module PyYAML}
BuildRequires: %{python_module Werkzeug}
BuildRequires: %{python_module cryptography}
BuildRequires: %{python_module csv23}
BuildRequires: %{python_module docutils}
BuildRequires: %{python_module freezegun}
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}
%if 0%{?suse_version} <= 1500
BuildRequires: %{python_module mock}
%endif
BuildRequires: ca-certificates
BuildRequires: git-core
%endif
%if %{with wheel}
BuildRequires: %{python_module wheel}
%endif
%python_subpackages
%description
@ -100,100 +58,62 @@ 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
%setup -q -n pip-%{version}
%patch0 -p1
find pip/_vendor -name *.py -exec \
sed -i "s|#!/usr/bin/env python||g" {} ";" # Fix non-executable script
#sed -i "s|#!/usr/bin/env python||g" pip/__init__.py # Fix non-executable script
rm pip/_vendor/requests/cacert.pem
%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
%prepare_alternative pip
%fdupes %{buildroot}%{_prefix}
%if %{with test}
%check
export PYTHONPATH=$(pwd)/build/lib
# no network on OBS
donttest="test_network or test_remote_reqs_parse"
# incompatible virtualenv version
donttest+=" or test_build_env_allow_only_one_install"
donttest+=" or test_build_env_isolation"
donttest+=" or test_build_env_requirements_check"
donttest+=" or test_build_env_overlay_prefix_has_priority"
donttest+=" or test_should_cache_git_sha"
# incompatible virtualenv version and no coverage wheel in common_wheels
donttest+=" or test_from_link_vcs_with_source_dir_obtains_commit_id"
donttest+=" or test_from_link_vcs_without_source_dir"
%pytest -k "not ($donttest)" tests/unit
%python_exec setup.py test
%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
# 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
%python_uninstall_alternative pip
%python_uninstall_alternative pip3
%preun
%ifpypy3
%uninstall_alternative pip %{_bindir}/pip-%{pypy3_bin_suffix}
%else
%uninstall_alternative pip %{_bindir}/pip%{python_version}
%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
%defattr(-,root,root,-)
%doc AUTHORS.txt CHANGES.txt LICENSE.txt README.rst
%{_bindir}/pip
%python2_only %{_bindir}/pip2
%python3_only %{_bindir}/pip3
%ifpypy3
%{_bindir}/pip-%{pypy3_bin_suffix}
%else
%python_alternative %{_bindir}/pip3
%{_bindir}/pip%{python_version}
%endif
%{_bindir}/pip%{python_bin_suffix}
%{python_sitelib}/pip-%{version}*-info
%ghost %{_sysconfdir}/alternatives/pip
%{python_sitelib}/pip-%{version}-py%{python_version}.egg-info
%{python_sitelib}/pip
%endif
%if %{with wheel}
%dir %{python_sitelib}/../wheels
%{python_sitelib}/../wheels/*
%endif
%changelog