mirror of
https://github.com/daylinmorgan/viv.git
synced 2024-11-09 19:13:14 -06:00
fix: make executable path resolved
This commit is contained in:
parent
d265dae9c3
commit
b887f3a6cf
1 changed files with 4 additions and 2 deletions
|
@ -262,7 +262,7 @@ def get_hash(package_spec: Tuple[str, ...] | List[str], track_exe: bool) -> str:
|
||||||
# generate unique venvs for unique python exe's
|
# generate unique venvs for unique python exe's
|
||||||
if track_exe:
|
if track_exe:
|
||||||
pkg_hash.update(str(Path(sys.executable).resolve()).encode())
|
pkg_hash.update(str(Path(sys.executable).resolve()).encode())
|
||||||
|
|
||||||
return pkg_hash.hexdigest()
|
return pkg_hash.hexdigest()
|
||||||
|
|
||||||
|
|
||||||
|
@ -277,7 +277,7 @@ class ViVenv:
|
||||||
path: Path | None = None,
|
path: Path | None = None,
|
||||||
) -> None:
|
) -> None:
|
||||||
self.spec = spec
|
self.spec = spec
|
||||||
self.exe = sys.executable if track_exe else "N/A"
|
self.exe = str(Path(sys.executable).resolve()) if track_exe else "N/A"
|
||||||
self.build_id = build_id if build_id else get_hash(spec, track_exe)
|
self.build_id = build_id if build_id else get_hash(spec, track_exe)
|
||||||
self.name = name if name else self.build_id
|
self.name = name if name else self.build_id
|
||||||
self.path = path if path else c.venvcache / self.name
|
self.path = path if path else c.venvcache / self.name
|
||||||
|
@ -326,6 +326,8 @@ class ViVenv:
|
||||||
)
|
)
|
||||||
|
|
||||||
def dump_info(self, write=False):
|
def dump_info(self, write=False):
|
||||||
|
# TODO: include associated files in 'info'
|
||||||
|
# means it needs to be loaded first
|
||||||
info = {
|
info = {
|
||||||
"created": str(datetime.today()),
|
"created": str(datetime.today()),
|
||||||
"build_id": self.build_id,
|
"build_id": self.build_id,
|
||||||
|
|
Loading…
Reference in a new issue