diff --git a/devpy/cmds/util.py b/devpy/cmds/util.py index 504d441..138cd1b 100644 --- a/devpy/cmds/util.py +++ b/devpy/cmds/util.py @@ -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))