Skip to content

Commit

Permalink
Merge pull request #24 from benbariteau/bariteau/fix_pypy3_support
Browse files Browse the repository at this point in the history
fix pypy matching for change in pypy3
  • Loading branch information
chriskuehl authored Mar 9, 2021
2 parents c355a0b + 808bb3d commit e02303a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions virtualenv_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
'activate.xsh',
]
_pybin_match = re.compile(r'^python\d+\.\d+$')
_pypy_match = re.compile(r'^\d+.\d+$')
_pypy_match = re.compile(r'^\d+(.\d+)?$')
_activation_path_re = re.compile(
r'^(?:set -gx |setenv |)VIRTUAL_ENV[ =][\'"](.*?)[\'"]\s*$',
)
Expand Down Expand Up @@ -294,7 +294,7 @@ def _get_original_state(path):
raise NotAVirtualenvError(
path,
'directory',
os.path.join(base_lib_dir, '#.#' if is_pypy else 'python#.#'),
os.path.join(base_lib_dir, '#(.#)?' if is_pypy else 'python#.#'),
)
lib_dir, = lib_dirs

Expand Down

0 comments on commit e02303a

Please sign in to comment.