From 06e1ff73727d20dc23d6eeda1d08f824a07be9c0 Mon Sep 17 00:00:00 2001 From: Lukas Burgholzer Date: Fri, 24 May 2024 15:28:16 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=93=A6=20smaller=20Python=20wheels=20(#39?= =?UTF-8?q?7)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Description This PR reduces the binary wheel size for the project by only installing the specific python bindings CMake component. ## Checklist: - [x] The pull request only contains commits that are related to it. - [x] I have added appropriate tests and documentation. - [x] I have made sure that all CI jobs on GitHub pass. - [x] The pull request introduces no new warnings and follows the project's style guidelines. Signed-off-by: burgholzer --- pyproject.toml | 2 ++ src/python/CMakeLists.txt | 5 ++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 550c0697..99f0d1ae 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -85,6 +85,8 @@ build-dir = "build/{wheel_tag}" # Explicitly set the package directory wheel.packages = ["src/mqt"] +install.components = ["mqt-qcec_Python"] + metadata.version.provider = "scikit_build_core.metadata.setuptools_scm" sdist.include = ["src/mqt/qcec/_version.py"] sdist.exclude = [ diff --git a/src/python/CMakeLists.txt b/src/python/CMakeLists.txt index 3b616099..112b66e7 100644 --- a/src/python/CMakeLists.txt +++ b/src/python/CMakeLists.txt @@ -10,4 +10,7 @@ target_link_libraries(pyqcec PRIVATE MQT::QCEC MQT::CorePython pybind11_json MQT::ProjectOptions MQT::ProjectWarnings) # Install directive for scikit-build-core -install(TARGETS pyqcec LIBRARY DESTINATION .) +install( + TARGETS pyqcec + DESTINATION . + COMPONENT mqt-qcec_Python)