forked from oofem/oofem
-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathpyproject.toml
More file actions
112 lines (94 loc) · 3.78 KB
/
Copy pathpyproject.toml
File metadata and controls
112 lines (94 loc) · 3.78 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
[project]
name = 'oofem'
requires-python = '>=3.11'
readme='README.md'
license={'file'='COPYING.LGPLv2.1'}
dynamic=['version']
## not sure why packaging==24.2 is needed, but without it pyodide env has packaging==25.0
## and the installation then fails with FileNotFoundError (packaging-24.2.dist-info/METADATA)
## see also https://github.com/pyodide/pyodide/discussions/4632 for discussion
dependencies = [ 'pytest', 'numpy', 'matplotlib' ]
description='oofem etc'
[build-system]
#requires = ['py-build-cmake~=0.4.2','pytest']
#build-backend = "py_build_cmake.build"
requires=['scikit-build-core','pybind11','pytest']
build-backend = 'scikit_build_core.build'
[tool.scikit-build]
metadata.version.provider = "scikit_build_core.metadata.setuptools_scm"
build.verbose = true
logging.level = 'INFO'
install.components=['python_module']
sdist.cmake = false
sdist.exclude = ['.cache','.wenv']
wheel.packages = ['bindings/python/oofem']
#sdist.include = ['CMakeLists.txt','bindings/python','cmake','src','extern','doc','README','README.md','pyproject.toml','COPYING.LGPLv2.1']
[tool.setuptools_scm]
[tool.py-build-cmake.sdist]
include = ['CMakeLists.txt','bindings/python','cmake','src','extern','doc','README']
exclude = ['**/_build','.*']
[tool.py-build-cmake.cmake]
minimum_version="3.17"
build_type="Release"
options = {'USE_PYBIND_BINDINGS'='1','USE_SHARED_LIB'='0','USE_SM'='1','USE_FM'='1','USE_TM'='1','USE_MPM'='1','USE_OOFEM_EXE'='0'}
install_components=['python_module']
# https://github.com/pypa/cibuildwheel/issues/643
# use Ninja everywhere (including windows), where it needs compiler paths to be set up (done via setup-msvc-dev in cibuildwheel.yml)
generator ='Ninja'
[tool.scikit-build.cmake]
build-type="Release"
args=['-GNinja']
[tool.scikit-build.cmake.define]
USE_PYBIND_BINDINGS=1
USE_SHARED_LIB=0
USE_SM=1
USE_FM=1
USE_TM=1
USE_MPM=1
USE_OOFEM_EXE=0
[[tool.scikit-build.overrides]]
if.platform-system='win32'
cmake.args=['-GNinja','-DCMAKE_C_COMPILER=cl','-DCMAKE_CXX_COMPILER=cl']
[tool.py-build-cmake.windows.cmake]
# extra options, but pass them as args so that options don't have to be repeated
args = ['-DCMAKE_C_COMPILER=cl','-DCMAKE_CXX_COMPILER=cl']
[tool.py-build-cmake.module]
name='oofem'
directory = 'bindings/python'
[tool.py-build-cmake.editable]
mode='symlink'
build_hook = true
#[tool.mypy]
#files = "setup.py"
#python_version = "3.7"
#strict = true
#show_error_codes = true
#enable_error_code = ["ignore-without-code", "redundant-expr", "truthy-bool"]
#warn_unreachable = true
#[[tool.mypy.overrides]]
#module = ["ninja"]
#ignore_missing_imports = true
[tool.pytest.ini_options]
testpaths = ["bindings/python/tests"]
pythonpath=["bindings/python/oofem","build"]
[tool.cibuildwheel]
test-command = "pytest {project}/bindings/python/tests"
# test-extras = ["test"]
# test-skip = ["*universal2:arm64"]
# Setuptools bug causes collision between pypy and cpython artifacts
before-build = "rm -rf {project}/build"
build-verbosity = 1
# see https://cibuildwheel.pypa.io/en/stable/cpp_standards/#macos-and-deployment-target-versions for MACOSX_DEPLOYMENT_TARGET
environment = { PY_BUILD_CMAKE_VERBOSE="1", MACOSX_DEPLOYMENT_TARGET="10.14" }
# same as CIBW_SKIP environment in the workflow file (cibuildhweel.yml)
# (a) skip all 32-bit builds (source issue: datastream.h assumes size_t != unsigned long, which breaks on 32bit)
# (b) skipy pypy builds: embedding interpreter not supported (pythonfield.C)
# (c) skip all musllinux builds (compiles but segfaults at import time)
skip = "*-win32 *-manylinux_i686 pp* *musllinux*"
[tool.cibuildwheel.linux]
# skip i686 on linux
archs = ["x86_64"]
#[[tool.cibuildwheel.windows]]
## seems not necessary with MSVC builds, and might become the default in cibuildwheel itself later
#before-build = "pip install delvewheel"
#repair-wheel-command = "delvewheel repair -w {dest_dir} {wheel}"