Skip to content

Commit

Permalink
Revert "Debug mode for Makefiles"
Browse files Browse the repository at this point in the history
This reverts commit 266742b.
  • Loading branch information
johnlees committed Mar 16, 2024
1 parent 266742b commit 3897e51
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,24 +77,22 @@ def build_extension(self, ext):
env = os.environ.copy()
env['CXXFLAGS'] = '{} -DVERSION_INFO=\\"{}\\"'.format(env.get('CXXFLAGS', ''),
self.distribution.get_version())
make_call = []
if cfg == 'Debug':
make_call = ["DEBUG=1"]
make_call.append("make")
env['CXXFLAGS'] += "-DDEBUG"

if not os.path.exists(self.build_temp):
os.makedirs(self.build_temp)

target = os.getenv('SKETCHLIB_INSTALL', None)
if target == 'conda':
subprocess.check_call(make_call + ['python', 'LIBLOC="' + os.environ['PREFIX'] + '"'], cwd=ext.sourcedir + '/src', env=env)
subprocess.check_call(make_call + [ 'install_python', 'LIBLOC="' + os.environ['PREFIX'] + '"', 'PYTHON_LIB_PATH=' + extdir], cwd=ext.sourcedir + '/src', env=env)
subprocess.check_call(['make', 'python', 'LIBLOC="' + os.environ['PREFIX'] + '"'], cwd=ext.sourcedir + '/src', env=env)
subprocess.check_call(['make', 'install_python', 'LIBLOC="' + os.environ['PREFIX'] + '"', 'PYTHON_LIB_PATH=' + extdir], cwd=ext.sourcedir + '/src', env=env)
elif target == 'azure':
subprocess.check_call(make_call + [ 'python'], cwd=ext.sourcedir + '/src', env=env)
subprocess.check_call(make_call + [ 'install_python', 'PYTHON_LIB_PATH=' + extdir], cwd=ext.sourcedir + '/src', env=env)
subprocess.check_call(['make', 'python'], cwd=ext.sourcedir + '/src', env=env)
subprocess.check_call(['make', 'install_python', 'PYTHON_LIB_PATH=' + extdir], cwd=ext.sourcedir + '/src', env=env)
elif target == 'jlees':
subprocess.check_call(make_call + [ '-f', 'Makefile_fedora38', 'python'], cwd=ext.sourcedir + '/src', env=env)
subprocess.check_call(make_call + ['install_python', 'PYTHON_LIB_PATH=' + extdir], cwd=ext.sourcedir + '/src', env=env)
subprocess.check_call(['make', '-f', 'Makefile_fedora38', 'python'], cwd=ext.sourcedir + '/src', env=env)
subprocess.check_call(['make', 'install_python', 'PYTHON_LIB_PATH=' + extdir], cwd=ext.sourcedir + '/src', env=env)
else:
subprocess.check_call(['cmake', ext.sourcedir] + cmake_args, cwd=self.build_temp, env=env)
subprocess.check_call(['cmake', '--build', '.'] + build_args, cwd=self.build_temp)
Expand Down

0 comments on commit 3897e51

Please sign in to comment.