Skip to content

Commit

Permalink
Fixed BuildCommand in setup.py when python_library is None
Browse files Browse the repository at this point in the history
  • Loading branch information
mwydmuch committed Nov 22, 2021
1 parent 7ae9576 commit a725c64
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def get_python_library(python_root_dir):
path = os.path.join(python_root_dir, path_format.format(*python_version.split('.'), library_extension))
if os.path.exists(path):
return path

return None


Expand Down Expand Up @@ -96,7 +96,7 @@ def run(self):
sndfile_lib=os.path.join(deps_root, 'libsndfile/lib/libsndfile-1.lib')
sndfile_dll=os.path.join(deps_root, 'libsndfile/bin/libsndfile-1.dll')

os.environ["OPENALDIR"]=str(os.path.join(deps_root, 'openal-soft'))
os.environ["OPENALDIR"] = str(os.path.join(deps_root, 'openal-soft'))
openal_dll=os.path.join(deps_root, 'openal-soft/bin/Win64/OpenAL32.dll')

cmake_arg_list.extend(
Expand All @@ -119,10 +119,10 @@ def run(self):
python_library = get_python_library(python_root_dir)
python_include_dir = sysconfig.get_python_inc()

if os.path.exists(python_include_dir):
if python_include_dir and os.path.exists(python_include_dir):
cmake_arg_list.append("-DPYTHON_INCLUDE_DIR={}".format(python_include_dir))
if os.path.exists(python_library):

if python_library and os.path.exists(python_library):
cmake_arg_list.append("-DPYTHON_LIBRARY={}".format(python_library))

if os.path.exists('CMakeCache.txt'):
Expand Down

0 comments on commit a725c64

Please sign in to comment.