Skip to content
This repository has been archived by the owner on Jun 14, 2021. It is now read-only.

Commit

Permalink
Merge branch 'dev' into feature/#135/save-compiler-env
Browse files Browse the repository at this point in the history
  • Loading branch information
benoit-dubreuil committed Apr 12, 2021
2 parents b3c3c74 + 0f498b8 commit 1663f25
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions create_script_venv.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/usr/bin/env python3

import encodings
import os
import subprocess
import venv
Expand Down Expand Up @@ -51,13 +52,20 @@ def __create_src_path_config_file() -> None:
path_config_file_dotless_extension: Final[str] = 'pth'
src_path_config_file_name: Final[str] = '.'.join([CONF_DIR_NAME, SCRIPT_DIR_NAME, SRC_DIR_NAME, path_config_file_dotless_extension])
file_mode: Final[int] = 0o770
encoding: Final[str] = encodings.utf_8.getregentry().name

print(f'Create src path config file')
print('----------------------------')
print('VEnv dir:', VENV_DIR)

print(VENV_DIR)
src_path_config_file: Path = VENV_DIR / src_path_config_file_name
src_path_config_file.touch(mode=file_mode, exist_ok=True)
print('Src path config file:', src_path_config_file)

src_path_config: str = os.path.relpath(path=SRC_DIR, start=VENV_DIR)
src_path_config_file.write_text(data=src_path_config)
src_path_config_file.write_text(data=src_path_config, encoding=encoding)

print()

@classmethod
def __install_reqs(cls, context: SimpleNamespace) -> None:
Expand Down

0 comments on commit 1663f25

Please sign in to comment.