Notice: If you are member of any public project or group, please make sure that your GitLab username is not the same as the LRZ identifier/Kennung (see Please change your username if necessary. For more information see the section "Public projects / Öffentliche Projekte" at . Thank you!

Commit a98fa19c authored by hm-schuhba1's avatar hm-schuhba1


parent 89647a9a
Pipeline #75476 failed with stages
in 1 minute and 53 seconds
......@@ -2,6 +2,7 @@ import getpass
import os
import re
import subprocess
import shutil
def install_package_if_needed(package_name='VadereAnalysisTool', search_path='Tools/VadereAnalysisTool'):
......@@ -9,6 +10,9 @@ def install_package_if_needed(package_name='VadereAnalysisTool', search_path='To
make_package_cwd = os.path.abspath(search_path)
if os.path.exists(os.path.join(search_path, "dist")):
shutil.rmtree(os.path.join(search_path, "dist"))
print("Build package {}...".format(package_name))
p_make_package =
args=["python3", "", "bdist_wheel"],
......@@ -22,12 +26,13 @@ def install_package_if_needed(package_name='VadereAnalysisTool', search_path='To
if p_make_package.returncode == 0:
stdout = p_make_package.stdout.decode('utf8')
re_res ="creating '(?P<name>.*?)'", stdout)
if re_res is not None:
dist_path ='name')
dist_dir = os.path.join(search_path, "dist")
wheel_files = [f for f in os.listdir(dist_dir) if f.endswith(".whl")]
if len(wheel_files) > 0:
dist_path = os.path.join(search_path, "dist", wheel_files[0])
user = getpass.getuser()
print("Install package {} locally for user {} ...".format(package_name, user))
print("\nInstall package {} locally for user {} ...".format(dist_path, user))
p_install_package =
args=["python3", "-m", "pip", "install", "--user", dist_path],
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment