Skip to content

Commit 808819b

Browse files
committed
Rename graalpy_virtualenv to graalpy_virtualenv_seeder
To make it possible to install it into older versions of graalpy without clashing with the preinstalled graalpy_virtualenv.
1 parent 4045cbb commit 808819b

File tree

6 files changed

+18
-18
lines changed

6 files changed

+18
-18
lines changed

graalpy_virtualenv/graalpy_virtualenv/__init__.py renamed to graalpy_virtualenv_seeder/graalpy_virtualenv_seeder/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (c) 2022, 2023, Oracle and/or its affiliates. All rights reserved.
1+
# Copyright (c) 2022, 2025, Oracle and/or its affiliates. All rights reserved.
22
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
33
#
44
# The Universal Permissive License (UPL), Version 1.0

graalpy_virtualenv/graalpy_virtualenv/graalpy.py renamed to graalpy_virtualenv_seeder/graalpy_virtualenv_seeder/graalpy.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (c) 2022, 2024, Oracle and/or its affiliates. All rights reserved.
1+
# Copyright (c) 2022, 2025, Oracle and/or its affiliates. All rights reserved.
22
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
33
#
44
# The Universal Permissive License (UPL), Version 1.0

graalpy_virtualenv/pyproject.toml renamed to graalpy_virtualenv_seeder/pyproject.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ requires = ["hatchling"]
4242
build-backend = "hatchling.build"
4343

4444
[project]
45-
name = "graalpy-virtualenv"
45+
name = "graalpy-virtualenv-seeder"
4646
version = "0.0.1"
4747
license = "UPL-1.0"
4848
authors = [
@@ -58,11 +58,11 @@ dependencies = [
5858
]
5959

6060
[project.entry-points."virtualenv.create"]
61-
graalpy-posix = "graalpy_virtualenv.graalpy:GraalPyPosix"
62-
graalpy-win = "graalpy_virtualenv.graalpy:GraalPyWindows"
61+
graalpy-posix = "graalpy_virtualenv_seeder.graalpy:GraalPyPosix"
62+
graalpy-win = "graalpy_virtualenv_seeder.graalpy:GraalPyWindows"
6363

6464
[project.entry-points."virtualenv.seed"]
65-
graalpy = "graalpy_virtualenv.graalpy:GraalPySeeder"
65+
graalpy = "graalpy_virtualenv_seeder.graalpy:GraalPySeeder"
6666

6767
[project.urls]
6868
Homepage = "https://graalvm.org/python"

graalpython/lib-graalpython/patches/pip-23.2.1.patch

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ index a8cd133..20dd1e6 100644
126126
# We de-duplicate installation paths, since there can be overlap (e.g.
127127
# file in .data maps to same location as file in wheel root).
128128
diff --git a/pip/_internal/resolution/resolvelib/candidates.py b/pip/_internal/resolution/resolvelib/candidates.py
129-
index de04e1d..d5bd355 100644
129+
index de04e1d..888ba75 100644
130130
--- a/pip/_internal/resolution/resolvelib/candidates.py
131131
+++ b/pip/_internal/resolution/resolvelib/candidates.py
132132
@@ -20,6 +20,7 @@ from pip._internal.req.constructors import (
@@ -142,13 +142,13 @@ index de04e1d..d5bd355 100644
142142
yield self._factory.make_requirement_from_spec(str(r), self._ireq)
143143
yield self._factory.make_requires_python_requirement(self.dist.requires_python)
144144
+ if self.name == 'virtualenv' and not graalpy.DISABLE_PATCHING:
145-
+ yield self._factory.make_requirement_from_spec('graalpy-virtualenv', self._ireq)
145+
+ yield self._factory.make_requirement_from_spec('graalpy-virtualenv-seeder', self._ireq)
146146

147147
def get_install_requirement(self) -> Optional[InstallRequirement]:
148148
return self._ireq
149149
diff --git a/pip/_internal/utils/graalpy.py b/pip/_internal/utils/graalpy.py
150150
new file mode 100644
151-
index 0000000..53dbe96
151+
index 0000000..a976ab5
152152
--- /dev/null
153153
+++ b/pip/_internal/utils/graalpy.py
154154
@@ -0,0 +1,334 @@
@@ -462,8 +462,8 @@ index 0000000..53dbe96
462462
+ # We need to force the filename to match the usual convention, otherwise we won't find a patch
463463
+ link = AddedSourceLink(url, f'{name}-{version}.{suffix}')
464464
+ candidates.append(InstallationCandidate(name=name, version=version, link=link))
465-
+ if name == 'graalpy-virtualenv':
466-
+ link = Link(path_to_url(os.path.join(sys.base_prefix, 'graalpy_virtualenv')))
465+
+ if name == 'graalpy-virtualenv-seeder':
466+
+ link = Link(path_to_url(os.path.join(sys.base_prefix, 'graalpy_virtualenv_seeder')))
467467
+ candidates.append(InstallationCandidate(name=name, version='0.0.1', link=link))
468468
+ return candidates
469469
+

mx.graalpython/mx_graalpython.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1598,7 +1598,7 @@ def tox_example(args=None):
15981598
"toml==0.10.2",
15991599
"tox==3.24.5",
16001600
"virtualenv==20.13.4",
1601-
os.path.join(os.path.dirname(graalpy), "..", "graalpy_virtualenv"),
1601+
os.path.join(os.path.dirname(graalpy), "..", "graalpy_virtualenv_seeder"),
16021602
]
16031603

16041604
def get_new_vm(project_name, svm=False, install_libs=None, reuse_existing=False):
@@ -2176,7 +2176,7 @@ def _python_checkpatchfiles():
21762176
support_distributions=[
21772177
'graalpython:GRAALPYTHON_GRAALVM_SUPPORT',
21782178
'graalpython:GRAALPYTHON_GRAALVM_DOCS',
2179-
'graalpython:GRAALPY_VIRTUALENV',
2179+
'graalpython:GRAALPY_VIRTUALENV_SEEDER',
21802180
],
21812181
library_configs=[
21822182
mx_sdk.LanguageLibraryConfig(

mx.graalpython/suite.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -255,9 +255,9 @@
255255
"source": [],
256256
},
257257

258-
"graalpy-virtualenv": {
258+
"graalpy-virtualenv-seeder": {
259259
"type": "python",
260-
"path": "graalpy_virtualenv",
260+
"path": "graalpy_virtualenv_seeder",
261261
"source": [],
262262
}
263263
},
@@ -1480,12 +1480,12 @@
14801480
"maven": False,
14811481
},
14821482

1483-
"GRAALPY_VIRTUALENV": {
1483+
"GRAALPY_VIRTUALENV_SEEDER": {
14841484
"native": True, # so it produces a tar, not a jar file
14851485
"platformDependent": False,
1486-
"description": "graalpy-virtualenv plugin sources usable to be installed into other interpreters",
1486+
"description": "graalpy-virtualenv-seeder plugin sources usable to be installed into other interpreters",
14871487
"layout": {
1488-
"graalpy_virtualenv": "file:graalpy_virtualenv",
1488+
"graalpy_virtualenv_seeder": "file:graalpy_virtualenv_seeder",
14891489
},
14901490
"maven": False,
14911491
},

0 commit comments

Comments
 (0)