From 5d3802da93516daf70599ca88683f0fb18bde085 Mon Sep 17 00:00:00 2001 From: Lumir Balhar Date: Mon, 8 Nov 2021 15:17:15 +0100 Subject: [PATCH] Use sysconfig instead of hardcoded paths --- src/tox_current_env/hooks4.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/tox_current_env/hooks4.py b/src/tox_current_env/hooks4.py index fd5f33b..543432d 100644 --- a/src/tox_current_env/hooks4.py +++ b/src/tox_current_env/hooks4.py @@ -1,6 +1,7 @@ import argparse import platform import sys +import sysconfig import warnings from pathlib import Path from typing import Set @@ -125,13 +126,13 @@ class CurrentEnv(PythonRun): return None def env_bin_dir(self): - return Path(sys.prefix) / "bin" + return Path(sysconfig.get_path("scripts")) def env_python(self): return sys.executable def env_site_package_dir(self): - return Path(sys.prefix) / "lib" + return Path(sysconfig.get_path("purelib")) @property def installer(self):