-
Notifications
You must be signed in to change notification settings - Fork 16
Expand file tree
/
Copy pathpyproject.toml
More file actions
150 lines (129 loc) · 3.91 KB
/
Copy pathpyproject.toml
File metadata and controls
150 lines (129 loc) · 3.91 KB
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
[build-system]
# Cython dependency is optional, see setup.py for details.
# For the package (run-time) dependencies, see setup.cfg.
requires = ["setuptools", "numpy<2.0", "Cython>=3.0.10", "setuptools-scm"]
build-backend = "setuptools.build_meta"
[project]
name = "avaframe"
description = "The Open Avalanche Framework"
readme = "README.md"
dynamic = ["version"]
license = "EUPL-1.2"
authors = [
{ name = "AvaFrame Contributors", email = "felix@avaframe.org" }
]
urls = { Homepage = "http://avaframe.org" }
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Science/Research",
"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"
]
requires-python = ">=3.9,<3.14"
dependencies = [
"numpy<2.0", # numpy 2.0 introduces breaking changes in relation to qgis versions
"salib", # this is the last aversion that works with numpy <2.
"pyshp>=3.0.3", # pin until 3.0.3 is out, there's a known bug for certain polygon types
"matplotlib",
"scipy",
"cmcrameri",
"seaborn",
"cython>=3.0.10", # Cython 3.x is required for Python 3.12/3.13, configured for numpy < 2.0 in setup.py
"pandas",
"shapely",
"configUpdater",
"tabulate",
"deepdiff",
"deepmerge",
"psutil",
"rasterio",
"contextily",
"geopandas",
"fiona",
"scikit-learn",
]
[project.optional-dependencies]
# Optional JIT compute engine for com4FlowPy (config: engine = numba | numba32).
# If numba is not installed, com4FlowPy transparently falls back to the pure-Python
# (Cell-based) engine, so this dependency is not required for normal operation.
numba = ["numba"]
# Setuptools
[tool.setuptools]
include-package-data = true
[tool.setuptools.packages.find]
exclude = ["docs*", "tests*"]
[tool.setuptools_scm]
version_scheme = "no-guess-dev"
local_scheme = "node-and-date"
version_file = "avaframe/RELEASE-VERSION.txt"
# Cibuildwhell
[tool.cibuildwheel]
# Only build on CPython 3.12
#build = ["cp312-*"]
skip = ["*musllinux*","*-win32"]
build-verbosity = 1
# before-build = "uv pip install --system 'cython>=3.0.10' 'numpy<2.0'"
[tool.cibuildwheel.linux]
repair-wheel-command = "auditwheel --verbose repair -w {dest_dir} {wheel} --plat manylinux_2_34_x86_64"
[tool.cibuildwheel.windows]
skip = ["cp313-*"]
#Flake8
[tool.flake8]
max-line-length = 109
select = ['B950']
extend-ignore = ['E203', 'E501']
#Black
[tool.black]
line-length = 109
# PIXI setup
[tool.pixi.workspace]
channels = ["https://prefix.dev/conda-forge"]
platforms = ["linux-64", "win-64", "osx-64", "osx-arm64"]
[tool.pixi.dependencies]
python = ">=3.9,<3.14"
setuptools = "*"
setuptools-scm = "*"
cibuildwheel = "*"
# FSO: remove as soon as possible
libgdal = "*"
# Feature dev
[tool.pixi.feature.dev.pypi-dependencies]
avaframe = { path = "./", editable = true }
[tool.pixi.feature.dev.dependencies]
pixi-pycharm = "*"
pytest = "*"
pytest-cov = "*"
pytest-mock = "*"
black = "*"
#Feature doc
[tool.pixi.feature.doc.dependencies]
sphinx = "*"
sphinx-rtd-theme = "*"
sphinxcontrib-bibtex = "*"
#Feature prod
[tool.pixi.feature.prod.pypi-dependencies]
avaframe = "*"
#Feature rcs
#[tool.pixi.feature.rcs.pypi-dependencies]
#avaframe = "==1.13rc4"
[tool.pixi.tasks]
build = "python setup.py build_ext --inplace"
clean = "python -c \"import pathlib; [f.unlink() for f in pathlib.Path('avaframe').rglob('*.so')]; [f.unlink() for f in pathlib.Path('avaframe').rglob('*.c')]\""
rebuild = { depends-on = ["clean", "build"] }
compilemot = "python avaframe/com9MoTVoellmy/_buildMoTVoellmy.py"
#Feature qgis
[tool.pixi.feature.qgis.dependencies]
numpy = "<2.0"
qgis = "*"
#Environments
[tool.pixi.environments]
default = { features = ["dev"], solve-group = "default" }
dev = ["dev"]
doc = ["doc", "dev"]
prod = ["prod"]
#rcs = ["rcs"]
qgis = ["qgis", "dev"]
numba = ["dev", "numba"]