Skip to content
This repository has been archived by the owner on Sep 1, 2023. It is now read-only.

Commit

Permalink
Fix setup.py handling of CLI options for --cmake_options and --make_o…
Browse files Browse the repository at this point in the history
…ptions
  • Loading branch information
oxtopus committed Sep 3, 2014
1 parent 3a18212 commit 03ee712
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions setup.py
Expand Up @@ -21,19 +21,22 @@
makeOptions = ""
setupOptions = ""
mustBuildExtensions = False
for arg in sys.argv:
for arg in sys.argv[:]:
if ("cmake_options" in arg) or ("make_options" in arg):
(option, _, rhs) = arg.partition("=")
if option[0] == "--cmake_options":
if option == "--cmake_options":
cmakeOptions = rhs
if option[0] == "--make_options":
sys.argv.remove(arg)
if option == "--make_options":
makeOptions = rhs
sys.argv.remove(arg)
elif not "setup.py" in arg:
if ("build" in arg) or ("install" in arg):
mustBuildExtensions = True
setupOptions += arg + " "



# Check if no option was passed, i.e. if "setup.py" is the only option
# If True, "develop" is passed by default
# This is useful when a developer wish build the project directly from an IDE
Expand Down

0 comments on commit 03ee712

Please sign in to comment.