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 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245
|
[build-system]
requires = ["hatchling", "hatch-fancy-pypi-readme", "hatch-vcs"]
build-backend = "hatchling.build"
[project]
name = "scikit-build"
dynamic = ["version", "readme"]
description = "Improved build system generator for Python C/C++/Fortran/Cython extensions"
requires-python = ">=3.7"
authors = [
{ name = "The scikit-build team" },
]
keywords = [
"scikit-build",
]
classifiers = [
"Development Status :: 2 - Pre-Alpha",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Natural Language :: English",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Typing :: Typed",
]
dependencies = [
'distro',
'packaging',
'tomli; python_version<"3.11"',
'typing-extensions>=3.7; python_version<"3.8"',
'wheel>=0.32.0',
]
[project.optional-dependencies]
cov = [
"coverage[toml]>=4.2",
"pytest-cov>=2.7.1",
]
docs = [
"pygments",
"sphinx-issues",
"sphinx-rtd-theme>=1.0",
"sphinx>=4",
"sphinxcontrib-moderncmakedomain>=3.19",
]
doctest = [
"ubelt>=0.8.2",
"xdoctest>=0.10.0",
]
test = [
'build>=0.7',
'cython>=0.25.1',
'importlib-metadata;python_version<"3.8"',
'pip',
'pytest-mock>=1.10.4',
'pytest>=6.0.0',
'requests',
'virtualenv',
]
[project.urls]
"Bug Tracker" = "https://github.com/scikit-build/scikit-build/issues"
Changelog = "https://scikit-build.readthedocs.io/en/latest/history.html"
Discussions = "https://github.com/orgs/scikit-build/discussions"
Documentation = "https://scikit-build.readthedocs.io/"
Examples = "https://github.com/scikit-build/scikit-build-sample-projects"
Homepage = "https://github.com/scikit-build/scikit-build"
[tool.hatch]
build.targets.wheel.packages = ["skbuild"]
version.source = "vcs"
build.hooks.vcs.version-file = "skbuild/_version.py"
[tool.hatch.metadata.hooks.fancy-pypi-readme]
content-type = "text/x-rst"
[[tool.hatch.metadata.hooks.fancy-pypi-readme.fragments]]
path = "README.rst"
start-after = ".. START-INTRO"
end-before = ".. END-INTRO"
[[tool.hatch.metadata.hooks.fancy-pypi-readme.fragments]]
path = "CHANGES.rst"
start-after = ".. START-BRIEF-CHANGELOG"
end-before = ".. END-BRIEF-CHANGELOG"
[[tool.hatch.metadata.hooks.fancy-pypi-readme.fragments]]
path = "README.rst"
start-after = ".. INJECT-CHANGELOG"
[[tool.hatch.metadata.hooks.fancy-pypi-readme.substitutions]]
pattern = ':pr:`(\d+)`'
replacement = '`#\1 <https://github.com/scikit-build/scikit-build/pull/\1>`_'
[[tool.hatch.metadata.hooks.fancy-pypi-readme.substitutions]]
pattern = ':issue:`(\d+)`'
replacement = '`#\1 <https://github.com/scikit-build/scikit-build/issues/\1>`_'
[[tool.hatch.metadata.hooks.fancy-pypi-readme.substitutions]]
pattern = ':user:`(\S+)`'
replacement = '`@\1 <https://github.com/\1>`_'
[tool.mypy]
files = ["skbuild", "tests"]
exclude = ["tests/samples"]
python_version = "3.8"
warn_unused_configs = true
enable_error_code = ["ignore-without-code", "redundant-expr", "truthy-bool"]
strict = true
disallow_untyped_defs = false
disallow_untyped_calls = false
[[tool.mypy.overrides]]
module = ["skbuild.*"]
disallow_untyped_defs = true
disallow_untyped_calls = true
[[tool.mypy.overrides]]
module = [
"wheel.*",
"setuptools.logging",
"setuptools.command.*",
"numpy",
"distro",
]
ignore_missing_imports = true
[tool.pylint]
py-version = "3.7"
jobs = "0"
reports.output-format = "colorized"
similarities.ignore-imports = "yes"
messages_control.enable = [
"useless-suppression",
]
messages_control.disable = [
"deprecated-module", # distutils usage
"fixme",
"invalid-name",
"line-too-long",
"missing-module-docstring",
"no-member",
"protected-access",
"too-few-public-methods",
"too-many-arguments",
"too-many-branches",
"too-many-locals",
"too-many-statements",
"too-many-lines",
"too-many-return-statements",
"too-many-locals",
"ungrouped-imports",
"wrong-import-order",
"wrong-import-position",
"global-statement", # Covered by Ruff
"unused-import", # Covered by Ruff
]
[tool.pytest.ini_options]
minversion = "6.0"
testpaths = ["tests"]
addopts = ["-ra", "--strict-markers", "--strict-config", "--showlocals"]
norecursedirs = ["_skbuild"]
xfail_strict = true
filterwarnings = [
'error',
'ignore:setup.py install is deprecated:Warning',
'ignore:easy_install command is deprecated:Warning',
'ignore:setuptools.installer and fetch_build_eggs are deprecated:Warning',
'ignore:.*ends with a trailing slash, which is not supported by setuptools:FutureWarning',
"ignore:Config variable 'Py_DEBUG' is unset:RuntimeWarning",
"ignore:Config variable 'WITH_PYMALLOC' is unset, Python ABI tag may be incorrect:RuntimeWarning",
'default:shell/Perl-style subs.* are deprecated:DeprecationWarning',
'default:subprocess .* is still running:ResourceWarning',
'ignore:pkg_resources is deprecated as an API:DeprecationWarning',
'ignore:onerror argument is deprecated, use onexc instead:DeprecationWarning', # Caused by wheel and Python 3.12
'ignore:(ast.Str|Attribute s|ast.NameConstant|ast.Num) is deprecated:DeprecationWarning:_pytest',
]
log_cli_level = "info"
markers = [
"fortran: Fortran testing",
"deprecated: These tests deprecated setuptools features",
"nosetuptoolsscm: Requires setuptools_scm to not be installed",
"isolated: Downloads dependencies and sets up isolated environments",
]
[tool.ruff]
line-length = 120
exclude = []
[tool.ruff.format]
exclude = ["docs/conf.py"]
[tool.ruff.lint]
extend-select = [
"B", # flake8-bugbear
"I", # isort
"ARG", # flake8-unused-arguments
"C4", # flake8-comprehensions
"ICN", # flake8-import-conventions
"G", # flake8-logging-format
"EM", # flake8-errmsg
"PGH", # pygrep-hooks
"PIE", # flake8-pie
"PL", # pylint
"PT", # flake8-pytest-style
"RET", # flake8-return
"RUF", # Ruff-specific
"SIM", # flake8-simplify
"UP", # pyupgrade
"YTT", # flake8-2020
"EXE", # flake8-executable
"NPY", # NumPy specific rules
]
typing-modules = ["skbuild._compat.typing"]
ignore = ["PLR2004", "PLR09", "SIM117"]
flake8-unused-arguments.ignore-variadic-names = true
isort.known-third-party = ["distutils"]
isort.force-to-top = ["setuptools"]
isort.required-imports = ["from __future__ import annotations"]
[tool.ruff.lint.per-file-ignores]
"tests/**" = ["T20"]
"noxfile.py" = ["T20"]
"*.pyx" = ["I"]
[tool.check-sdist]
sdist-only = ["skbuild/_version.py"]
[tool.coverage.run]
branch = true
source = ["skbuild"]
omit = ["skbuild/_version.py"]
|