Skip to content

Commit ca935c8

Browse files
committed
Merge remote-tracking branch 'upstream/main'
2 parents ccdc8d0 + 346f18a commit ca935c8

File tree

4 files changed

+48
-21
lines changed

4 files changed

+48
-21
lines changed

.github/workflows/unit_tests.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,13 @@ jobs:
2424
- os: ubuntu-latest
2525
python-version: "3.10"
2626
- os: ubuntu-latest
27-
python-version: "3.13"
27+
python-version: "3.14"
2828
- os: macos-15-intel # Intel
2929
python-version: "3.13"
3030
- os: macos-latest # arm64
31-
python-version: "3.13"
31+
python-version: "3.14"
3232
- os: windows-latest
33-
python-version: "3.13"
33+
python-version: "3.14"
3434
env:
3535
TZ: Europe/Berlin
3636
FORCE_COLOR: true

environment.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@ name: pybispectra
22
channels:
33
- conda-forge
44
dependencies:
5-
- python>=3.10
6-
- joblib>=1.0
7-
- matplotlib>=3.5
5+
- python>=3.10,<3.14
6+
- joblib>=1.2
7+
- matplotlib>=3.6
88
- mne>=1.7
9-
- numba>=0.55
10-
- numpy>=1.21
11-
- scikit-learn>=1.0
12-
- scipy>=1.7
9+
- numba>=0.56
10+
- numpy>=1.22
11+
- scikit-learn>=1.1
12+
- scipy>=1.8

pyproject.toml

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,19 +9,10 @@ classifiers = [
99
"Operating System :: OS Independent",
1010
"Programming Language :: Python :: 3",
1111
]
12-
dependencies = [
13-
"joblib>=1.2",
14-
"matplotlib>=3.6",
15-
"mne>=1.7",
16-
"numba>=0.56",
17-
"numpy>=1.22",
18-
"scikit-learn>=1.1",
19-
"scipy>=1.8",
20-
]
2112
description = "A Python signal processing package for computing spectral-domain and time-domain interactions using the bispectrum."
13+
dynamic = ["dependencies", "requires-python"] # check tools/hatch_build.py for details
2214
name = "pybispectra"
2315
readme = "README.md"
24-
requires-python = ">=3.10"
2516
version = "1.3.0dev"
2617

2718
[project.optional-dependencies]
@@ -65,9 +56,12 @@ show_missing = true
6556

6657
[tool.coverage.run]
6758
command_line = "-m pytest -v tests"
68-
omit = ["__init__.py", "src/pybispectra/utils/_docs.py", "tests/*"]
59+
omit = ["__init__.py", "src/pybispectra/utils/_docs.py", "tests/*", "tools/*"]
6960
source = ["pybispectra"]
7061

62+
[tool.hatch.metadata.hooks.custom]
63+
path = "tools/hatch_build.py"
64+
7165
[tool.isort]
7266
profile = "black"
7367

tools/hatch_build.py

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
import platform
2+
3+
from hatchling.metadata.plugin.interface import MetadataHookInterface
4+
5+
6+
class JSONMetaDataHook(MetadataHookInterface):
7+
def update(self, metadata):
8+
# Numba dropped official support for macOS using Intel CPUs from v0.63 (which
9+
# also brought support for Python 3.14), so we set different dependencies for
10+
# that platform.
11+
is_macos_intel = (
12+
platform.system() == "Darwin" and platform.machine().startswith("x86")
13+
)
14+
15+
# requires-python
16+
requires_python = ">=3.10"
17+
if is_macos_intel:
18+
requires_python += ", <3.14"
19+
metadata["requires-python"] = requires_python
20+
21+
# dependencies
22+
dependencies = [
23+
"joblib>=1.2",
24+
"matplotlib>=3.6",
25+
"mne>=1.7",
26+
"numpy>=1.22",
27+
"scikit-learn>=1.1",
28+
"scipy>=1.8",
29+
"numba>=0.56",
30+
]
31+
if is_macos_intel:
32+
dependencies[-1] += ", <0.63"
33+
metadata["dependencies"] = dependencies

0 commit comments

Comments
 (0)