Skip to content

Commit

Permalink
Remove outdated PyPy stdlib overrides (#2426)
Browse files Browse the repository at this point in the history
  • Loading branch information
mattip authored Oct 25, 2022
1 parent ae2594c commit 3cff34f
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 18 deletions.
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"""
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

0 comments on commit 3cff34f

Please sign in to comment.