pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

py-virtualenv20: improve compatibility with distutils



Module Name:	pkgsrc-wip
Committed By:	Thomas Klausner <tk%giga.or.at@localhost>
Pushed By:	wiz
Date:		Wed Mar 16 22:24:30 2022 +0100
Changeset:	7a94d788a99ef41dde215009071fdc4172ae1275

Modified Files:
	py-virtualenv20/distinfo
Added Files:
	py-virtualenv20/patches/patch-src_virtualenv_create_via__global__ref_api.py

Log Message:
py-virtualenv20: improve compatibility with distutils

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=7a94d788a99ef41dde215009071fdc4172ae1275

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 py-virtualenv20/distinfo                           |  1 +
 ...h-src_virtualenv_create_via__global__ref_api.py | 29 ++++++++++++++++++++++
 2 files changed, 30 insertions(+)

diffs:
diff --git a/py-virtualenv20/distinfo b/py-virtualenv20/distinfo
index bc0eff3158..737816e82f 100644
--- a/py-virtualenv20/distinfo
+++ b/py-virtualenv20/distinfo
@@ -3,3 +3,4 @@ $NetBSD: distinfo,v 1.43 2021/10/26 10:19:15 nia Exp $
 BLAKE2s (virtualenv-20.13.2.tar.gz) = cc68c5a97139d73457fc403c84a86cc5ced470b106a6ddff112a5a584d6f89c5
 SHA512 (virtualenv-20.13.2.tar.gz) = 7e5ef7927637ab1d029c8831889846acb13948c8cfafc17d56ca815f23f682207da0f3b3291936585a9b059c10ec35813fb53511f19462f867edaf5f197c0135
 Size (virtualenv-20.13.2.tar.gz) = 12111439 bytes
+SHA1 (patch-src_virtualenv_create_via__global__ref_api.py) = f6ba5ae8157b45366d9a9a85cc3a1f6c42e2d00c
diff --git a/py-virtualenv20/patches/patch-src_virtualenv_create_via__global__ref_api.py b/py-virtualenv20/patches/patch-src_virtualenv_create_via__global__ref_api.py
new file mode 100644
index 0000000000..32494eeb08
--- /dev/null
+++ b/py-virtualenv20/patches/patch-src_virtualenv_create_via__global__ref_api.py
@@ -0,0 +1,29 @@
+$NetBSD$
+
+Copy distutils distro config file to virtualenv.
+https://github.com/pypa/virtualenv/issues/2313
+
+--- src/virtualenv/create/via_global_ref/api.py.orig	2022-02-24 11:00:44.000000000 +0000
++++ src/virtualenv/create/via_global_ref/api.py
+@@ -4,6 +4,9 @@ import logging
+ import os
+ from abc import ABCMeta
+ 
++from shutil import copy
++from sysconfig import get_paths
++
+ from six import add_metaclass
+ 
+ from virtualenv.info import fs_supports_symlink
+@@ -97,7 +100,10 @@ class ViaGlobalRefApi(Creator):
+             dest_path = self.purelib / "_virtualenv.py"
+             logging.debug("create %s", ensure_text(str(dest_path)))
+             dest_path.write_text(text)
+-
++        distutils_distro_config = get_paths()["platlib"] + "/_distutils_system_mod.py"
++        if os.path.exists(distutils_distro_config):
++            copy(distutils_distro_config, self.platlib)
++            
+     def env_patch_text(self):
+         """Patch the distutils package to not be derailed by its configuration files"""
+         with self.app_data.ensure_extracted(Path(__file__).parent / "_virtualenv.py") as resolved_path:


Home | Main Index | Thread Index | Old Index