Unverified Commit 2b4ea0b4 authored by Simon Ward's avatar Simon Ward
Browse files

Fixup some errors

parent 1ca0fd37
Pipeline #10479 passed with stages
in 13 minutes and 8 seconds
......@@ -110,7 +110,7 @@ endif (DOXYGEN_FOUND)
# Tests
#################################
# Add tests
add_test(NAME "Python_API_Tests" COMMAND ${Python3_EXECUTABLE} -m unittest discover ${CMAKE_CURRENT_BINARY_DIR}/../Tests)
add_test(NAME "Python_API_Tests" COMMAND ${PYTHON_INTERPRETER_PATH} -m unittest discover ${CMAKE_CURRENT_BINARY_DIR}/../Tests)
if(PYSETUP)
add_custom_target(Python_Files ALL
COMMAND
......
......@@ -20,6 +20,8 @@ from setuptools.command.install_scripts import install_scripts
try:
from find_libpython import find_libpython
p_lib = find_libpython()
if os.environ.get('FLIP_SLASHES', False):
p_lib = p_lib.replace('\\', '/')
if p_lib is not None:
python_lib_path = f'-DPYTHON_LIBRARY_PATH={p_lib}'
else:
......@@ -57,10 +59,8 @@ if os.environ.get('FC', False):
COMPILER = os.environ.get('FC')
print(f'Compiler set to: {COMPILER}')
CFML_OVERRIDE = []
if os.environ.get('CMAKE_Fortran_COMPILER', False):
CFML_OVERRIDE.append(f"-DCMAKE_Fortran_COMPILER={os.environ.get('CMAKE_Fortran_COMPILER')}")
if os.environ.get('CMAKE_GENERATOR', False):
CFML_OVERRIDE.append(f"-G\"{os.environ.get('CMAKE_GENERATOR')}\"")
CFML_OVERRIDE += ["-G", f"{os.environ.get('CMAKE_GENERATOR')}"]
# We can use cmake provided from pip which (normally) gets installed at /bin
......@@ -268,8 +268,8 @@ class BuildCMakeExt(build_ext):
'-B' + self.build_temp,
f'-DPYTHON_INTERPRETER_PATH={sys.executable}',
python_lib_path,
f"-DCMAKE_Fortran_COMPILER={COMPILER}",
"-DARCH32=OFF",
"-DCMAKE_Fortran_COMPILER={}".format(COMPILER),
"-DPYTHON_API=ON",
"-DUSE_HDF=OFF",
"-DCMAKE_BUILD_TYPE={}".format(cfg), # not used on MSVC, but no harm
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment