Skip to content

Commit

Permalink
Match current Python version when searching for site-packages (scient…
Browse files Browse the repository at this point in the history
…ific-python#29)

This allows side-by-side builds for multiple version of Python
  • Loading branch information
stefanv authored Nov 30, 2022
2 parents 0032e3d + 486d471 commit bf9a87e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion devpy/cmds/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,10 @@ def get_config():


def get_site_packages(build_dir):
X, Y = sys.version_info.major, sys.version_info.minor
for root, dirs, files in os.walk(install_dir(build_dir)):
for subdir in dirs:
if subdir == "site-packages":
if subdir == "site-packages" and root.endswith(f"python{X}.{Y}"):
return os.path.abspath(os.path.join(root, subdir))


Expand Down

0 comments on commit bf9a87e

Please sign in to comment.