mirror of
https://github.com/kennethreitz/pipenv.git
synced 2026-06-05 22:50:18 +00:00
Fix _pyversion if include dir contains other files
This commit is contained in:
+2
-2
@@ -926,8 +926,8 @@ class Project(object):
|
||||
@property
|
||||
def _pyversion(self):
|
||||
include_dir = vistir.compat.Path(self.virtualenv_location) / "include"
|
||||
python_path = next(iter(list(include_dir.iterdir())), None)
|
||||
if python_path and python_path.name.startswith("python"):
|
||||
python_path = next((x for x in include_dir.iterdir() if x.name.startswith("python")), None)
|
||||
if python_path:
|
||||
python_version = python_path.name.replace("python", "")
|
||||
py_version_short, abiflags = python_version[:3], python_version[3:]
|
||||
return {"py_version_short": py_version_short, "abiflags": abiflags}
|
||||
|
||||
Reference in New Issue
Block a user