Skip to content

Commit c49ce71

Browse files
committed
Adjusts diffcp import
1 parent dda6aef commit c49ce71

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

CMakeLists.txt

+6-6
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,13 @@ find_package(pybind11 CONFIG REQUIRED)
1616

1717
# Add a library using FindPython's tooling (pybind11 also provides a helper like
1818
# this)
19-
python_add_library(_core MODULE cpp/src/wrapper.cpp WITH_SOABI)
20-
target_link_libraries(_core PRIVATE pybind11::headers)
21-
target_include_directories(_core PRIVATE cpp/external/eigen/)
22-
target_include_directories(_core PRIVATE cpp/include/)
19+
python_add_library(_diffcp MODULE cpp/src/wrapper.cpp WITH_SOABI)
20+
target_link_libraries(_diffcp PRIVATE pybind11::headers)
21+
target_include_directories(_diffcp PRIVATE cpp/external/eigen/)
22+
target_include_directories(_diffcp PRIVATE cpp/include/)
2323

2424
# This is passing in the version as a define just as an example
25-
target_compile_definitions(_core PRIVATE VERSION_INFO=${PROJECT_VERSION})
25+
target_compile_definitions(_diffcp PRIVATE VERSION_INFO=${PROJECT_VERSION})
2626

2727
# The install directory is the output (wheel) directory
28-
install(TARGETS _core DESTINATION scikit_build_example)
28+
install(TARGETS _diffcp DESTINATION diffcp)

diffcp/cone_program.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
import scipy.sparse as sparse
77
from threadpoolctl import threadpool_limits
88

9-
import _diffcp
9+
import diffcp._diffcp as _diffcp
1010
import diffcp.cones as cone_lib
1111

1212

diffcp/cones.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import numpy as np
22
import scipy.sparse as sparse
3-
from _diffcp import project_exp_cone, Cone, ConeType
3+
from diffcp._diffcp import project_exp_cone, Cone, ConeType
44

55
ZERO = "z"
66
POS = "l"

0 commit comments

Comments
 (0)