/
pyproject.toml
150 lines (135 loc) · 4.36 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
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
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
# Copyright 2022 Jij Inc.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
[build-system]
requires = [
'setuptools_scm[toml]',
'setuptools',
'wheel',
'build',
'oldest-supported-numpy',
'pybind11',
'scikit-build',
]
build-backend = "setuptools.build_meta"
[tool.setuptools_scm]
write_to = "openjij/_version.py"
[tool.pytest.ini_options]
addopts = "--continue-on-collection-errors --full-trace --color=yes --code-highlight=yes --cov-context=test --cov --cov-append --cov-report term --randomly-seed=last -vv -v --capture=no"
testpaths = [
"tests",
]
spec_header_format = "{module_path}:"
spec_test_format = "{result} {name}"
log_level = "INFO"
log_cli_level = "INFO"
console_output_style = "count"
log_auto_indent = true
junit_logging = "all"
[tool.flake8]
show-source = true
statistics = true
doctests = true
max-complexity = 10
max-line-length = 999
[tool.isort]
profile= "black"
multi_line_output = 3
force_grid_wrap = 0
include_trailing_comma = false
ensure_newline_before_comments = true
use_parentheses = true
balanced_wrapping = false
lines_between_types = 1
#order_by_type = true
combine_as_imports = true
combine_star = true
combine_straight_imports = true
group_by_package = true
auto_identify_namespace_packages = true
src_paths = ["openjij", "tests"]
[tool.black]
target-version = ['py39', 'py310']
[tool.mypy]
ignore_missing_imports = true
#show_traceback = true
warn_return_any = true
warn_unused_configs = true
warn_unreachable = true
namespace_packages = true
explicit_package_bases = true
#show_error_context = true
#show_column_numbers = true
[tool.pyright]
pythonVersion = "3.9"
typeCheckingMode = "basic"
include = [
"openjij",
"tests",
]
ignore = [
"*.c",
"*.so",
]
reportImportCycles = 'warning'
reportUnusedImport = 'warning'
reportUnusedVariable = 'warning'
reportDuplicateImport = 'warning'
[tool.cibuildwheel]
skip = ["cp36*", "cp311*", "*musllinux_x86_64", "*musllinux_aarch64", "pp*"]
build-verbosity = 1
dependency-versions = "latest"
[tool.cibuildwheel.linux]
archs = ["x86_64", "aarch64"]
build-frontend = "build"
#environment = "-CFLAGS='-march=haswell' -CXXFLAGS='-march=haswell' -FFLAGS='-march=haswell'"
manylinux-x86_64-image ="quay.io/pypa/manylinux_2_28_x86_64:latest"
manylinux-aarch64-image = "quay.io/pypa/manylinux_2_28_aarch64:latest"
#before-all = [
# "dnf config-manager --set-enabled powertools",
# "dnf makecache --refresh",
# "dnf -y --enablerepo=powertools install openblas-static",
# "dnf -y --enablerepo=powertools install lapack-static",
# "dnf -y install gcc-toolset-11",
# "dnf -y --enablerepo=powertools install eigen3-devel",
#]
before-build = [
"source scl_source enable gcc-toolset-11",
"pip install --upgrade pip wheel build pybind11 cmake ninja",
]
repair-wheel-command = "auditwheel repair --lib-sdir . -w {dest_dir} {wheel}"
[tool.cibuildwheel.macos]
archs = ["x86_64", "arm64"]
build-frontend = "build"
#before-all = [
# "brew install eigen nlohmann-json",
#]
#environment = "CFLAGS='-O3 -pipe' CXXFLAGS='-O3 -pipe'"
before-build = [
"pip install --upgrade pip wheel build pybind11 cmake ninja",
]
[tool.cibuildwheel.windows]
archs = ["AMD64"]
#build-frontend = "build"
#environment = "CMAKE_TOOLCHAIN_FILE='C:/vcpkg/scripts/buildsystems/vcpkg.cmake'"
#before-all = [
# "vcpkg update",
# "vcpkg --triplet x64-windows install eigen3 --recurse",
# "vcpkg --triplet x64-windows install nlohmann-json --recurse",
# "vcpkg --triplet x64-windows-static install eigen3 --recurse",
# "vcpkg --triplet x64-windows-static install nlohmann-json --recurse",
# "vcpkg integrate install",
#]
#"vcpkg --triplet x64-windows-static install openblas[threads] --recurse",
#"vcpkg --triplet x64-windows-static install clapack --recurse",
before-build = [
"pip install --upgrade pip wheel build cmake pybind11 delvewheel",
]
repair-wheel-command = "delvewheel repair -w {dest_dir} {wheel}"