small fix for pip

This commit is contained in:
Yeicor
2024-03-09 11:47:23 +01:00
parent 768603b4d3
commit 8b3d08826d
2 changed files with 3 additions and 2 deletions

View File

@@ -2,7 +2,8 @@ import os
import subprocess
if __name__ == "__main__":
if os.getenv('SKIP_BUILD_FRONTEND') is None:
# Building the frontend is optional
if os.getenv('SKIP_BUILD_FRONTEND') is None and os.path.exists('package.json'):
# When building the backend, make sure the frontend is built first
subprocess.run(['yarn', 'install'], check=True)
subprocess.run(['yarn', 'build', '--outDir', 'yacv_server/frontend'], check=True)