/
pyproject.toml
91 lines (76 loc) · 2.09 KB
/
pyproject.toml
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
[tool.poetry]
name = "hello"
version = "0.1.0"
description = "An example project with Poetry and scikit-build."
license = "MIT"
authors = ["Takahiro Ueda <tueda@st.seikei.ac.jp>"]
readme = "README.md"
repository = "https://github.com/tueda/test-poetry-scikit-build"
include = [
# Source files for C extensions must be included in the source distribution.
{ path = "CMakeLists.txt", format = "sdist" },
{ path = "hello/**/*.cxx", format = "sdist" },
# C extensions must be included in the wheel distribution.
{ path = "hello/**/*.pyd", format = "wheel" },
{ path = "hello/**/*.so", format = "wheel" },
]
exclude = [
"hello/**/*.cxx",
"hello/**/*.pyd",
"hello/**/*.so",
]
[tool.poetry.build]
generate-setup-file = false
script = "build.py"
[tool.poetry.dependencies]
python = "^3.6.1"
[tool.poetry.dev-dependencies]
cmake = "^3.22.5"
pre-commit = "^2.17.0" # 2.18.0 blocked by pytohn 3.6.1
pytest = "^7.0.1" # 7.1.0 blocked by pytohn 3.6.1
pytest-cov = "^3.0.0"
scikit-build = "^0.15.0"
taskipy = "^1.10.2"
[build-system]
requires = ["poetry-core>=1.0.0", "scikit-build", "cmake", "ninja"]
build-backend = "poetry.core.masonry.api"
[tool.coverage.html]
directory = "_htmlcov"
[tool.coverage.report]
exclude_lines = [
"@overload",
"if TYPE_CHECKING:",
"pragma: no cover",
"raise AssertionError()",
"return NotImplemented",
]
[tool.flake8]
max-line-length = 88
extend-ignore = [
"E203", # for black
]
[tool.isort]
profile = "black"
[tool.mypy]
pretty = true
show_error_codes = true
strict = true
warn_unreachable = true
[tool.pytest.ini_options]
addopts = [
"--cov-report=html",
"--cov-report=term",
"--cov=hello",
"--doctest-modules",
"--ignore=_skbuild",
"--ignore=build.py",
]
[tool.taskipy.tasks]
prepare.cmd = "pre-commit install && pre-commit install --hook-type commit-msg"
prepare.help = "sets up a development environment"
lint.cmd = "pre-commit run --all-files"
lint.help = "runs linters (+ fix)"
test.cmd = "task build_ext && pytest"
test.help = "runs tests"
build_ext.cmd = "python build.py"
build_ext.help = "builds C extensions"