Skip to content
Snippets Groups Projects

setup-base-dir: also add a symlink to poulpe directly

Merged Pierre-Yves David requested to merge topic/default/more-setup into branch/default
2 files
+ 13
6
Compare changes
  • Side-by-side
  • Inline
Files
2
+ 15
8
@@ -27,5 +27,6 @@
]
SUITE_DIR = "suites"
TOOLING = "tooling"
@@ -30,6 +31,6 @@
def install_poulpe():
def install_poulpe(poulpe_dir):
"""setup a venv and install poulpe in it"""
print("Installing poulpe (editable) into a new venv")
install_venv = [sys.executable, "-m", "venv", ".venv"]
@@ -45,7 +46,7 @@
"install",
"--quiet",
"--editable",
str(POULPE_DIR),
str(poulpe_dir),
]
commands = [install_venv, update_pip, install_poulpe]
@@ -131,6 +132,4 @@
old_dir = os.curdir
os.chdir(base_path)
try:
install_poulpe()
setup_quick_access(base_path)
@@ -136,5 +135,9 @@
print("Create symlinks to development Poulpe for suites")
source = (POULPE_DIR / SUITE_DIR).resolve()
os.symlink(source, SUITE_DIR)
print("Create symlinks to Poulpe")
tooling = Path(TOOLING)
tooling.mkdir()
local_poulpe = tooling / "poulpe"
os.symlink(POULPE_DIR.resolve(), local_poulpe)
os.symlink(local_poulpe / SUITE_DIR, SUITE_DIR)
bench = base_path / BENCHMARK_DIR
@@ -140,6 +143,7 @@
bench = base_path / BENCHMARK_DIR
for p in glob.glob(str(base_path / 'suites' / '*' / 'benchmarks')):
bench_glob = local_poulpe.absolute() / SUITE_DIR / '*' / 'benchmarks'
for p in glob.glob(str(bench_glob)):
b = Path(p).relative_to(base_path)
suite_name = b.name
os.symlink('..' / b, bench / suite_name)
@@ -142,7 +146,10 @@
b = Path(p).relative_to(base_path)
suite_name = b.name
os.symlink('..' / b, bench / suite_name)
install_poulpe(local_poulpe)
setup_quick_access(base_path)
finally:
os.chdir(old_dir)
Loading