Browse Source

Run pre-build tasks only when the appropriate cmd gets supplied

doc-issue-template
MrS0m30n3 7 years ago
parent
commit
ce0d85b659
1 changed files with 7 additions and 3 deletions
  1. 10
      setup.py

10
setup.py

@ -55,6 +55,9 @@ import glob
from shutil import copyfile
from subprocess import call
# Commands that run the pre-build tasks
EXEC_PRE_COMMANDS = ["py2exe", "install", "bdist", "build"]
PY2EXE = len(sys.argv) >= 2 and sys.argv[1] == "py2exe"
if PY2EXE:
@ -216,9 +219,10 @@ def windows_setup():
return normal_setup()
# Execute pre-build stuff
create_scripts()
build_translations()
# Execute pre-build tasks
if any(command in sys.argv for command in EXEC_PRE_COMMANDS):
create_scripts()
build_translations()
if os.name == "nt":
params = windows_setup()

Loading…
Cancel
Save