Skip to content

Commit

Permalink
libmambapy: No warning as error on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
JohanMabille committed Feb 11, 2025
1 parent a7ec895 commit 3301623
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions libmambapy/setup.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import importlib.util
import os
import pathlib
import sys

import skbuild
import skbuild.constants
Expand All @@ -23,6 +24,13 @@ def libmambapy_version():
return ver.__version__


def get_cmake_args():
cmake_args = [f"-DMAMBA_INSTALL_PYTHON_EXT_LIBDIR={CMAKE_INSTALL_DIR()}/src/libmambapy"]
if sys.platform != "win32" and sys.platform != "cygwin":
cmake_args += ["-DMAMBA_WARNING_AS_ERROR=ON"]
return cmake_args


skbuild.setup(
version=libmambapy_version(),
packages=["libmambapy", "libmambapy.bindings", "libmambapy.solver"],
Expand All @@ -31,8 +39,5 @@ def libmambapy_version():
cmake_languages=["CXX"],
cmake_minimum_required_version="3.17",
cmake_install_dir="src/libmambapy", # Must match package_dir layout
cmake_args=[
f"-DMAMBA_INSTALL_PYTHON_EXT_LIBDIR={CMAKE_INSTALL_DIR()}/src/libmambapy",
f"-DMAMBA_WARNING_AS_ERROR=ON",
],
cmake_args=get_cmake_args(),
)

0 comments on commit 3301623

Please sign in to comment.