Repository navigation
Expand file tree
/
Copy pathpyproject.toml
More file actions
142 lines (124 loc) · 6.8 KB
/
Copy pathpyproject.toml
File metadata and controls
142 lines (124 loc) · 6.8 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
[build-system]
# cffi is kept here so the build environment has it available when setup.py
# attempts to compile the C extension. The extension is skipped gracefully
# when FUE_SKIP_C=1 or when GSL is absent — see setup.py.
requires = ["setuptools>=60,<69", "cffi>=1.15", "wheel"]
build-backend = "setuptools.build_meta"
[project]
name = "fue"
version = "0.1.22"
description = "Exact maximum likelihood estimation of univariate time series (ARMAX with transfer functions)"
readme = "README.md"
license = { text = "GPL-2.0-or-later" }
requires-python = ">=3.10"
authors = [
{ name = "David E. Guerrero", email = "davidesg@ucm.es" },
]
keywords = ["time series", "ARIMA", "ARMAX", "exact maximum likelihood", "Box-Jenkins"]
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Science/Research",
"Topic :: Scientific/Engineering :: Mathematics",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
]
# cffi IS a runtime dependency. This block used to claim the opposite -- "the
# compiled extension embeds the cffi runtime inside the .so" -- and that is
# simply not true of a cffi API-mode extension: it imports `_cffi_backend` when
# it loads. Verified on 0.1.8 in a clean venv: pip fetched the right manylinux
# wheel and `import fue._fue_engine` still failed with "No module named
# '_cffi_backend'", so `_engine.py` caught the ImportError and fell back to
# pure Python. Every binary wheel published so far has been inert wherever cffi
# was not present for some other reason -- which on a developer's machine it
# usually is, and that is why it went unnoticed.
# Declared unconditionally: the pure-Python fallback does not need it, but the
# cost is one small universal wheel and the alternative is 25 binary wheels
# nobody can use.
dependencies = [
"numpy>=1.24",
"scipy>=1.10",
"matplotlib>=3.7",
"cffi>=1.15",
]
[project.urls]
# Sin esta sección la página de PyPI no enlaza a ninguna parte, que es como
# estuvo fue hasta 0.1.10. `Documentation` es el campo que PyPI muestra arriba
# del todo, y desde 0.1.10 hay un sitio al que apuntar.
Homepage = "https://github.com/davidesg/fue-python"
Documentation = "https://davidesg.github.io/fue-python/"
Repository = "https://github.com/davidesg/fue-python"
Issues = "https://github.com/davidesg/fue-python/issues"
Changelog = "https://github.com/davidesg/fue-python/blob/master/CHANGELOG.md"
# El registro de defectos es público a propósito: documenta los límites del
# programa, y eso es parte de permitir verificarlo.
"Bug reports" = "https://github.com/davidesg/fue-python/tree/master/bugs"
[project.scripts]
# `fue` y `fuf` a secas son los PROGRAMAS EN C, que viven en /usr/local/bin.
# Este paquete se instala con sufijo -py para no taparlos: ~/.local/bin va antes
# que /usr/local/bin en el PATH, así que declararlos con el mismo nombre deja al
# usuario ejecutando el puerto cuando cree estar ejecutando el original.
fue-py = "fue.cli:main"
fuf-py = "fue.fuf_cli:main"
fue-bug = "fue.bug_cli:main"
[project.optional-dependencies]
# pip install "fue[c-engine]" — record cffi as an explicit runtime dep when
# the C extension is used (mostly useful for lockfiles / conda packaging).
c-engine = ["cffi>=1.15"]
report = ["jinja2>=3.0"]
pdf = ["jinja2>=3.0", "weasyprint>=60"]
dev = ["pytest>=7", "pandas"]
[tool.setuptools]
license-files = []
[tool.setuptools.packages.find]
where = ["src"]
# ── cibuildwheel ──────────────────────────────────────────────────────────────
[tool.cibuildwheel]
# ONE abi3 wheel per platform (setup.py, BUG-0029): cibuildwheel builds it on
# cp310 and, for every later identifier here, reuses it and runs the smoke test
# on that Python. The list is the versions TESTED; the wheel installs on any
# CPython >= 3.10. When a CPython goes final, add it (bugs/BUG-0029-repro).
build = "cp310-* cp311-* cp312-* cp313-* cp314-* cp315-*"
# Skip 32-bit builds, PyPy and the free-threaded builds (cibuildwheel 3.1+
# makes them by default; the C engine is not checked without the GIL)
skip = "*-win32 *-manylinux_i686 pp* cp31?t-*"
# Smoke-test each built wheel: verify it imports and estimates/forecasts a small
# model. NOT the full golden numerical battery — exact log-likelihoods are
# platform/BLAS-sensitive for ill-conditioned models (e.g. the multimodal
# cointegration case R.4), so that battery runs in the dev job on a fixed
# platform, not as a per-wheel gate across 16 build targets.
test-requires = ["pytest"]
test-command = "pytest {project}/tests/test_smoke.py -q"
[tool.cibuildwheel.linux]
# manylinux_2_28 = AlmaLinux 8; more recent glibc than manylinux2014
manylinux-x86_64-image = "quay.io/pypa/manylinux_2_28_x86_64"
manylinux-aarch64-image = "quay.io/pypa/manylinux_2_28_aarch64"
# Install GSL before building. auditwheel repair then bundles libgsl.so
# and libgslcblas.so into the wheel (they are not on the manylinux whitelist).
# Portable across manylinux (AlmaLinux → dnf) and musllinux (Alpine → apk):
# without this, musllinux fails with `dnf: not found` (exit 127).
before-all = "if command -v dnf >/dev/null 2>&1; then dnf install -y gsl-devel; else apk add --no-cache gsl-dev; fi"
[tool.cibuildwheel.macos]
# GSL compiled from source, static, for the wheel's macOS (11.0, from the
# workflow's MACOSX_DEPLOYMENT_TARGET) and the runner's architecture: a
# Homebrew bottle targets the runner's macOS, too new for a macosx_11_0 wheel.
# Its gsl-config goes first on PATH, so _discover_gsl_dirs finds this GSL.
before-all = "bash {project}/tools/build_gsl.sh /tmp/gsl"
environment = { PATH = "/tmp/gsl/bin:$PATH" }
# Native arch only per runner (arm64 on macos-15, x86_64 on macos-15-intel):
# the GSL above is built for the runner's architecture alone.
archs = ["auto"]
[tool.cibuildwheel.windows]
archs = ["AMD64"]
# Install GSL via vcpkg (static-md = static libs + /MD runtime, compatible with Python).
# VCPKG_INSTALLATION_ROOT is set by the GitHub Actions windows-latest runner.
before-all = "vcpkg install gsl:x64-windows-static-md"
# Expose the vcpkg prefix so _build_cffi.py can locate headers and .lib files.
# GSL_ROOT is read in _build_cffi.py; falls back to the vcpkg default if unset.
# NB: cibuildwheel evaluates `environment` values in a shell, so use bash-style
# `$VAR` (NOT `{env:VAR}`, which is not cibuildwheel syntax and is left literal),
# and forward slashes (backslashes are eaten by the shell). MSVC accepts `/`.
environment = { GSL_ROOT = "$VCPKG_INSTALLATION_ROOT/installed/x64-windows-static-md" }