Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Fix ensurepip install issues #4598

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Mar 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
4 changes: 4 additions & 0 deletions Lib/sysconfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
2 changes: 2 additions & 0 deletions Lib/test/test_sysconfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down