Skip to content

Commit e085edc

Browse files
committed
build using scikit build core
1 parent 84f4c18 commit e085edc

5 files changed

Lines changed: 64 additions & 134 deletions

File tree

CMakeLists.txt

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
cmake_minimum_required(VERSION 3.20)
2+
3+
project(spicedmodel LANGUAGES CXX)
4+
5+
set(BUILD_TESTING OFF CACHE BOOL "Build bundled SPICED tests" FORCE)
6+
add_subdirectory(spicedmodel/__data/spiced)
7+
8+
# scikit-build-core installs this component directly into the wheel. The
9+
# submodule's development files and CMake package are intentionally omitted.
10+
install(
11+
TARGETS spiced ann
12+
LIBRARY DESTINATION spicedmodel/__data/spiced/lib COMPONENT Python
13+
RUNTIME DESTINATION spicedmodel/__data/spiced/lib COMPONENT Python
14+
)

MANIFEST.in

Lines changed: 0 additions & 3 deletions
This file was deleted.

pyproject.toml

Lines changed: 49 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,50 @@
11
[build-system]
2-
requires = ["setuptools>=61", "wheel", "cmake>=3.20"]
3-
build-backend = "setuptools.build_meta"
2+
requires = ["scikit-build-core>=1.0.3"]
3+
build-backend = "scikit_build_core.build"
4+
5+
[project]
6+
name = "spicedmodel"
7+
version = "1.0.0"
8+
description = "Python wrapper for the Scalable Plasma Ion Composition and Electron Density (SPICED) model"
9+
readme = "README.md"
10+
license = "MIT"
11+
authors = [
12+
{ name = "Matthew Knight James", email = "mattkjames7@gmail.com" },
13+
]
14+
classifiers = [
15+
"Programming Language :: Python :: 3",
16+
]
17+
dependencies = [
18+
"numpy",
19+
"matplotlib",
20+
]
21+
22+
[project.urls]
23+
Homepage = "https://github.com/mattkjames7/spicedmodel"
24+
25+
[tool.scikit-build]
26+
minimum-version = "build-system.requires"
27+
cmake.version = ">=3.20"
28+
cmake.build-type = "Release"
29+
wheel.packages = ["spicedmodel"]
30+
install.components = ["Python"]
31+
sdist.exclude = [
32+
"spicedmodel/__data/spiced/build",
33+
"spicedmodel/__data/spiced/.git",
34+
"**/__pycache__",
35+
]
36+
wheel.exclude = [
37+
"spicedmodel/__data/spiced/.github",
38+
"spicedmodel/__data/spiced/cmake",
39+
"spicedmodel/__data/spiced/examples",
40+
"spicedmodel/__data/spiced/include",
41+
"spicedmodel/__data/spiced/legacy",
42+
"spicedmodel/__data/spiced/src",
43+
"spicedmodel/__data/spiced/test",
44+
"spicedmodel/__data/spiced/.git*",
45+
"spicedmodel/__data/spiced/BUILD.md",
46+
"spicedmodel/__data/spiced/CMakeLists.txt",
47+
"spicedmodel/__data/spiced/LICENSE",
48+
"spicedmodel/__data/spiced/README.md",
49+
"spicedmodel/__data/spiced/data.tar.gz",
50+
]

setup.py

Lines changed: 0 additions & 128 deletions
This file was deleted.

spicedmodel/_CFunctions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
dll_dir = os.path.dirname(__file__)+r"\__data\spiced\lib"
1515
with os.add_dll_directory(dll_dir):
1616
ct.CDLL(dll_dir+r"\ann.dll")
17-
liblsmodel = ct.CDLL(dll_dir+r"\libspiced.dll")
17+
liblsmodel = ct.CDLL(dll_dir+r"\spiced.dll")
1818
else:
1919
raise OSError("Unsupported operating system: {:s}".format(OS))
2020

0 commit comments

Comments
 (0)