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
|
[build-system]
requires = [
"Cython",
# Starting with NumPy 1.25, NumPy is (by default) as far back compatible
# as oldest-support-numpy was (customizable with a NPY_TARGET_VERSION
# define).
"numpy>=1.25,<3",
"setuptools>=61.0.0",
]
build-backend = "setuptools.build_meta"
[project]
name = "shapely"
dynamic = ["version"]
authors = [
{name = "Sean Gillies"},
]
maintainers = [
{name = "Shapely contributors"},
]
description = "Manipulation and analysis of geometric objects"
readme = "README.rst"
keywords = ["geometry", "topology", "gis"]
license = {text = "BSD 3-Clause"}
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: BSD License",
"Operating System :: Unix",
"Operating System :: MacOS",
"Operating System :: Microsoft :: Windows",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Topic :: Scientific/Engineering :: GIS",
]
requires-python = ">=3.10"
dependencies = [
"numpy>=1.21",
]
[project.optional-dependencies]
test = [
"pytest",
"pytest-cov",
"scipy-doctest",
]
docs = [
"numpydoc==1.1.*",
"matplotlib",
"sphinx",
"sphinx-book-theme",
"sphinx-remove-toctrees",
]
[project.urls]
Documentation = "https://shapely.readthedocs.io/"
Repository = "https://github.com/shapely/shapely"
[tool.setuptools]
include-package-data = false
[tool.setuptools.packages.find]
include = ["shapely", "shapely.*"]
[tool.setuptools.package-data]
"shapely" = ["*.pxd"]
[tool.cibuildwheel]
skip = ["pp*", "*_i686", "*_ppc64le", "*_s390x"]
build-verbosity = 1
test-requires = "pytest"
test-command = "pytest --pyargs shapely.tests"
free-threaded-support = true
[tool.coverage.run]
source = ["shapely"]
omit = ["shapely/tests/*"]
[tool.doc8]
include = ["docs"]
ignore = ["D000", "D004"]
allow-long-titles = true
max-line-length = 79
[tool.ruff]
line-length = 88
extend-exclude = ["docs/*", "benchmarks/*", "shapely/_version.py", "versioneer.py"]
[tool.ruff.lint]
select = [
# pyflakes
"F",
# pycodestyle
"E",
"W",
# pyupgrade
"UP",
# flake8-bugbear
"B",
# flake8-debugger
"T10",
# flake8-simplify
# "SIM",
# pylint
"PLC",
"PLE",
"PLR",
"PLW",
# misc lints
"PIE",
# implicit string concatenation
"ISC",
# type-checking imports
"TCH",
# comprehensions
"C4",
# Ruff-specific rules
"RUF",
# isort
"I",
# pydocstyle
"D",
]
ignore = [
### Intentionally disabled
# module level import not at top of file
"E402",
# do not assign a lambda expression, use a def
"E731",
# mutable-argument-default
"B006",
# unused-loop-control-variable
"B007",
# get-attr-with-constant
"B009",
# Only works with python >=3.10
"B905",
# dict literals
"C408",
# Too many arguments to function call
"PLR0913",
# Too many returns
"PLR0911",
# Too many branches
"PLR0912",
# Too many statements
"PLR0915",
# Magic number
"PLR2004",
# Redefined loop name
"PLW2901",
# Global statements are discouraged
"PLW0603",
# compare-to-empty-string
"PLC1901",
# requiring | in isinstance
"UP038",
### Additional checks that don't pass yet
# Useless statement
"B018",
# Within an except clause, raise exceptions with ...
"B904",
# Consider `elif` instead of `else` then `if` to remove indentation level
"PLR5501",
# collection-literal-concatenation
"RUF005",
# Mutable class attributes should be annotated with `typing.ClassVar`,
"RUF012"
]
[tool.ruff.lint.per-file-ignores]
# ignore pydocstyle errors in tests
"**/tests/*" = ["D"]
# the order of imports in __init__ is a bit tricky, so keep manual
"shapely/__init__.py" = ["F401", "F403", "I"]
[tool.ruff.lint.isort]
combine-as-imports = true
extra-standard-library = ["packaging"]
[tool.ruff.lint.pydocstyle]
convention = "numpy"
|