mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-03-23 15:34:18 +08:00
Fix python setup.py in venv (#3603)
This commit is contained in:
committed by
GitHub
parent
5418f4ff3c
commit
a68739ea07
12
setup.py
12
setup.py
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user