From bb4ae1bf6e9be6be3d28eb00053882a26dee4e4b Mon Sep 17 00:00:00 2001 From: Hugo Osvaldo Barrera Date: Mon, 28 Aug 2017 19:54:07 -0300 Subject: [PATCH] Avoid switching python interpreter when publishing If setup.py is run via `python2.7 setup.py publish`, the current code will invoke the default python, rather than the explicitly called one. Avoid that by spawning the same interpreter. --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 01410e8..6f40825 100644 --- a/setup.py +++ b/setup.py @@ -27,7 +27,7 @@ with open(os.path.join(here, NAME, "__version__.py")) as f: # Support "$ setup.py publish". if sys.argv[-1] == "publish": - os.system("python setup.py sdist bdist_wheel upload") + os.system("{} setup.py sdist bdist_wheel upload".format(sys.executable)) sys.exit() # What packages are required for this module to be executed?