Skip to content

Commit

Permalink
use venv for all building
Browse files Browse the repository at this point in the history
  • Loading branch information
TNTwise committed Aug 21, 2024
1 parent 3659acb commit dbac164
Showing 1 changed file with 13 additions and 6 deletions.
19 changes: 13 additions & 6 deletions build.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,22 +39,30 @@ def install_requirements_in_venv():
"-r",
"requirements.txt",
]
subprocess.run(command)


else:
command = [
"venv/bin/python3",
"-m",
"pip",
"install",
"-r",
"requirements.txt",
]
subprocess.run(command)


def build_executable():
if getPlatform() == "linux" or getPlatform() == "darwin":
command = [
"python3",
"venv/bin/python3",
"-m",
"PyInstaller",
"main.py",
"--icon=icons/logo-v2.svg",
"--noconfirm",
"--noupx",
]
subprocess.run(command)
if getPlatform() == "win32":
command = [
r".\venv\Scripts\python.exe",
Expand All @@ -66,8 +74,7 @@ def build_executable():
"--noupx",
]

subprocess.run(command)
# copy("backend","dist\\main\\backend")
subprocess.run(command)


create_venv()
Expand Down

0 comments on commit dbac164

Please sign in to comment.