pkgsrc-WIP-changes archive

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

py-virtualenv20: make it complete



Module Name:	pkgsrc-wip
Committed By:	Adam Ciarciński <aciarcinski%teonite.com@localhost>
Pushed By:	adam
Date:		Wed May 4 14:53:24 2022 +0200
Changeset:	30bac97618a5429e674a9dfb08b26d6c8baf58c1

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

Log Message:
py-virtualenv20: make it complete

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

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

diffstat:
 py-virtualenv20/Makefile                                   | 11 ++++-------
 py-virtualenv20/distinfo                                   |  4 +++-
 .../patch-src_virtualenv_create_via__global__ref_api.py    |  9 ++++-----
 .../patches/patch-tests_unit_create_test__creator.py       | 14 ++++++++++++++
 ...nit_seed_embed_test__bootstrap__link__via__app__data.py | 14 ++++++++++++++
 5 files changed, 39 insertions(+), 13 deletions(-)

diffs:
diff --git a/py-virtualenv20/Makefile b/py-virtualenv20/Makefile
index 615edb6648..9394046e8c 100644
--- a/py-virtualenv20/Makefile
+++ b/py-virtualenv20/Makefile
@@ -14,15 +14,15 @@ BUILD_DEPENDS+=	${PYPKGPREFIX}-setuptools_scm-[0-9]*:../../devel/py-setuptools_s
 DEPENDS+=	${PYPKGPREFIX}-distlib>=0.3.1:../../devel/py-distlib
 DEPENDS+=	${PYPKGPREFIX}-filelock>=3.2:../../devel/py-filelock
 DEPENDS+=	${PYPKGPREFIX}-platformdirs>=2:../../misc/py-platformdirs
-DEPENDS+=	${PYPKGPREFIX}-six>=1.9:../../lang/py-six
+DEPENDS+=	${PYPKGPREFIX}-six>=1.9.0:../../lang/py-six
 TEST_DEPENDS+=	${PYPKGPREFIX}-coverage>=4:../../devel/py-coverage
-#TEST_DEPENDS+=	${PYPKGPREFIX}-coverage-enable-subprocess>=1:../../devel/py-coverage-enable-subprocess
+TEST_DEPENDS+=	${PYPKGPREFIX}-coverage-enable-subprocess>=1:../../devel/py-coverage-enable-subprocess
 TEST_DEPENDS+=	${PYPKGPREFIX}-flaky>=3:../../devel/py-flaky
 TEST_DEPENDS+=	${PYPKGPREFIX}-packaging>=20.0:../../devel/py-packaging
 TEST_DEPENDS+=	${PYPKGPREFIX}-pip-[0-9]*:../../devel/py-pip
 TEST_DEPENDS+=	${PYPKGPREFIX}-test>=4:../../devel/py-test
 TEST_DEPENDS+=	${PYPKGPREFIX}-test-env>=0.6.2:../../devel/py-test-env
-#TEST_DEPENDS+=	${PYPKGPREFIX}-test-freezegun>=0.4.1:../../devel/py-test-freezegun
+TEST_DEPENDS+=	${PYPKGPREFIX}-test-freezegun>=0.4.1:../../devel/py-test-freezegun
 TEST_DEPENDS+=	${PYPKGPREFIX}-test-mock>=2:../../devel/py-test-mock
 TEST_DEPENDS+=	${PYPKGPREFIX}-test-randomly>=1:../../devel/py-test-randomly
 TEST_DEPENDS+=	${PYPKGPREFIX}-test-timeout>=1:../../devel/py-test-timeout
@@ -45,10 +45,7 @@ post-install:
 	cd ${DESTDIR}${PREFIX}/bin && \
 	${MV} virtualenv virtualenv-${PYVERSSUFFIX} || ${TRUE}
 
-TEST_ENV+=	PYTHONPATH=${WRKSRC}/build/lib
-# needs 'make install'
-# as of 20.14.1
-# 22 failed, 247 passed, 31 skipped, 6 warnings, 16 errors
+# needs 'make install' and USE_LANGUAGES=c
 do-test:
 	cd ${WRKSRC} && ${SETENV} ${TEST_ENV} pytest-${PYVERSSUFFIX}
 
diff --git a/py-virtualenv20/distinfo b/py-virtualenv20/distinfo
index f93d00cf80..eecb0d859e 100644
--- a/py-virtualenv20/distinfo
+++ b/py-virtualenv20/distinfo
@@ -3,4 +3,6 @@ $NetBSD: distinfo,v 1.43 2021/10/26 10:19:15 nia Exp $
 BLAKE2s (virtualenv-20.14.1.tar.gz) = a29a362b33e0306b8e0d5691863fe2fef6600433fc1e62d691df8eb9c9e68081
 SHA512 (virtualenv-20.14.1.tar.gz) = 149e78787db23eabd4238baa172bf023ddcf87d59284fdd090269acfa15991aab182f9e168851f88ef810d5c50dd7cdce69d132c46ebedb10080d65a308e63a1
 Size (virtualenv-20.14.1.tar.gz) = 12216889 bytes
-SHA1 (patch-src_virtualenv_create_via__global__ref_api.py) = f6ba5ae8157b45366d9a9a85cc3a1f6c42e2d00c
+SHA1 (patch-src_virtualenv_create_via__global__ref_api.py) = a55f2bbf974cb9cb6cbe79b8f29210a7db5ce470
+SHA1 (patch-tests_unit_create_test__creator.py) = ae1121ca6786801a4d690b70fdc4fdeb65488cca
+SHA1 (patch-tests_unit_seed_embed_test__bootstrap__link__via__app__data.py) = c20b1ecdbfb576be3697c8c52f9f9d21e2e7e7b9
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
index 32494eeb08..3ded4deda9 100644
--- 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
@@ -3,7 +3,7 @@ $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.orig	2022-04-11 10:38:39.000000000 +0000
 +++ src/virtualenv/create/via_global_ref/api.py
 @@ -4,6 +4,9 @@ import logging
  import os
@@ -15,15 +15,14 @@ https://github.com/pypa/virtualenv/issues/2313
  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"
+@@ -98,6 +101,10 @@ class ViaGlobalRefApi(Creator):
              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:
diff --git a/py-virtualenv20/patches/patch-tests_unit_create_test__creator.py b/py-virtualenv20/patches/patch-tests_unit_create_test__creator.py
new file mode 100644
index 0000000000..a0eee38025
--- /dev/null
+++ b/py-virtualenv20/patches/patch-tests_unit_create_test__creator.py
@@ -0,0 +1,14 @@
+$NetBSD$
+
+Fix testing, related to patch-src_virtualenv_create_via__global__ref_api.py.
+
+--- tests/unit/create/test_creator.py.orig	2022-05-04 12:29:21.000000000 +0000
++++ tests/unit/create/test_creator.py
+@@ -156,6 +156,7 @@ def test_create_no_seed(python, creator,
+     purelib = creator.purelib
+     patch_files = {purelib / "{}.{}".format("_virtualenv", i) for i in ("py", "pyc", "pth")}
+     patch_files.add(purelib / "__pycache__")
++    patch_files.add(purelib / "_distutils_system_mod.py")
+     content = set(creator.purelib.iterdir()) - patch_files
+     assert not content, "\n".join(ensure_text(str(i)) for i in content)
+     assert creator.env_name == ensure_text(dest.name)
diff --git a/py-virtualenv20/patches/patch-tests_unit_seed_embed_test__bootstrap__link__via__app__data.py b/py-virtualenv20/patches/patch-tests_unit_seed_embed_test__bootstrap__link__via__app__data.py
new file mode 100644
index 0000000000..3d1879edbb
--- /dev/null
+++ b/py-virtualenv20/patches/patch-tests_unit_seed_embed_test__bootstrap__link__via__app__data.py
@@ -0,0 +1,14 @@
+$NetBSD$
+
+Fix testing, related to patch-src_virtualenv_create_via__global__ref_api.py.
+
+--- tests/unit/seed/embed/test_bootstrap_link_via_app_data.py.orig	2022-05-04 12:39:44.000000000 +0000
++++ tests/unit/seed/embed/test_bootstrap_link_via_app_data.py
+@@ -114,6 +114,7 @@ def test_seed_link_via_app_data(tmp_path
+         purelib = result.creator.purelib
+         patch_files = {purelib / "{}.{}".format("_virtualenv", i) for i in ("py", "pyc", "pth")}
+         patch_files.add(purelib / "__pycache__")
++        patch_files.add(purelib / "_distutils_system_mod.py")
+         post_run = set(site_package.iterdir()) - patch_files
+         assert not post_run, "\n".join(str(i) for i in post_run)
+ 


Home | Main Index | Thread Index | Old Index