Skip to content

Commit 9e9332a

Browse files
committed
GraalPy on Windows now works with virtualenv
1 parent cda3a55 commit 9e9332a

File tree

3 files changed

+0
-50
lines changed

3 files changed

+0
-50
lines changed

cibuildwheel/platforms/windows.py

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -445,22 +445,6 @@ def build(options: Options, tmp_path: Path) -> None:
445445
build_frontend, build_options.build_verbosity, build_options.config_settings
446446
)
447447

448-
if (
449-
config.identifier.startswith("gp")
450-
and build_frontend.name == "build"
451-
and "--no-isolation" not in extra_flags
452-
and "-n" not in extra_flags
453-
):
454-
# GraalPy fails to discover its standard library when a venv is created
455-
# from a virtualenv seeded executable. See
456-
# https://github.com/oracle/graalpython/issues/491 and remove this once
457-
# fixed upstream.
458-
log.notice(
459-
"Disabling build isolation to workaround GraalPy bug. If the build fails, consider using pip or build[uv] as build frontend."
460-
)
461-
shell("graalpy -m pip install setuptools wheel", env=env)
462-
extra_flags = [*extra_flags, "-n"]
463-
464448
build_env = env.copy()
465449
if pip_version is not None:
466450
build_env["VIRTUALENV_PIP"] = pip_version

test/test_dependency_versions.py

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -135,17 +135,6 @@ def test_dependency_constraints(method, tmp_path, build_frontend_env_nouv):
135135

136136
build_environment = {}
137137

138-
if (
139-
utils.get_platform() == "windows"
140-
and method == "file"
141-
and build_frontend_env_nouv["CIBW_BUILD_FRONTEND"] == "build"
142-
):
143-
# GraalPy fails to discover its standard library when a venv is created
144-
# from a virtualenv seeded executable. See
145-
# https://github.com/oracle/graalpython/issues/491 and remove this once
146-
# fixed upstream.
147-
build_frontend_env_nouv["CIBW_SKIP"] = "gp*"
148-
149138
for package_name, version in tool_versions.items():
150139
env_name = f"EXPECTED_{package_name.upper()}_VERSION"
151140
build_environment[env_name] = version
@@ -165,13 +154,4 @@ def test_dependency_constraints(method, tmp_path, build_frontend_env_nouv):
165154
# also check that we got the right wheels
166155
expected_wheels = utils.expected_wheels("spam", "0.1.0")
167156

168-
if (
169-
utils.get_platform() == "windows"
170-
and method == "file"
171-
and build_frontend_env_nouv["CIBW_BUILD_FRONTEND"] == "build"
172-
):
173-
# See reference to https://github.com/oracle/graalpython/issues/491
174-
# above
175-
expected_wheels = [w for w in expected_wheels if "graalpy" not in w]
176-
177157
assert set(actual_wheels) == set(expected_wheels)

test/test_pep518.py

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -33,26 +33,12 @@ def test_pep518(tmp_path, build_frontend_env):
3333
project_dir = tmp_path / "project"
3434
basic_project.generate(project_dir)
3535

36-
# GraalPy fails to discover its standard library when a venv is created
37-
# from a virtualenv seeded executable. See
38-
# https://github.com/oracle/graalpython/issues/491 and remove this once
39-
# fixed upstream.
40-
if build_frontend_env["CIBW_BUILD_FRONTEND"] == "build" and utils.get_platform() == "windows":
41-
build_frontend_env["CIBW_SKIP"] = "gp*"
42-
4336
# build the wheels
4437
actual_wheels = utils.cibuildwheel_run(project_dir, add_env=build_frontend_env)
4538

4639
# check that the expected wheels are produced
4740
expected_wheels = utils.expected_wheels("spam", "0.1.0")
4841

49-
# GraalPy fails to discover its standard library when a venv is created
50-
# from a virtualenv seeded executable. See
51-
# https://github.com/oracle/graalpython/issues/491 and remove this once
52-
# fixed upstream.
53-
if build_frontend_env["CIBW_BUILD_FRONTEND"] == "build" and utils.get_platform() == "windows":
54-
expected_wheels = [w for w in expected_wheels if "graalpy" not in w]
55-
5642
assert set(actual_wheels) == set(expected_wheels)
5743

5844
# These checks ensure an extra file is not created when using custom

0 commit comments

Comments
 (0)