-
-
Notifications
You must be signed in to change notification settings - Fork 53
/
pyproject.toml
123 lines (106 loc) · 3.29 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
[tool.poetry]
name = "timezonefinder"
version = "6.5.7"
description = "python package for finding the timezone of any point on earth (coordinates) offline"
authors = ["jannikmi <github@michelfe.it>"]
license = "MIT"
readme = "README.rst"
repository = "https://github.com/jannikmi/timezonefinder"
homepage = "https://timezonefinder.michelfe.it/gui"
documentation = "https://timezonefinder.readthedocs.io/en/latest/"
keywords = ["timezone", "coordinates", "latitude", "longitude", "location", "offline", "polygon"]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"Intended Audience :: Information Technology",
"Natural Language :: English",
"Operating System :: OS Independent",
"Topic :: Software Development :: Localization",
]
include = [
"timezonefinder/*.bin",
"timezonefinder/*.json",
"timezonefinder/py.typed",
"timezonefinder/inside_poly_extension/*",
"timezonefinder/inside_polygon_ext*so",
# "build.py", # Note: auto included
]
#exclude = ["my_package/excluded.py"]
[tool.poetry.scripts]
timezonefinder = "timezonefinder.command_line:main"
[tool.poetry.dependencies]
python = ">=3.8,<4"
# https://numpy.org/neps/nep-0029-deprecation_policy.html
# numpy 1.21+ required for python 3.8
numpy = [
{ version = ">=1.21,<3", python = "<3.9" },
{ version = ">=1.23,<3", python = ">=3.9" }
]
h3 = ">4"
cffi = ">=1.15.1,<2"
# optional dependencies (extras)
numba = [
{ version = ">=0.56,<1", python = "<3.12", optional = true },
{ version = ">=0.59,<1", python = ">=3.12", optional = true }
]
pytz = { version = ">=2022.7.1", optional = true }
[tool.poetry.group.docs]
optional = true
[tool.poetry.group.docs.dependencies]
Sphinx = "^5"
sphinx-rtd-theme = "^1"
[tool.poetry.group.dev.dependencies]
tox = "*"
pytest = "*"
pre-commit = "*"
mypy = "*"
rstcheck = "*"
isort = "*"
ruff = "*"
cibuildwheel = "*"
[tool.poetry.extras]
numba = ["numba"]
pytz = ["pytz"]
[build-system]
requires = ["poetry-core>=1.0.0", "cffi", "setuptools>=65.5"]
build-backend = "poetry.core.masonry.api"
[tool.poetry.build]
script = "build.py"
generate-setup-file = false
[tool.ruff]
target-version = "py38"
src = ["timezonefinder", "tests", "build.py"]
[tool.ruff.lint.isort]
known-local-folder = ["timezonefinder"]
[tool.tox]
legacy_tox_ini = """
[tox]
isolated_build = true
envlist =
# TODO python 3.13 with numba
docs,py{38,39,310,311,312}{,-numba,-pytz},py313{,-pytz}
[gh-actions]
python =
3.8: py38{,-numba,-pytz}
3.9: py39{,-numba,-pytz}
3.10: py310{,-numba,-pytz}
3.11: py311{,-numba,-pytz}
3.12: py312{,-numba,-pytz}
# TODO also -numba
3.13: py313{,-pytz}
[testenv:docs]
description = build documentation
basepython = python3.12
allowlist_externals = poetry,sphinx-build
commands =
poetry install -v --with docs
sphinx-build -d "{envtmpdir}{/}doctree" docs "{toxworkdir}{/}docs_out" --color -b html
python -c 'print(r"documentation available under file://{toxworkdir}{/}docs_out{/}index.html")'
[testenv]
allowlist_externals = poetry
commands =
!numba: poetry install -v
numba: poetry install -v --extras numba
pytz: poetry install -v --extras pytz
poetry run pytest {posargs}
"""