Fix python setup.py in venv (#3603)

This commit is contained in:
Christophe De Wagter
2026-02-17 11:46:57 +01:00
committed by GitHub
parent 5418f4ff3c
commit a68739ea07

View File

@@ -19,6 +19,18 @@ def run(args):
print("Creating a virtual environment for Paparazzi...")
venv.create(ENV_NAME, with_pip=True, system_site_packages=args.system)
# Update pip
cmd = [f'./{ENV_NAME}/bin/pip', 'install', '--upgrade', 'pip', 'setuptools', 'wheel']
result = subprocess.run(cmd, check=False)
if result.returncode:
print("Failed to update pip!")
# do pip cache purge
cmd = [f'./{ENV_NAME}/bin/pip', 'cache', 'purge']
result = subprocess.run(cmd, check=False)
if result.returncode:
print("Failed to purge pip cache!")
# installing requirements
cmd = [f'./{ENV_NAME}/bin/pip', 'install', '-r' , 'requirements.txt']
result = subprocess.run(cmd, check=False)