diff --git a/CMakeLists.txt b/CMakeLists.txt index a27c06d..b492f46 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -16,13 +16,13 @@ find_package(pybind11 CONFIG REQUIRED) # Add a library using FindPython's tooling (pybind11 also provides a helper like # this) -python_add_library(_core MODULE cpp/src/wrapper.cpp WITH_SOABI) -target_link_libraries(_core PRIVATE pybind11::headers) -target_include_directories(_core PRIVATE cpp/external/eigen/) -target_include_directories(_core PRIVATE cpp/include/) +python_add_library(_diffcp MODULE cpp/src/wrapper.cpp WITH_SOABI) +target_link_libraries(_diffcp PRIVATE pybind11::headers) +target_include_directories(_diffcp PRIVATE cpp/external/eigen/) +target_include_directories(_diffcp PRIVATE cpp/include/) # This is passing in the version as a define just as an example -target_compile_definitions(_core PRIVATE VERSION_INFO=${PROJECT_VERSION}) +target_compile_definitions(_diffcp PRIVATE VERSION_INFO=${PROJECT_VERSION}) # The install directory is the output (wheel) directory -install(TARGETS _core DESTINATION scikit_build_example) +install(TARGETS _diffcp DESTINATION diffcp) diff --git a/diffcp/cone_program.py b/diffcp/cone_program.py index fcd0c5f..ff16ec9 100644 --- a/diffcp/cone_program.py +++ b/diffcp/cone_program.py @@ -6,7 +6,7 @@ import scipy.sparse as sparse from threadpoolctl import threadpool_limits -import _diffcp +import diffcp._diffcp as _diffcp import diffcp.cones as cone_lib diff --git a/diffcp/cones.py b/diffcp/cones.py index ec2bd95..f54dea1 100644 --- a/diffcp/cones.py +++ b/diffcp/cones.py @@ -1,6 +1,6 @@ import numpy as np import scipy.sparse as sparse -from _diffcp import project_exp_cone, Cone, ConeType +from diffcp._diffcp import project_exp_cone, Cone, ConeType ZERO = "z" POS = "l"