Skip to content

Commit 69c9749

Browse files
committed
[GR-60568] Rename graalpy_virtualenv
PullRequest: graalpython/3654
2 parents 879c840 + 0658994 commit 69c9749

File tree

8 files changed

+20
-18
lines changed

8 files changed

+20
-18
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ language runtime. The main focus is on user-observable behavior of the engine.
2626
* Deprecated the org.graalvm.python.embedding.util API package and added new equivalents to org.graalvm.python.embedding
2727
* Maven and Gradle plugins do not embed Python home into the generated virtual filesystem. Instead, the handling of language home for any Truffle language, including GraalPy, for the GraalVM Native Image build can be controlled by new Native Image options +H:IncludeLanguageResources and +H:CopyLanguageResources. By default, the whole Python home is embedded into the native executable. In the case of JVM deployment, the language home is embedded in the GraalPy artifacts at Mavencentral.
2828
* Removed deprecated methods in VirtualFileSystem
29+
* No longer ship `graalpy_virtualenv` virtualenv plugin within the standard library. Instead, inject the dependency on it into virtualenv, so that it gets installed only when necessary and can be uninstalled.
30+
* Rename `graalpy_virtualenv` to `graalpy_virtualenv_seeder`.
2931

3032
## Version 24.1.0
3133
* GraalPy is now considered stable for pure Python workloads. While many workloads involving native extension modules work, we continue to consider them experimental. You can use the command-line option `--python.WarnExperimentalFeatures` to enable warnings for such modules at runtime. In Java embeddings the warnings are enabled by default and you can suppress them by setting the context option 'python.WarnExperimentalFeatures' to 'false'.

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
+
Binary file not shown.

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
},
@@ -1482,12 +1482,12 @@
14821482
"maven": False,
14831483
},
14841484

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

0 commit comments

Comments
 (0)