Skip to content
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

Remove outdated PyPy stdlib overrides #2426

Merged
merged 2 commits into from
Oct 25, 2022
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
1 change: 1 addition & 0 deletions docs/changelog/2426.feature.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Drop unneeded shims for PyPy3 directory structure
2 changes: 1 addition & 1 deletion docs/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ Python and OS Compatibility
virtualenv works with the following Python interpreter implementations:

- `CPython <https://www.python.org/>`_ versions 2.7, 3.5, 3.6, 3.7, 3.8, 3.9, 3.10
- `PyPy <https://pypy.org/>`_ 2.7 and 3.5+.
- `PyPy <https://pypy.org/>`_ 2.7, 3.6, 3.7, 3.8, 3.9

This means virtualenv works on the latest patch version of each of these minor versions. Previous patch versions are
supported on a best effort approach.
Expand Down
17 changes: 0 additions & 17 deletions src/virtualenv/create/via_global_ref/builtin/pypy/pypy3.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,6 @@ def exe_names(cls, interpreter):
class PyPy3Posix(PyPy3, PosixSupports):
"""PyPy 3 on POSIX"""

@property
def stdlib(self):
"""PyPy3 respects sysconfig only for the host python, virtual envs is instead lib/pythonx.y/site-packages"""
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This comment was the impetus for the PR since it is clearly wrong, it should say lib/pypyx.y/site-packages

return self.dest / "lib" / f"pypy{self.interpreter.version_release_str}" / "site-packages"

@classmethod
def _shared_libs(cls, python_dir):
# glob for libpypy3-c.so, libpypy3-c.dylib, libpypy3.9-c.so ...
Expand Down Expand Up @@ -64,18 +59,6 @@ class Pypy3Windows(PyPy3, WindowsSupports):
def less_v37(self):
return self.interpreter.version_info.minor < 7

@property
def stdlib(self):
"""PyPy3 respects sysconfig only for the host python, virtual envs is instead Lib/site-packages"""
if self.less_v37:
return self.dest / "site-packages"
return self.dest / "Lib" / "site-packages"

@property
def bin_dir(self):
"""PyPy3 needs to fallback to pypy definition"""
return self.dest / "Scripts"

@classmethod
def _shared_libs(cls, python_dir):
# glob for libpypy*.dll and libffi*.dll
Expand Down