Update to 19.0.2 (#1668492)

This commit is contained in:
Miro Hrončok 2019-02-13 11:56:20 +01:00
parent 3af98288df
commit bbe9e6d297
6 changed files with 122 additions and 87 deletions

2
.gitignore vendored
View File

@ -28,3 +28,5 @@ pip-0.7.2.tar.gz
/d2e63fbfc62af3b7050f619b2f5bb8658985b931.tar.gz
/pip-18.1.tar.gz
/pip-18.1-tests.tar.gz
/pip-19.0.2.tar.gz
/pip-19.0.2-tests.tar.gz

View File

@ -1,8 +1,8 @@
diff --git a/src/pip/_internal/commands/install.py b/src/pip/_internal/commands/install.py
index 6fc178f..1279d4a 100644
index 1c244d2..4b07ec0 100644
--- a/src/pip/_internal/commands/install.py
+++ b/src/pip/_internal/commands/install.py
@@ -115,6 +115,14 @@ class InstallCommand(RequirementCommand):
@@ -109,6 +109,14 @@ class InstallCommand(RequirementCommand):
default=None,
help="Installation prefix where lib, bin and other top-level "
"folders are placed")
@ -17,7 +17,7 @@ index 6fc178f..1279d4a 100644
cmd_opts.add_option(cmdoptions.build_dir())
@@ -364,6 +372,7 @@ class InstallCommand(RequirementCommand):
@@ -391,6 +399,7 @@ class InstallCommand(RequirementCommand):
pycompile=options.compile,
warn_script_location=warn_script_location,
use_user_site=options.use_user_site,
@ -26,19 +26,20 @@ index 6fc178f..1279d4a 100644
lib_locations = get_lib_location_guesses(
diff --git a/src/pip/_internal/req/req_install.py b/src/pip/_internal/req/req_install.py
index c2624fe..922d10c 100644
index a4834b0..d21530a 100644
--- a/src/pip/_internal/req/req_install.py
+++ b/src/pip/_internal/req/req_install.py
@@ -370,7 +370,7 @@ class InstallRequirement(object):
def move_wheel_files(self, wheeldir, root=None, home=None, prefix=None,
warn_script_location=True, use_user_site=False,
- pycompile=True):
+ pycompile=True, strip_file_prefix=None):
@@ -431,7 +431,8 @@ class InstallRequirement(object):
prefix=None, # type: Optional[str]
warn_script_location=True, # type: bool
use_user_site=False, # type: bool
- pycompile=True # type: bool
+ pycompile=True, # type: bool
+ strip_file_prefix=None # type: Optional[str]
):
# type: (...) -> None
move_wheel_files(
self.name, self.req, wheeldir,
user=use_user_site,
@@ -380,6 +380,7 @@ class InstallRequirement(object):
@@ -443,6 +444,7 @@ class InstallRequirement(object):
pycompile=pycompile,
isolated=self.isolated,
warn_script_location=warn_script_location,
@ -46,16 +47,17 @@ index c2624fe..922d10c 100644
)
# Things valid for sdists
@@ -743,7 +744,7 @@ class InstallRequirement(object):
def install(self, install_options, global_options=None, root=None,
home=None, prefix=None, warn_script_location=True,
- use_user_site=False, pycompile=True):
+ use_user_site=False, pycompile=True, strip_file_prefix=None):
@@ -894,7 +896,8 @@ class InstallRequirement(object):
prefix=None, # type: Optional[str]
warn_script_location=True, # type: bool
use_user_site=False, # type: bool
- pycompile=True # type: bool
+ pycompile=True, # type: bool
+ strip_file_prefix=None # type: Optional[str]
):
# type: (...) -> None
global_options = global_options if global_options is not None else []
if self.editable:
self.install_editable(
@@ -758,6 +759,7 @@ class InstallRequirement(object):
@@ -911,6 +914,7 @@ class InstallRequirement(object):
self.source_dir, root=root, prefix=prefix, home=home,
warn_script_location=warn_script_location,
use_user_site=use_user_site, pycompile=pycompile,
@ -64,28 +66,45 @@ index c2624fe..922d10c 100644
self.install_succeeded = True
return
diff --git a/src/pip/_internal/wheel.py b/src/pip/_internal/wheel.py
index 5ce890e..c42d77a 100644
index 700b180..3655bd4 100644
--- a/src/pip/_internal/wheel.py
+++ b/src/pip/_internal/wheel.py
@@ -206,7 +206,7 @@ def message_about_scripts_not_on_PATH(scripts):
def move_wheel_files(name, req, wheeldir, user=False, home=None, root=None,
pycompile=True, scheme=None, isolated=False, prefix=None,
- warn_script_location=True):
+ warn_script_location=True, strip_file_prefix=None):
@@ -265,6 +265,7 @@ def get_csv_rows_for_installed(
changed, # type: set
generated, # type: List[str]
lib_dir, # type: str
+ strip_file_prefix=None, # type: Optional[str]
):
# type: (...) -> List[InstalledCSVRow]
installed_rows = [] # type: List[InstalledCSVRow]
@@ -282,7 +283,11 @@ def get_csv_rows_for_installed(
installed_rows.append(tuple(row))
for f in generated:
digest, length = rehash(f)
- installed_rows.append((normpath(f, lib_dir), digest, str(length)))
+ final_path = normpath(f, lib_dir)
+ if strip_file_prefix and final_path.startswith(strip_file_prefix):
+ final_path = os.path.join(os.sep,
+ os.path.relpath(final_path, strip_file_prefix))
+ installed_rows.append((final_path, digest, str(length)))
for f in installed:
installed_rows.append((installed[f], '', ''))
return installed_rows
@@ -299,7 +304,8 @@ def move_wheel_files(
scheme=None, # type: Optional[Mapping[str, str]]
isolated=False, # type: bool
prefix=None, # type: Optional[str]
- warn_script_location=True # type: bool
+ warn_script_location=True, # type: bool
+ strip_file_prefix=None # type: Optional[str]
):
# type: (...) -> None
"""Install a wheel"""
if not scheme:
@@ -508,7 +508,11 @@ if __name__ == '__main__':
outrows.append(tuple(row))
for f in generated:
digest, length = rehash(f)
- outrows.append((normpath(f, lib_dir), digest, length))
+ final_path = normpath(f, lib_dir)
+ if strip_file_prefix and final_path.startswith(strip_file_prefix):
+ final_path = os.path.join(os.sep,
+ os.path.relpath(final_path, strip_file_prefix))
+ outrows.append((final_path, digest, length))
for f in installed:
outrows.append((installed[f], '', ''))
for row in sorted(outrows):
@@ -598,6 +604,7 @@ if __name__ == '__main__':
outrows = get_csv_rows_for_installed(
reader, installed=installed, changed=changed,
generated=generated, lib_dir=lib_dir,
+ strip_file_prefix=strip_file_prefix
)
writer = csv.writer(record_out)
# Sort to simplify testing.

View File

@ -1,8 +1,8 @@
diff --git a/src/pip/_vendor/certifi/core.py b/src/pip/_vendor/certifi/core.py
index eab9d1d..30db215 100644
index 2d02ea4..b1e4975 100644
--- a/src/pip/_vendor/certifi/core.py
+++ b/src/pip/_vendor/certifi/core.py
@@ -19,9 +19,7 @@ class DeprecatedBundleWarning(DeprecationWarning):
@@ -11,9 +11,7 @@ import os
def where():
@ -12,4 +12,4 @@ index eab9d1d..30db215 100644
+ return '/etc/pki/tls/certs/ca-bundle.crt'
def old_where():
if __name__ == '__main__':

View File

@ -22,8 +22,8 @@
Name: python-%{srcname}
# When updating, update the bundled libraries versions bellow!
# You can use vendor_meta.sh in the dist git repo
Version: 18.1
Release: 3%{?dist}
Version: 19.0.2
Release: 1%{?dist}
Summary: A tool for installing and managing Python packages
# We bundle a lot of libraries with pip, which itself is under MIT license.
@ -63,6 +63,8 @@ BuildArch: noarch
BuildRequires: /usr/bin/git
BuildRequires: /usr/bin/bzr
BuildRequires: /usr/bin/svn
BuildRequires: python-setuptools-wheel
BuildRequires: python-wheel-wheel
%endif
# to get tests:
@ -129,27 +131,27 @@ Packages" or "Pip Installs Python".
# You can find the versions in pip/_vendor/vendor.txt file.
%global bundled() %{expand:
Provides: bundled(python%{1}dist(appdirs)) = 1.4.3
Provides: bundled(python%{1}dist(distlib)) = 0.2.7
Provides: bundled(python%{1}dist(CacheControl)) = 0.12.5
Provides: bundled(python%{1}dist(certifi)) = 2018.11.29
Provides: bundled(python%{1}dist(chardet)) = 3.0.4
Provides: bundled(python%{1}dist(colorama)) = 0.4.1
Provides: bundled(python%{1}dist(distlib)) = 0.2.8
Provides: bundled(python%{1}dist(distro)) = 1.3.0
Provides: bundled(python%{1}dist(html5lib)) = 1.0.1
Provides: bundled(python%{1}dist(six)) = 1.11.0
Provides: bundled(python%{1}dist(colorama)) = 0.3.9
Provides: bundled(python%{1}dist(CacheControl)) = 0.12.5
Provides: bundled(python%{1}dist(msgpack-python)) = 0.5.6
Provides: bundled(python%{1}dist(lockfile)) = 0.12.2
Provides: bundled(python%{1}dist(progress)) = 1.4
Provides: bundled(python%{1}dist(idna)) = 2.8
Provides: bundled(python%{1}dist(ipaddress)) = 1.0.22
Provides: bundled(python%{1}dist(packaging)) = 18.0
Provides: bundled(python%{1}dist(pep517)) = 0.2
Provides: bundled(python%{1}dist(pyparsing)) = 2.2.1
Provides: bundled(python%{1}dist(pytoml)) = 0.1.19
Provides: bundled(python%{1}dist(lockfile)) = 0.12.2
Provides: bundled(python%{1}dist(msgpack)) = 0.5.6
Provides: bundled(python%{1}dist(packaging)) = 19.0
Provides: bundled(python%{1}dist(pep517)) = 0.5.0
Provides: bundled(python%{1}dist(progress)) = 1.4
Provides: bundled(python%{1}dist(pyparsing)) = 2.3.1
Provides: bundled(python%{1}dist(pytoml)) = 0.1.20
Provides: bundled(python%{1}dist(requests)) = 2.21.0
Provides: bundled(python%{1}dist(retrying)) = 1.3.3
Provides: bundled(python%{1}dist(requests)) = 2.19.1
Provides: bundled(python%{1}dist(chardet)) = 3.0.4
Provides: bundled(python%{1}dist(idna)) = 2.7
Provides: bundled(python%{1}dist(urllib3)) = 1.23
Provides: bundled(python%{1}dist(certifi)) = 2018.8.24
Provides: bundled(python%{1}dist(setuptools)) = 40.4.3
Provides: bundled(python%{1}dist(setuptools)) = 40.6.3
Provides: bundled(python%{1}dist(six)) = 1.12.0
Provides: bundled(python%{1}dist(urllib3)) = 1.24.1
Provides: bundled(python%{1}dist(webencodings)) = 0.5.1
}
@ -272,6 +274,11 @@ popd
rm src/pip/_vendor/certifi/*.pem
sed -i '/\.pem$/d' src/pip.egg-info/SOURCES.txt
%if %{with tests}
# tests expect wheels in here
ln -s %{python_wheeldir} tests/data/common_wheels
%endif
%build
%if %{with python2} && %{with bootstrap}
@ -401,23 +408,27 @@ install -p dist/%{python_wheelname} -t %{buildroot}%{python_wheeldir}
%if %{with tests}
%check
export PYTHONPATH=src
# bash completion tests only work from installed package
# needs network https://github.com/pypa/pip/pull/6263
# test_constraints_local_editable_install_pep518
# test_pep517_wheels_are_not_confused_with_other_files
# test_upgrade_argparse_shadowed
# TODO investigate failures
# test_uninstall_non_local_distutils
# test_venv_modification
%global pytest_k 'not completion and not test_constraints_local_editable_install_pep518 and not test_pep517_wheels_are_not_confused_with_other_files and not test_upgrade_argparse_shadowed and not test_uninstall_non_local_distutils and not test_venv_modification'
mkdir _bin
export PATH="$PWD/_bin:$PATH"
# bash completion tests only work from installed package
# test_yaml_based, test_uninstall_non_local_distutils, test_venv_modification, test_freeze_git_clone_srcdir are failing TODO investigate
# other deselected tests download setuptools and wheel from the interwebs and are not marked as network
%global pytest_k 'not completion and not test_pep518 and not test_install_with_target_and_scripts_no_warning and not test_install_incompatible_python_requires and not test_install_compatible_python_requires and not test_wheel_exit_status_code_when_no_requirements and not test_wheel_exit_status_code_when_blank_requirements_file and not test_constraints_local_editable_install_pep518 and not test_constraints_local_editable_install_pep518 and not test_wheel_exit_status_code_when_blank_requirements_file and not test_yaml_based and not test_uninstall_non_local_distutils and not test_venv_modification and not test_freeze_git_clone_srcdir and not test_upgrade_argparse_shadowed'
%if %{with python2}
export PYTHONPATH=%{buildroot}%{python2_sitelib}
ln -s %{buildroot}%{_bindir}/pip2 _bin/pip
%{__python2} -m pytest -m 'not network' -k %{pytest_k}
%endif
export PYTHONPATH=%{buildroot}%{python3_sitelib}
ln -sf %{buildroot}%{_bindir}/pip3 _bin/pip
%{__python3} -m pytest -m 'not network' -k %{pytest_k}
%endif
@ -478,6 +489,9 @@ ln -sf %{buildroot}%{_bindir}/pip3 _bin/pip
%endif
%changelog
* Wed Feb 13 2019 Miro Hrončok <mhroncok@redhat.com> - 19.0.2-1
- Update to 19.0.2 (#1668492)
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 18.1-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild

View File

@ -11,7 +11,7 @@ Date: Tue Sep 18 17:13:51 2018 +0200
Co-Authored-By: Michal Cyprian <m.cyprian@gmail.com>
diff --git a/src/pip/_internal/req/req_install.py b/src/pip/_internal/req/req_install.py
index 922d10c..6f73f33 100644
index d21530a..0023a35 100644
--- a/src/pip/_internal/req/req_install.py
+++ b/src/pip/_internal/req/req_install.py
@@ -29,7 +29,7 @@ from pip._internal.utils.hashes import Hashes
@ -20,10 +20,10 @@ index 922d10c..6f73f33 100644
_make_build_dir, ask_path_exists, backup_dir, call_subprocess,
- display_path, dist_in_site_packages, dist_in_usersite, ensure_dir,
+ display_path, dist_in_install_path, dist_in_site_packages, dist_in_usersite, ensure_dir,
get_installed_version, rmtree,
get_installed_version, redact_password_from_url, rmtree,
)
from pip._internal.utils.packaging import get_metadata
@@ -359,7 +359,7 @@ class InstallRequirement(object):
@@ -411,7 +411,7 @@ class InstallRequirement(object):
"lack sys.path precedence to %s in %s" %
(existing_dist.project_name, existing_dist.location)
)
@ -33,19 +33,19 @@ index 922d10c..6f73f33 100644
return True
diff --git a/src/pip/_internal/resolve.py b/src/pip/_internal/resolve.py
index 2d9f1c5..4ad9e77 100644
index 33f572f..88b68e1 100644
--- a/src/pip/_internal/resolve.py
+++ b/src/pip/_internal/resolve.py
@@ -20,7 +20,7 @@ from pip._internal.exceptions import (
)
from pip._internal.req.constructors import install_req_from_req
from pip._internal.req.constructors import install_req_from_req_string
from pip._internal.utils.logging import indent_log
-from pip._internal.utils.misc import dist_in_usersite, ensure_dir
+from pip._internal.utils.misc import dist_in_install_path, dist_in_usersite, ensure_dir
from pip._internal.utils.packaging import check_dist_requires_python
from pip._internal.utils.typing import MYPY_CHECK_RUNNING
logger = logging.getLogger(__name__)
@@ -123,7 +123,9 @@ class Resolver(object):
@@ -154,7 +154,9 @@ class Resolver(object):
"""
# Don't uninstall the conflict if doing a user install and the
# conflict is not a user install.
@ -57,10 +57,10 @@ index 2d9f1c5..4ad9e77 100644
req.satisfied_by = None
diff --git a/src/pip/_internal/utils/misc.py b/src/pip/_internal/utils/misc.py
index 84a421f..c879a21 100644
index 84605ee..0e4ba93 100644
--- a/src/pip/_internal/utils/misc.py
+++ b/src/pip/_internal/utils/misc.py
@@ -29,7 +29,7 @@ from pip._vendor.six.moves.urllib import parse as urllib_parse
@@ -30,7 +30,7 @@ from pip._vendor.six.moves.urllib.parse import unquote as urllib_unquote
from pip._internal.exceptions import CommandError, InstallationError
from pip._internal.locations import (
running_under_virtualenv, site_packages, user_site, virtualenv_no_global,
@ -69,7 +69,7 @@ index 84a421f..c879a21 100644
)
from pip._internal.utils.compat import (
WINDOWS, console_to_str, expanduser, stdlib_pkgs,
@@ -328,6 +328,16 @@ def dist_in_site_packages(dist):
@@ -355,6 +355,16 @@ def dist_in_site_packages(dist):
).startswith(normalize_path(site_packages))
@ -84,5 +84,5 @@ index 84a421f..c879a21 100644
+
+
def dist_is_editable(dist):
"""Is distribution an editable install?"""
for path_item in sys.path:
# type: (Distribution) -> bool
"""

View File

@ -1,4 +1,4 @@
SHA512 (pip-18.1.tar.gz) = f13c129675f2de7f8bc10cfd0d49fc5c650cf59825282c3311c15841bca904604fe78a28d9b48f1c8fa4486826ac3d7d7362cec7a4631715b71b0928b48fff1d
SHA512 (pip-18.1-tests.tar.gz) = c1afa128e883c4bf1ebe1696c81e1bc2299010e43d6be01164359ee164b2b56c787b912d923b669b0ddc5efca77d7f7956f17737d1d378d8ba571695c09082d1
SHA512 (pip-19.0.2.tar.gz) = c6e13da3a57462371d32982c80575c5181592f5c6a8e70d60ec879e689442f4ad468e7aef97eb58c9da50a5a770385aa35e701eefd713a8e9fafeb12e11d956b
SHA512 (pip-19.0.2-tests.tar.gz) = 069464b9a99d487e6eaca9cc77e012f6850da81395191eeffd33b007f6de248e14db6c6105f643d7afa0737f4f00e48e183cae6b3f931a1b9e2cb3e2c57b7fb6
SHA512 (d2e63fbfc62af3b7050f619b2f5bb8658985b931.tar.gz) = fc7b11c5cbf6322469ce2eaca2a8d7eb60b17398d316f7465ab5d3d38dabd00ee22a3da7437a28f6312f0115f77f2df0d8bf0abc671e055eef06356c94283409
SHA512 (2018.2.tar.gz) = 4c09c43a70ecb3ca3bc9445b01bf209eb382e41d9c969145696dea38551992ed88fd9b725a1264380f3dbdf8acdaf5ada3ef86b44255cdfbdbe4a01a1630912d