From 733813700e42cd206b83ab144dc33dd4521c2348 Mon Sep 17 00:00:00 2001 From: DimitrisJim Date: Wed, 1 Mar 2023 00:03:40 +0200 Subject: [PATCH 1/3] Change python to rustpython in sysconfig. --- Lib/sysconfig.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Lib/sysconfig.py b/Lib/sysconfig.py index a8ce7472bc..f14b138bbe 100644 --- a/Lib/sysconfig.py +++ b/Lib/sysconfig.py @@ -851,6 +851,10 @@ def _main(): print() _print_dict('Variables', get_config_vars()) +# XXX RUSTPYTHON: replace python with rustpython in all these paths +for group in _INSTALL_SCHEMES.values(): + for key in group.keys(): + group[key] = group[key].replace("Python", "RustPython").replace("python", "rustpython") if __name__ == '__main__': _main() From 6ccb9814f8562dbd9e47a275b6bfc3d48cb0315f Mon Sep 17 00:00:00 2001 From: DimitrisJim Date: Wed, 1 Mar 2023 00:03:53 +0200 Subject: [PATCH 2/3] Add CI check for ensurepip. --- .github/workflows/ci.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 012a2b62d6..3fb2008caf 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -295,6 +295,11 @@ jobs: run: | mkdir site-packages target/release/rustpython --install-pip ensurepip --user + - if: runner.os != 'Windows' + name: Check that ensurepip succeeds. + run: | + target/release/rustpython -m ensurepip + target/release/rustpython -c "import pip" - name: Check whats_left is not broken run: python -I whats_left.py From c8d34fbe8c8a346c1b64c8d32242ddd07c1b9e06 Mon Sep 17 00:00:00 2001 From: DimitrisJim Date: Wed, 1 Mar 2023 00:29:40 +0200 Subject: [PATCH 3/3] Mark failing test. Hardcoded value for library path means we can't succeed. --- Lib/test/test_sysconfig.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Lib/test/test_sysconfig.py b/Lib/test/test_sysconfig.py index b072c0dedf..a1238bf206 100644 --- a/Lib/test/test_sysconfig.py +++ b/Lib/test/test_sysconfig.py @@ -141,6 +141,8 @@ def test_get_preferred_schemes(self): self.assertIsInstance(schemes, dict) self.assertEqual(set(schemes), expected_schemes) + # NOTE: RUSTPYTHON this is hardcoded to 'python', we're set up for failure. + @unittest.expectedFailure def test_posix_venv_scheme(self): # The following directories were hardcoded in the venv module # before bpo-45413, here we assert the posix_venv scheme does not regress