mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-04-21 11:20:04 +02:00
skeleton pyproject.toml
This commit is contained in:
parent
3c2f149c22
commit
eb8c34f53b
@ -1,6 +1,6 @@
|
|||||||
# SPDX-License-Identifier: LGPL-3.0-or-other
|
# SPDX-License-Identifier: LGPL-3.0-or-other
|
||||||
# Copyright (C) 2021 Contributors to the SLS Detector Package
|
# Copyright (C) 2021 Contributors to the SLS Detector Package
|
||||||
cmake_minimum_required(VERSION 3.14)
|
cmake_minimum_required(VERSION 3.15)
|
||||||
project(slsDetectorPackage)
|
project(slsDetectorPackage)
|
||||||
|
|
||||||
# Read VERSION file into project version
|
# Read VERSION file into project version
|
||||||
@ -29,6 +29,10 @@ include(FetchContent)
|
|||||||
option(SLS_FETCH_ZMQ_FROM_GITHUB "Fetch zmq from github" OFF)
|
option(SLS_FETCH_ZMQ_FROM_GITHUB "Fetch zmq from github" OFF)
|
||||||
option(SLS_FETCH_PYBIND11_FROM_GITHUB "Fetch pybind11 from github" OFF)
|
option(SLS_FETCH_PYBIND11_FROM_GITHUB "Fetch pybind11 from github" OFF)
|
||||||
|
|
||||||
|
if(${SKBUILD})
|
||||||
|
message(STATUS "Building with scikit-build")
|
||||||
|
endif()
|
||||||
|
|
||||||
if(SLS_FETCH_ZMQ_FROM_GITHUB)
|
if(SLS_FETCH_ZMQ_FROM_GITHUB)
|
||||||
# Opt in to pull down a zmq version from github instead of
|
# Opt in to pull down a zmq version from github instead of
|
||||||
# using the bundled verison
|
# using the bundled verison
|
||||||
|
22
pyproject.toml
Normal file
22
pyproject.toml
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
[build-system]
|
||||||
|
requires = ["scikit-build-core>=0.10", "pybind11", "numpy"]
|
||||||
|
build-backend = "scikit_build_core.build"
|
||||||
|
|
||||||
|
[project]
|
||||||
|
name = "slsDetectorPackage"
|
||||||
|
version = "2025.2.18"
|
||||||
|
|
||||||
|
|
||||||
|
[tool.scikit-build]
|
||||||
|
cmake.verbose = true
|
||||||
|
cmake.build-type = "Release"
|
||||||
|
install.components = ["python"]
|
||||||
|
|
||||||
|
|
||||||
|
[tool.scikit-build.cmake.define]
|
||||||
|
SLS_USE_RECEIVER = "OFF"
|
||||||
|
SLS_USE_RECEIVER_BINARIES = "OFF"
|
||||||
|
SLS_USE_TEXTCLIENT = "OFF"
|
||||||
|
SLS_USE_PYTHON = "ON"
|
||||||
|
SLS_INSTALL_PYTHONEXT = "ON"
|
||||||
|
SLS_BUILD_SHARED_LIBRARIES = "OFF"
|
@ -72,9 +72,18 @@ configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/../VERSION
|
|||||||
if(SLS_INSTALL_PYTHONEXT)
|
if(SLS_INSTALL_PYTHONEXT)
|
||||||
install(TARGETS _slsdet
|
install(TARGETS _slsdet
|
||||||
EXPORT "${TARGETS_EXPORT_NAME}"
|
EXPORT "${TARGETS_EXPORT_NAME}"
|
||||||
LIBRARY DESTINATION ${CMAKE_INSTALL_PREFIX}/python
|
LIBRARY DESTINATION slsdet
|
||||||
|
COMPONENT python
|
||||||
)
|
)
|
||||||
|
install(
|
||||||
|
FILES ${PYTHON_FILES}
|
||||||
|
DESTINATION slsdet
|
||||||
|
COMPONENT python
|
||||||
|
)
|
||||||
|
install(
|
||||||
|
FILES ../VERSION
|
||||||
|
DESTINATION slsdet
|
||||||
|
COMPONENT python
|
||||||
|
)
|
||||||
|
|
||||||
install(FILES ${PYTHON_FILES} DESTINATION ${CMAKE_INSTALL_PREFIX}/python/slsdet)
|
|
||||||
install(FILES ../VERSION DESTINATION ${CMAKE_INSTALL_PREFIX}/python/slsdet)
|
|
||||||
endif()
|
endif()
|
Loading…
x
Reference in New Issue
Block a user