Skip to content

Commit

Permalink
No need to modify 'python' when creating a source distribution (ref #208
Browse files Browse the repository at this point in the history
)
  • Loading branch information
manodeep committed Feb 3, 2020
1 parent ac52942 commit e6cd90b
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions setup.py
Expand Up @@ -225,12 +225,14 @@ def requirements_check():

# Since arbitrary python can be used even within the Makefile
# make sure that the current python executable is the same as the
# one specified in common.mk. Easiest way is to replace
this_python = sys.executable
key = "PYTHON"
replacement = '\n{0}:={1}'.format(key, this_python)
common = replace_first_key_in_makefile(common, key, replacement,
common_mk_file)
# one specified in common.mk. Easiest way is to replace,
# but no need to do so if creating a source distribution
if 'sdist' not in sys.argv:
this_python = sys.executable
key = "PYTHON"
replacement = '\n{0}:={1}'.format(key, this_python)
common = replace_first_key_in_makefile(common, key, replacement,
common_mk_file)

# Check if CC is in argv:
CC = "CC"
Expand Down

0 comments on commit e6cd90b

Please sign in to comment.