Skip to content

Commit

Permalink
[pre-commit.ci] pre-commit autoupdate (pypa#2064)
Browse files Browse the repository at this point in the history
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Signed-off-by: Bernát Gábor <bgabor8@bloomberg.net>
  • Loading branch information
pre-commit-ci[bot] authored and gaborbernat committed Mar 1, 2021
1 parent a89bc0e commit 0ba1dd8
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 11 deletions.
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ repos:
- id: end-of-file-fixer
- id: trailing-whitespace
- repo: https://github.com/asottile/pyupgrade
rev: v2.7.4
rev: v2.10.0
hooks:
- id: pyupgrade
- repo: https://github.com/PyCQA/isort
Expand All @@ -25,12 +25,12 @@ repos:
- id: black
args: [--safe]
- repo: https://github.com/asottile/blacken-docs
rev: v1.9.1
rev: v1.9.2
hooks:
- id: blacken-docs
additional_dependencies: [black==20.8b1]
- repo: https://github.com/pre-commit/pygrep-hooks
rev: v1.7.0
rev: v1.7.1
hooks:
- id: rst-backticks
- repo: https://github.com/tox-dev/tox-ini-fmt
Expand Down
1 change: 1 addition & 0 deletions docs/changelog/2071.bugfix.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix PyPy3 stdlib on Windows is incorrect - by :user:`gaborbernat`.
18 changes: 10 additions & 8 deletions src/virtualenv/create/via_global_ref/builtin/pypy/pypy3.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,6 @@ class PyPy3(PyPy, Python3Supports):
def exe_stem(cls):
return "pypy3"

@property
def stdlib(self):
"""
PyPy3 seems to respect sysconfig only for the host python...
virtual environments purelib is instead lib/pythonx.y
"""
return self.dest / "lib" / "python{}".format(self.interpreter.version_release_str) / "site-packages"

@classmethod
def exe_names(cls, interpreter):
return super(PyPy3, cls).exe_names(interpreter) | {"pypy"}
Expand All @@ -33,6 +25,11 @@ def exe_names(cls, interpreter):
class PyPy3Posix(PyPy3, PosixSupports):
"""PyPy 2 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" / "python{}".format(self.interpreter.version_release_str) / "site-packages"

@classmethod
def _shared_libs(cls):
return ["libpypy3-c.so", "libpypy3-c.dylib"]
Expand All @@ -53,6 +50,11 @@ def sources(cls, interpreter):
class Pypy3Windows(PyPy3, WindowsSupports):
"""PyPy 2 on Windows"""

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

@property
def bin_dir(self):
"""PyPy3 needs to fallback to pypy definition"""
Expand Down

0 comments on commit 0ba1dd8

Please sign in to comment.