mirror of
https://github.com/fedora-python/tox-current-env.git
synced 2024-12-23 16:46:14 +01:00
Use sysconfig instead of hardcoded paths
This commit is contained in:
parent
bb79c6d405
commit
5d3802da93
@ -1,6 +1,7 @@
|
|||||||
import argparse
|
import argparse
|
||||||
import platform
|
import platform
|
||||||
import sys
|
import sys
|
||||||
|
import sysconfig
|
||||||
import warnings
|
import warnings
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from typing import Set
|
from typing import Set
|
||||||
@ -125,13 +126,13 @@ class CurrentEnv(PythonRun):
|
|||||||
return None
|
return None
|
||||||
|
|
||||||
def env_bin_dir(self):
|
def env_bin_dir(self):
|
||||||
return Path(sys.prefix) / "bin"
|
return Path(sysconfig.get_path("scripts"))
|
||||||
|
|
||||||
def env_python(self):
|
def env_python(self):
|
||||||
return sys.executable
|
return sys.executable
|
||||||
|
|
||||||
def env_site_package_dir(self):
|
def env_site_package_dir(self):
|
||||||
return Path(sys.prefix) / "lib"
|
return Path(sysconfig.get_path("purelib"))
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def installer(self):
|
def installer(self):
|
||||||
|
Loading…
Reference in New Issue
Block a user