Skip to content

Commit

Permalink
Try Linux builds #4
Browse files Browse the repository at this point in the history
  • Loading branch information
christoph2 committed Aug 27, 2024
1 parent c55165d commit 568ad99
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions build_ext.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,16 @@ def build_extension(debug: bool = False, use_temp_dir: bool = False) -> None:
debug = bool(os.environ.get("DEBUG", 0)) or debug
cfg = "Debug" if debug else "Release"
print(f" BUILD-TYPE: {cfg!r}")

cmake_args = [
# f"-DPYTHON_EXECUTABLE={sys.executable}",
f"-DCMAKE_BUILD_TYPE={cfg}", # not used on MSVC, but no harm
]

if uname.system == 'Linux' and 'CIBUILDWHEEL' in os.environ:
cmake_args += f"-DPYTHON_INCLUDE_DIR={sysconfig.get_path('include')}"
cmake_args += f"-DPYTHON_LIBRARY={str(Path(sysconfig.get_config_var('LIBDIR')) / Path(sysconfig.get_config_var('LDLIBRARY')))}"

build_args = ["--config Release", "--verbose"]
# cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=1 /path/to/src

Expand Down

0 comments on commit 568ad99

Please sign in to comment.