Update to 20.13.0
This commit is contained in:
parent
e105d6e33e
commit
e3fdd667cf
54
2231.patch
54
2231.patch
@ -1,54 +0,0 @@
|
||||
From 58ff51c482ed40a6b38766c90954d7d3edcaa0fb Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= <miro@hroncok.cz>
|
||||
Date: Mon, 8 Nov 2021 15:54:18 +0100
|
||||
Subject: [PATCH] Fix test_custom_venv_install_scheme_is_prefered mocking if
|
||||
"venv" install scheme actually exists
|
||||
|
||||
The error this prevents was:
|
||||
|
||||
"""distutils.command.install
|
||||
|
||||
Implements the Distutils 'install' command."""
|
||||
|
||||
...
|
||||
|
||||
# Copy from sysconfig._INSTALL_SCHEMES
|
||||
for key in SCHEME_KEYS:
|
||||
for distutils_scheme_name, sys_scheme_name in (
|
||||
("unix_prefix", "posix_prefix"), ("unix_home", "posix_home"),
|
||||
("nt", "nt")):
|
||||
sys_key = key
|
||||
> sys_scheme = sysconfig._INSTALL_SCHEMES[sys_scheme_name]
|
||||
E KeyError: 'posix_home'
|
||||
---
|
||||
tests/unit/discovery/py_info/test_py_info.py | 9 ++++++++-
|
||||
1 file changed, 8 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/tests/unit/discovery/py_info/test_py_info.py b/tests/unit/discovery/py_info/test_py_info.py
|
||||
index 053a6f906..d4c4bba25 100644
|
||||
--- a/tests/unit/discovery/py_info/test_py_info.py
|
||||
+++ b/tests/unit/discovery/py_info/test_py_info.py
|
||||
@@ -349,7 +349,6 @@ def test_custom_venv_install_scheme_is_prefered(mocker):
|
||||
|
||||
if sys.version_info[0] == 2:
|
||||
sysconfig_install_schemes = _stringify_schemes_dict(sysconfig_install_schemes)
|
||||
- mocker.patch("sysconfig._INSTALL_SCHEMES", sysconfig_install_schemes)
|
||||
|
||||
# On Python < 3.10, the distutils schemes are not derived from sysconfig schemes
|
||||
# So we mock them as well to assert the custom "venv" install scheme has priority
|
||||
@@ -367,7 +366,15 @@ def test_custom_venv_install_scheme_is_prefered(mocker):
|
||||
|
||||
if sys.version_info[0] == 2:
|
||||
distutils_schemes = _stringify_schemes_dict(distutils_schemes)
|
||||
+
|
||||
+ # We need to mock distutils first, so they don't see the mocked sysconfig,
|
||||
+ # if imported for the first time.
|
||||
+ # That can happen if the actual interpreter has the "venv" INSTALL_SCHEME
|
||||
+ # and hence this is the first time we are touching distutils in this process.
|
||||
+ # If distutils saw our mocked sysconfig INSTALL_SCHEMES, we would need
|
||||
+ # to define all install schemes.
|
||||
mocker.patch("distutils.command.install.INSTALL_SCHEMES", distutils_schemes)
|
||||
+ mocker.patch("sysconfig._INSTALL_SCHEMES", sysconfig_install_schemes)
|
||||
|
||||
pyinfo = PythonInfo()
|
||||
pyver = "{}.{}".format(pyinfo.version_info.major, pyinfo.version_info.minor)
|
70
2246.patch
70
2246.patch
@ -1,70 +0,0 @@
|
||||
From 5fe71e1126b6d4e5c3abc0d03c7c3709f1b1c1d4 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= <miro@hroncok.cz>
|
||||
Date: Mon, 6 Dec 2021 15:42:33 +0100
|
||||
Subject: [PATCH] Use 'selectable' interface for entry points only when
|
||||
available
|
||||
|
||||
This reverts commit 17caadc974cb2a24f70374525596cd1160579594.
|
||||
---
|
||||
docs/changelog/2246.feature.rst | 1 +
|
||||
setup.cfg | 1 -
|
||||
src/virtualenv/run/plugin/base.py | 15 +++++++++++++--
|
||||
3 files changed, 14 insertions(+), 3 deletions(-)
|
||||
create mode 100644 docs/changelog/2246.feature.rst
|
||||
|
||||
diff --git a/docs/changelog/2246.feature.rst b/docs/changelog/2246.feature.rst
|
||||
new file mode 100644
|
||||
index 0000000..4be877d
|
||||
--- /dev/null
|
||||
+++ b/docs/changelog/2246.feature.rst
|
||||
@@ -0,0 +1 @@
|
||||
+Drop the runtime dependency of ``backports.entry-points-selectable`` - by :user:`hroncok`.
|
||||
diff --git a/setup.cfg b/setup.cfg
|
||||
index 70d77fb..1cec841 100644
|
||||
--- a/setup.cfg
|
||||
+++ b/setup.cfg
|
||||
@@ -40,7 +40,6 @@ project_urls =
|
||||
[options]
|
||||
packages = find:
|
||||
install_requires =
|
||||
- backports.entry_points_selectable>=1.0.4
|
||||
distlib>=0.3.1,<1
|
||||
filelock>=3.2,<4
|
||||
platformdirs>=2,<3
|
||||
diff --git a/src/virtualenv/run/plugin/base.py b/src/virtualenv/run/plugin/base.py
|
||||
index f1f4ee0..048c76a 100644
|
||||
--- a/src/virtualenv/run/plugin/base.py
|
||||
+++ b/src/virtualenv/run/plugin/base.py
|
||||
@@ -1,8 +1,16 @@
|
||||
from __future__ import absolute_import, unicode_literals
|
||||
|
||||
+import sys
|
||||
from collections import OrderedDict
|
||||
|
||||
-from backports.entry_points_selectable import entry_points
|
||||
+if sys.version_info >= (3, 8):
|
||||
+ from importlib.metadata import entry_points
|
||||
+
|
||||
+ importlib_metadata_version = ()
|
||||
+else:
|
||||
+ from importlib_metadata import entry_points, version
|
||||
+
|
||||
+ importlib_metadata_version = tuple(int(i) for i in version("importlib_metadata").split(".")[:2])
|
||||
|
||||
|
||||
class PluginLoader(object):
|
||||
@@ -11,7 +19,10 @@ class PluginLoader(object):
|
||||
|
||||
@classmethod
|
||||
def entry_points_for(cls, key):
|
||||
- return OrderedDict((e.name, e.load()) for e in cls.entry_points().select(group=key))
|
||||
+ if sys.version_info >= (3, 10) or importlib_metadata_version >= (3, 6):
|
||||
+ return OrderedDict((e.name, e.load()) for e in cls.entry_points().select(group=key))
|
||||
+ else:
|
||||
+ return OrderedDict((e.name, e.load()) for e in cls.entry_points().get(key, {}))
|
||||
|
||||
@staticmethod
|
||||
def entry_points():
|
||||
--
|
||||
2.33.1
|
||||
|
@ -1,6 +1,6 @@
|
||||
Name: python-virtualenv
|
||||
Version: 20.10.0
|
||||
Release: 2%{?dist}
|
||||
Version: 20.13.0
|
||||
Release: 1%{?dist}
|
||||
Summary: Tool to create isolated Python environments
|
||||
|
||||
License: MIT
|
||||
@ -10,15 +10,6 @@ Source0: %{pypi_source virtualenv}
|
||||
# Add /usr/share/python-wheels to extra_search_dir
|
||||
Patch1: rpm-wheels.patch
|
||||
|
||||
# Hotfix for the test of the new functionality
|
||||
Patch2: https://github.com/pypa/virtualenv/pull/2231.patch
|
||||
|
||||
# Use 'selectable' interface for entry points only when available
|
||||
# Drops the dependency on backports.entry-points-selectable
|
||||
# https://github.com/pypa/virtualenv/pull/2246
|
||||
# Rebased to apply
|
||||
Patch3: 2246.patch
|
||||
|
||||
BuildArch: noarch
|
||||
|
||||
BuildRequires: python3-devel
|
||||
@ -142,11 +133,12 @@ unset SOURCE_DATE_EPOCH
|
||||
# - test_wheel_*
|
||||
# - test_seed_link_via_app_data
|
||||
# - test_base_bootstrap_via_pip_invoke
|
||||
# - test_acquire_find_wheel.py (whole file)
|
||||
# - test_acquire.py (whole file)
|
||||
# - test_bundle.py (whole file)
|
||||
# Uses disabled functionalities around automatic updates:
|
||||
# - test_periodic_update.py (whole file)
|
||||
PIP_CERT=/etc/pki/tls/certs/ca-bundle.crt \
|
||||
%pytest -vv -k "not test_acquire_find_wheel and not test_periodic_update and not test_wheel_ and not test_download_ and not test_base_bootstrap_via_pip_invoke and not test_seed_link_via_app_data"
|
||||
%pytest -vv -k "not test_bundle and not test_acquire and not test_periodic_update and not test_wheel_ and not test_download_ and not test_base_bootstrap_via_pip_invoke and not test_seed_link_via_app_data"
|
||||
|
||||
rm -r tmp_path
|
||||
%endif
|
||||
@ -165,6 +157,10 @@ rm -r tmp_path
|
||||
|
||||
|
||||
%changelog
|
||||
* Mon Jan 03 2022 Lumír Balhar <lbalhar@redhat.com> - 20.13.0-1
|
||||
- Update to 20.13.0
|
||||
Resolves: rhbz#2035895
|
||||
|
||||
* Mon Nov 08 2021 Lumír Balhar <lbalhar@redhat.com> - 20.10.0-2
|
||||
- Remove hack for local/ prefixes
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
From a5a31b5d5c4969c8148fd44d45379140b1273f87 Mon Sep 17 00:00:00 2001
|
||||
From 9b8653289e84c6d24b5da1ffc8c21e8c204fc48c Mon Sep 17 00:00:00 2001
|
||||
From: Lumir Balhar <lbalhar@redhat.com>
|
||||
Date: Tue, 19 Jan 2021 13:51:49 +0100
|
||||
Date: Mon, 3 Jan 2022 11:50:56 +0100
|
||||
Subject: [PATCH] rpm wheels
|
||||
|
||||
---
|
||||
@ -80,12 +80,12 @@ index 9a98a70..a0ecadf 100644
|
||||
pip_version = name_to_whl["pip"].version_tuple if "pip" in name_to_whl else None
|
||||
installer_class = self.installer_class(pip_version)
|
||||
diff --git a/src/virtualenv/seed/wheels/embed/__init__.py b/src/virtualenv/seed/wheels/embed/__init__.py
|
||||
index 672d67b..bdd8864 100644
|
||||
index d38ccf8..4b80d98 100644
|
||||
--- a/src/virtualenv/seed/wheels/embed/__init__.py
|
||||
+++ b/src/virtualenv/seed/wheels/embed/__init__.py
|
||||
@@ -48,8 +48,11 @@ BUNDLE_SUPPORT = {
|
||||
}
|
||||
MAX = "3.10"
|
||||
MAX = "3.11"
|
||||
|
||||
+# Redefined here because bundled wheels are removed in RPM build
|
||||
+BUNDLE_SUPPORT = None
|
||||
@ -124,5 +124,5 @@ index 0000000..a968dee
|
||||
+ if wheels_dir.exists():
|
||||
+ yield wheels_dir
|
||||
--
|
||||
2.29.2
|
||||
2.33.1
|
||||
|
||||
|
2
sources
2
sources
@ -1 +1 @@
|
||||
SHA512 (virtualenv-20.10.0.tar.gz) = df940aa29801a39d39be46d3518a99e93efb2113650abf81d00b4545183ec6806823ce8b754c5a3c951cb64e941944421046c709ed3de6a925489e5ac1988d48
|
||||
SHA512 (virtualenv-20.13.0.tar.gz) = 72aa8cffe92551479ad4ec93395597cd9f77ddaf2063e36d5836277199a96ab2d57236d94b99b7038a60ada103a2d8a37ae4b13ffaaa6ed8e786245d9fbbf6d6
|
||||
|
Loading…
Reference in New Issue
Block a user