Skip to content

Commit

Permalink
WIP: use scikit-build-core
Browse files Browse the repository at this point in the history
  • Loading branch information
maxnoe committed Feb 9, 2024
1 parent c3b01b7 commit 879938d
Show file tree
Hide file tree
Showing 5 changed files with 40 additions and 162 deletions.
39 changes: 33 additions & 6 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,35 @@
[build-system]
requires = [
"setuptools>=45",
"wheel",
"cmake>=3.16",
"conan>=2.0.0",
requires = ["scikit-build-core[pyproject]", "pybind11", "setuptools_scm[toml]"]
build-backend = "scikit_build_core.build"

[project]
name = "proposal"
version = "7.6.3"
description = "Python bindings for PROPOSAL"
readme = "README.md"
requires-pyton = ">= 3.9"
license = {text = "BSD-3-Clause"}
maintainers = [
{name = "Jean-Marco Alamedine", email = "[email protected]"},
]

[project.urls]
repository = "https://github.com/tudo-astroparticlephysics/PROPOSAL"


[project.optional-dependencies]
tests = [
"pytest",
]

all = ["proposal[tests]"]


[tool.scikit-build]
sdist.cmake = true
cmake.targets = ["pyPROPOSAL"]
cmake.args = [
"-DCMAKE_BUILD_WITH_INSTALL_RPATH:BOOL=ON",
"-DCMAKE_INSTALL_RPATH_USE_LINK_PATH:BOOL=ON",
"-DBUILD_PYTHON=ON",
]
build-backend = "setuptools.build_meta"
24 changes: 0 additions & 24 deletions setup.cfg

This file was deleted.

130 changes: 0 additions & 130 deletions setup.py

This file was deleted.

7 changes: 7 additions & 0 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
include(GNUInstallDirs)

if(SKBUILD)
message(STATUS "SKBUILD")
set(CMAKE_INSTALL_LIBDIR ".")
set(CMAKE_INSTALL_INCLUDEDIR "proposal/include")
endif()
add_subdirectory(PROPOSAL)

if(BUILD_PYTHON)
Expand Down
2 changes: 0 additions & 2 deletions src/PROPOSAL/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
include(GNUInstallDirs)

add_library(PROPOSAL)
add_library(PROPOSAL::PROPOSAL ALIAS PROPOSAL)

Expand Down

0 comments on commit 879938d

Please sign in to comment.