Skip to content
This repository has been archived by the owner on Jan 13, 2024. It is now read-only.

Commit

Permalink
fix path in setup
Browse files Browse the repository at this point in the history
  • Loading branch information
sdpython committed Jun 29, 2017
1 parent 6d471da commit eeac16a
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion setup.py
Expand Up @@ -190,6 +190,21 @@ def write_version():
"bdist_wheel", "publish", "publish_doc", "register",
"upload_docs", "bdist_wininst"} & set(sys.argv)):
raise Exception("unable to interpret command line: " + str(sys.argv))

must_build = False
for k in {'unittests', 'unittests_LONG', 'unittests_SKIP', 'unittests_GUI', 'build_sphinx'}:
if k in sys.argv:
must_build = True
break
if must_build:
exe = os.executable
setup = os.path.join(os.path.abspath(os.path.dirname(__file__)), "setup.py")
cmd = "{0} {1} build_ext --inplace".format(exe, setup)
from pyquickhelper.loghelper import run_cmd
out, err = run_cmd(cmd, wait)
if len(err) > 0:
raise Exeception(err)
print(out)
else:
r = False

Expand All @@ -198,7 +213,7 @@ def write_version():
pyquickhelper = import_pyquickhelper()
from pyquickhelper.pycode import process_standard_options_for_setup_help
process_standard_options_for_setup_help(sys.argv)

root = os.path.abspath(os.path.dirname(__file__))
setup(
name=project_var_name,
ext_modules=[
Expand Down

0 comments on commit eeac16a

Please sign in to comment.