File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ dependencies:
1111 - btllib>=1.7.2
1212 - libtorch=*=cpu*
1313 - pybind11
14+ - scikit-build-core
1415 - ntcard
1516 - ntstat
1617 - ntedit
Original file line number Diff line number Diff line change 11[build-system ]
2- requires = [" setuptools>=61 " ]
3- build-backend = " setuptools.build_meta "
2+ requires = [" scikit-build-core " , " pybind11 " ]
3+ build-backend = " scikit_build_core.build "
44
55[project ]
66name = " aiedit"
@@ -12,3 +12,8 @@ requires-python = ">=3.10"
1212
1313[project .scripts ]
1414aiedit = " aiedit.main:main"
15+
16+ [tool .scikit-build ]
17+ cmake.args = [" -DCMAKE_PREFIX_PATH={env.CONDA_PREFIX}" ]
18+ wheel.expand-macos-universal-tags = true
19+ wheel.packages = [" aiedit" ]
Original file line number Diff line number Diff line change @@ -18,25 +18,16 @@ target_link_libraries(
1818)
1919
2020set (aiedit_path ${PROJECT_SOURCE_DIR} /aiedit)
21- set_target_properties (core PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${aiedit_path} )
22-
23- set (_PY_SITE ${Python_SITEARCH} )
24- if (NOT _PY_SITE)
25- set (_PY_SITE ${Python_SITELIB} )
26- endif ()
27- if (NOT _PY_SITE)
28- message (FATAL_ERROR "Could not determine Python site-packages." )
29- endif ()
3021
3122install (
3223 TARGETS core
33- LIBRARY DESTINATION ${_PY_SITE} / aiedit
34- RUNTIME DESTINATION ${_PY_SITE} / aiedit
24+ LIBRARY DESTINATION aiedit
25+ RUNTIME DESTINATION aiedit
3526)
3627
3728install (
3829 DIRECTORY ${CMAKE_SOURCE_DIR} /aiedit/
39- DESTINATION ${_PY_SITE} / aiedit
30+ DESTINATION aiedit
4031 FILES_MATCHING
4132 PATTERN "*.py"
4233 PATTERN "*.pt"
@@ -46,9 +37,9 @@ find_program(PYBIND11_STUBGEN NAMES pybind11-stubgen)
4637if (PYBIND11_STUBGEN)
4738 add_custom_command (
4839 TARGET core
49- DEPENDS core POST_BUILD
50- COMMAND ${CMAKE_COMMAND} -E env PYTHONPATH=${aiedit_path} ${PYBIND11_STUBGEN} --output-dir
51- ${aiedit_path} core
40+ POST_BUILD
41+ COMMAND ${CMAKE_COMMAND} -E env PYTHONPATH=$<TARGET_FILE_DIR:core>
42+ ${PYBIND11_STUBGEN} --output-dir ${CMAKE_SOURCE_DIR} /aiedit core
5243 COMMENT "Generating Python stubs"
5344 )
5445endif ()
You can’t perform that action at this time.
0 commit comments