Add explicit error when embed version of wheels is requested
This commit is contained in:
parent
125ca26f59
commit
b7713a7b03
@ -1,6 +1,6 @@
|
|||||||
Name: python-virtualenv
|
Name: python-virtualenv
|
||||||
Version: 20.13.3
|
Version: 20.13.3
|
||||||
Release: 1%{?dist}
|
Release: 2%{?dist}
|
||||||
Summary: Tool to create isolated Python environments
|
Summary: Tool to create isolated Python environments
|
||||||
|
|
||||||
License: MIT
|
License: MIT
|
||||||
@ -157,6 +157,10 @@ rm -r tmp_path
|
|||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon Mar 14 2022 Lumír Balhar <lbalhar@redhat.com> - 20.13.3-2
|
||||||
|
- Add explicit error when embed version of wheels is requested
|
||||||
|
Resolves: rhbz#2053948
|
||||||
|
|
||||||
* Tue Mar 08 2022 Lumír Balhar <lbalhar@redhat.com> - 20.13.3-1
|
* Tue Mar 08 2022 Lumír Balhar <lbalhar@redhat.com> - 20.13.3-1
|
||||||
- Update to 20.13.3
|
- Update to 20.13.3
|
||||||
Resolves: rhbz#2061449
|
Resolves: rhbz#2061449
|
||||||
|
@ -1,16 +1,16 @@
|
|||||||
From 9b8653289e84c6d24b5da1ffc8c21e8c204fc48c Mon Sep 17 00:00:00 2001
|
From e32327e4e06eef42a631e3f21674b4577b40ce77 Mon Sep 17 00:00:00 2001
|
||||||
From: Lumir Balhar <lbalhar@redhat.com>
|
From: Lumir Balhar <lbalhar@redhat.com>
|
||||||
Date: Mon, 3 Jan 2022 11:50:56 +0100
|
Date: Tue, 15 Mar 2022 08:07:24 +0100
|
||||||
Subject: [PATCH] rpm wheels
|
Subject: [PATCH] RPM wheels
|
||||||
|
|
||||||
---
|
---
|
||||||
src/virtualenv/run/__init__.py | 5 +++--
|
src/virtualenv/run/__init__.py | 5 +++--
|
||||||
src/virtualenv/seed/embed/base_embed.py | 7 +++++-
|
src/virtualenv/seed/embed/base_embed.py | 16 +++++++++++++-
|
||||||
src/virtualenv/seed/embed/pip_invoke.py | 1 +
|
src/virtualenv/seed/embed/pip_invoke.py | 1 +
|
||||||
.../seed/embed/via_app_data/via_app_data.py | 1 +
|
.../seed/embed/via_app_data/via_app_data.py | 1 +
|
||||||
src/virtualenv/seed/wheels/embed/__init__.py | 3 +++
|
src/virtualenv/seed/wheels/embed/__init__.py | 3 +++
|
||||||
src/virtualenv/util/path/_system_wheels.py | 22 +++++++++++++++++++
|
src/virtualenv/util/path/_system_wheels.py | 22 +++++++++++++++++++
|
||||||
6 files changed, 36 insertions(+), 3 deletions(-)
|
6 files changed, 45 insertions(+), 3 deletions(-)
|
||||||
create mode 100644 src/virtualenv/util/path/_system_wheels.py
|
create mode 100644 src/virtualenv/util/path/_system_wheels.py
|
||||||
|
|
||||||
diff --git a/src/virtualenv/run/__init__.py b/src/virtualenv/run/__init__.py
|
diff --git a/src/virtualenv/run/__init__.py b/src/virtualenv/run/__init__.py
|
||||||
@ -30,7 +30,7 @@ index e8e7ab1..617cf67 100644
|
|||||||
|
|
||||||
def load_app_data(args, parser, options):
|
def load_app_data(args, parser, options):
|
||||||
diff --git a/src/virtualenv/seed/embed/base_embed.py b/src/virtualenv/seed/embed/base_embed.py
|
diff --git a/src/virtualenv/seed/embed/base_embed.py b/src/virtualenv/seed/embed/base_embed.py
|
||||||
index c794e83..0867e9c 100644
|
index c794e83..43c636d 100644
|
||||||
--- a/src/virtualenv/seed/embed/base_embed.py
|
--- a/src/virtualenv/seed/embed/base_embed.py
|
||||||
+++ b/src/virtualenv/seed/embed/base_embed.py
|
+++ b/src/virtualenv/seed/embed/base_embed.py
|
||||||
@@ -6,11 +6,12 @@ from six import add_metaclass
|
@@ -6,11 +6,12 @@ from six import add_metaclass
|
||||||
@ -47,7 +47,23 @@ index c794e83..0867e9c 100644
|
|||||||
|
|
||||||
|
|
||||||
@add_metaclass(ABCMeta)
|
@add_metaclass(ABCMeta)
|
||||||
@@ -116,3 +117,7 @@ class BaseEmbed(Seeder):
|
@@ -34,6 +35,15 @@ class BaseEmbed(Seeder):
|
||||||
|
if not self.distribution_to_versions():
|
||||||
|
self.enabled = False
|
||||||
|
|
||||||
|
+ if "embed" in (self.pip_version, self.setuptools_version, self.wheel_version):
|
||||||
|
+ raise RuntimeError(
|
||||||
|
+ "Embedded wheels are not available if virtualenv "
|
||||||
|
+ "is installed from the RPM package.\nEither install "
|
||||||
|
+ "virtualenv from PyPI (via pip) or use 'bundle' "
|
||||||
|
+ "version which uses the system-wide pip, setuptools "
|
||||||
|
+ "and wheel wheels provided also by RPM packages."
|
||||||
|
+ )
|
||||||
|
+
|
||||||
|
@classmethod
|
||||||
|
def distributions(cls):
|
||||||
|
return {
|
||||||
|
@@ -116,3 +126,7 @@ class BaseEmbed(Seeder):
|
||||||
|
|
||||||
def __repr__(self):
|
def __repr__(self):
|
||||||
return ensure_str(self.__unicode__())
|
return ensure_str(self.__unicode__())
|
||||||
@ -80,7 +96,7 @@ index 9a98a70..a0ecadf 100644
|
|||||||
pip_version = name_to_whl["pip"].version_tuple if "pip" in name_to_whl else None
|
pip_version = name_to_whl["pip"].version_tuple if "pip" in name_to_whl else None
|
||||||
installer_class = self.installer_class(pip_version)
|
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
|
diff --git a/src/virtualenv/seed/wheels/embed/__init__.py b/src/virtualenv/seed/wheels/embed/__init__.py
|
||||||
index d38ccf8..4b80d98 100644
|
index ba15be9..3b488cf 100644
|
||||||
--- a/src/virtualenv/seed/wheels/embed/__init__.py
|
--- a/src/virtualenv/seed/wheels/embed/__init__.py
|
||||||
+++ b/src/virtualenv/seed/wheels/embed/__init__.py
|
+++ b/src/virtualenv/seed/wheels/embed/__init__.py
|
||||||
@@ -48,8 +48,11 @@ BUNDLE_SUPPORT = {
|
@@ -48,8 +48,11 @@ BUNDLE_SUPPORT = {
|
||||||
@ -124,5 +140,5 @@ index 0000000..a968dee
|
|||||||
+ if wheels_dir.exists():
|
+ if wheels_dir.exists():
|
||||||
+ yield wheels_dir
|
+ yield wheels_dir
|
||||||
--
|
--
|
||||||
2.33.1
|
2.35.1
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user