Skip to content

♻️ Specify Install Components for Wheel #1021

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Jun 27, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,9 @@ build.targets = [
"mqt-core-dd-bindings",
]

# Only install the mqt-core library and Python package components
install.components = ["mqt-core_Python", "mqt-core_Development", "mqt-core_Runtime"]

metadata.version.provider = "scikit_build_core.metadata.setuptools_scm"
sdist.include = ["python/mqt/core/_version.py"]
sdist.exclude = [
Expand Down
17 changes: 12 additions & 5 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,13 @@ if(MQT_CORE_INSTALL)
VERSION ${PROJECT_VERSION}
COMPATIBILITY SameMinorVersion)

install(FILES ${MQT_CORE_CMAKE_PROJECT_CONFIG_FILE} ${MQT_CORE_CMAKE_VERSION_CONFIG_FILE}
DESTINATION ${MQT_CORE_CONFIG_INSTALL_DIR})
install(
FILES ${MQT_CORE_CMAKE_PROJECT_CONFIG_FILE} ${MQT_CORE_CMAKE_VERSION_CONFIG_FILE}
DESTINATION ${MQT_CORE_CONFIG_INSTALL_DIR}
COMPONENT ${MQT_CORE_TARGET_NAME}_Development)

# FILE_SET should be aligned with LIBRARY and ARCHIVE, so we turn cmake-format off
# cmake-format: off
install(
TARGETS ${MQT_CORE_TARGETS}
EXPORT ${MQT_CORE_TARGETS_EXPORT_NAME}
Expand All @@ -105,8 +109,10 @@ if(MQT_CORE_INSTALL)
NAMELINK_COMPONENT ${MQT_CORE_TARGET_NAME}_Development
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
COMPONENT ${MQT_CORE_TARGET_NAME}_Development
FILE_SET HEADERS
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/mqt-core)
FILE_SET HEADERS
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/mqt-core
COMPONENT ${MQT_CORE_TARGET_NAME}_Development)
# cmake-format: on

install(
EXPORT ${MQT_CORE_TARGETS_EXPORT_NAME}
Expand All @@ -122,5 +128,6 @@ if(MQT_CORE_INSTALL)
${PROJECT_SOURCE_DIR}/cmake/PackageAddTest.cmake
${PROJECT_SOURCE_DIR}/cmake/PreventInSourceBuilds.cmake
${PROJECT_SOURCE_DIR}/cmake/StandardProjectSettings.cmake
DESTINATION ${MQT_CORE_CONFIG_INSTALL_DIR})
DESTINATION ${MQT_CORE_CONFIG_INSTALL_DIR}
COMPONENT ${MQT_CORE_TARGET_NAME}_Development)
endif()
Loading