File: pyproject.toml

package info (click to toggle)
fenics-basix 0.9.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 3,076 kB
  • sloc: cpp: 22,542; python: 10,184; makefile: 40; sh: 24
file content (130 lines) | stat: -rw-r--r-- 4,304 bytes parent folder | download
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
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
[build-system]
requires = ["scikit-build-core[pyproject]>=0.5.0", "nanobind>=1.6.0"]
build-backend = "scikit_build_core.build"

[project]
name = "fenics-basix"
version = "0.9.0"
description = "Basix Python interface"
readme = "README.md"
requires-python = ">=3.9"
license = { file = "LICENSE" }
authors = [
    { email = "fenics-steering-council@googlegroups.com" },
    { name = "FEniCS Steering Council" },
]
dependencies = ["numpy>=1.21"]

[project.urls]
homepage = "https://fenicsproject.org"
repository = "https://github.com/fenics/basix.git"
documentation = "https://docs.fenicsproject.org"

[project.optional-dependencies]
docs = ["markdown", "pylit3", "pyyaml", "sphinx", "sphinx_rtd_theme"]
lint = ["ruff"]
optional = ["numba", "fenics-ufl>=2024.2.0,<2024.3.0"]
test = ["pytest", "sympy", "scipy", "matplotlib", "fenics-basix[optional]"]
ci = ["mypy", "pytest-xdist", "fenics-basix[docs,lint,test,optional]"]

[tool.pytest.ini_options]
testpaths = ["test"]

[tool.scikit-build]
minimum-version = "0.5"
cmake.minimum-version = "3.19.0"
wheel.packages = ["python/basix"]

[tool.cibuildwheel]
build = [
    "cp{39,310,311,312}-manylinux_x86_64",
    "cp{39,310,311,312}-manylinux_aarch64",
    "cp{39,310,311,312}-macosx_x86_64",
    "cp{39,310,311,312}-macosx_arm64",
    "cp{39,310,311,312}-win_amd64",
]
test-command = [
    "cmake -G Ninja -DPython3_EXECUTABLE=$(which python) -B build-dir -S {project}/test/test_cmake",
    "cmake --build build-dir/",
    "build-dir/a.out",
    "python -m pytest -v -n auto --durations 20 {project}/test/",
]
test-requires = ["pytest-xdist"]
test-extras = ["test"]
test-skip = "*-*linux_aarch64"
manylinux-x86_64-image = "quay.io/pypa/manylinux_2_28_x86_64:2024-09-16-ab73a4b"
manylinux-aarch64-image = "quay.io/pypa/manylinux_2_28_aarch64:2024-09-16-ab73a4b"

[tool.cibuildwheel.windows]
before-build = "pip install scikit-build-core[pyproject] git+https://github.com/jhale/nanobind.git@jhale/msvc2022-workaround setuptools wheel"
build-frontend = {name = "pip", args = ["--no-build-isolation", "--config-settings=cmake.args=-DINSTALL_RUNTIME_DEPENDENCIES=ON", "--config-settings=cmake.args=-DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake"] }
test-command = [
    "python -m pytest -v -n auto --durations 20 {project}/test/",
]

[tool.cibuildwheel.linux]
archs = [
    "x86_64",
    "aarch64",
] # Forces arm64 build on x86_64 runner using emulation.
before-build = "yum -y update && yum install -y epel-release && yum install -y openblas-devel ninja-build"
test-command = [
    "cmake -G Ninja -DPython3_EXECUTABLE=$(which python) -B build-dir -S {project}/test/test_cmake",
    "cmake --build build-dir/",
    "build-dir/a.out",
    "python -m pytest -v -n auto --durations 20 {project}/test/",
]

[tool.cibuildwheel.macos]
environment = { "MACOSX_DEPLOYMENT_TARGET" = "10.14" }
archs = [
    "x86_64",
    "arm64",
] # Forces x86_64 build on arm64 runner using cross-compilation.
before-build = "export HOMEBREW_AUTO_UPDATING=0 && brew update && brew install ninja"
test-command = [
    "cmake -G Ninja -DPython3_EXECUTABLE=$(which python) -B build-dir -S {project}/test/test_cmake",
    "cmake --build build-dir/",
    "build-dir/a.out",
    "python -m pytest -v -n auto --durations 20 {project}/test/",
]

[tool.mypy]
ignore_missing_imports = true

[tool.ruff]
line-length = 100
indent-width = 4
extend-exclude = ["_basixcpp.pyi", "./joss", "make_html.py"]

[tool.ruff.format]
docstring-code-format = true

[tool.ruff.lint]
exclude = ["joss/"]
select = [
    # "N", # pep8-naming
    "E",   # pycodestyle
    "W",   # pycodestyle
    "D",   # pydocstyle - used only in python/
    "F",   # pyflakes
    "I",   # isort
    "RUF", # Ruff-specific rules
    "UP",  # pyupgrade
    "ICN", # flake8-import-conventions
    "NPY", # numpy-specific rules
    "FLY", # use f-string not static joins
    "LOG", # https://docs.astral.sh/ruff/rules/#flake8-logging-log
    # "ISC", # https://docs.astral.sh/ruff/rules/#flake8-implicit-str-concat-isc
    # "B", https://docs.astral.sh/ruff/rules/#flake8-bugbear-b
    # "A", # https://docs.astral.sh/ruff/rules/#flake8-builtins-a
]
# ignore = ["UP007", "RUF012"]

[tool.ruff.lint.per-file-ignores]
"test/*" = ["D"]
"demo/*" = ["D"]
"doc/*" = ["D"]

[tool.ruff.lint.pydocstyle]
convention = "google"