Skip to content

Commit 5dc1625

Browse files
Use hatchling as build backend (mne-tools#219)
Co-authored-by: Martin Schulz <[email protected]>
1 parent a552899 commit 5dc1625

File tree

4 files changed

+41
-51
lines changed

4 files changed

+41
-51
lines changed

.gitignore

-1
Original file line numberDiff line numberDiff line change
@@ -133,5 +133,4 @@ dmypy.json
133133

134134
*.orig
135135
junit-results.xml
136-
mne_qt_browser/_version.py
137136
.vscode/

CONTRIBUTING.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,5 @@ Follow the [instructions from mne-python](https://mne.tools/dev/install/contribu
1010
and additionally install the dependencies for this repository:
1111

1212
```
13-
pip install -r requirements_testing.txt
13+
pip install -e ".[tests]"
1414
```

MANIFEST.in

-5
This file was deleted.

pyproject.toml

+40-44
Original file line numberDiff line numberDiff line change
@@ -1,72 +1,68 @@
1+
[build-system]
2+
requires = ["hatchling", "hatch-vcs"]
3+
build-backend = "hatchling.build"
4+
15
[project]
26
name = "mne-qt-browser"
37
description = "A new backend based on pyqtgraph for the 2D-Data-Browser in MNE-Python"
48
readme = "README.md"
5-
requires-python = ">=3.8"
6-
license = {file = "LICENSE"}
9+
requires-python = ">=3.9"
10+
license = { file = "LICENSE" }
711
keywords = ["science", "neuroscience", "psychology"]
8-
authors = [
9-
{name = "Martin Schulz", email = "[email protected]"},
10-
]
12+
authors = [{ name = "Martin Schulz", email = "[email protected]" }]
1113
classifiers = [
1214
"Intended Audience :: Science/Research",
13-
"Programming Language :: Python"
15+
"Programming Language :: Python",
1416
]
1517
dependencies = [
16-
"importlib_metadata; python_version < '3.8'",
17-
"packaging",
18-
"setuptools >=65",
19-
"numpy",
20-
"scipy",
21-
"matplotlib",
22-
"qtpy",
23-
"scooby",
24-
"mne>=1.0",
25-
"pyqtgraph>=0.12.3",
26-
"colorspacious",
27-
"pyopengl; platform_system=='Darwin'",
28-
"darkdetect",
29-
"qdarkstyle",
18+
"packaging",
19+
"numpy",
20+
"scipy",
21+
"matplotlib",
22+
"qtpy",
23+
"scooby",
24+
"mne>=1.0",
25+
"pyqtgraph>=0.12.3",
26+
"colorspacious",
27+
"pyopengl; platform_system=='Darwin'",
28+
"darkdetect",
29+
"qdarkstyle",
3030
]
3131
dynamic = ["version"]
3232

3333
[project.optional-dependencies]
34-
opengl = [
35-
"pyopengl",
36-
]
34+
opengl = ["pyopengl"]
3735
tests = [
38-
"pytest",
39-
"pytest-qt",
40-
"pytest-cov",
41-
"pytest-timeout",
42-
"scikit-learn",
43-
"pytest-harvest",
44-
"pytest-error-for-skips",
45-
"sphinx-gallery",
36+
"pytest",
37+
"pytest-qt",
38+
"pytest-cov",
39+
"pytest-timeout",
40+
"scikit-learn",
41+
"pytest-harvest",
42+
"pytest-error-for-skips",
43+
"sphinx-gallery",
4644
]
4745

4846
[project.urls]
4947
homepage = "https://mne.tools/mne-bids-pipeline"
5048
repository = "https://github.com/mne-tools/mne-bids-pipeline"
5149
changelog = "http://github.com/mne-tools/mne-qt-browser/releases"
5250

53-
[build-system]
54-
requires = ["setuptools>=65", "setuptools_scm[toml]>=6.2", "wheel"]
55-
build-backend = "setuptools.build_meta"
56-
57-
[tool.setuptools_scm]
58-
tag_regex = "^(?P<prefix>v)?(?P<version>[0-9.]+)(?P<suffix>.*)?$"
59-
version_scheme = "release-branch-semver"
60-
write_to = "mne_qt_browser/_version.py"
51+
[tool.hatch.build]
52+
exclude = [
53+
"/.*",
54+
"/*.yml",
55+
"/screenshot.png",
56+
"/CONTRIBUTING.md",
57+
] # tracked by git, but we don't want to ship those files
6158

62-
[tool.setuptools.packages.find]
63-
exclude = ["false"] # on CircleCI this folder appears during pip install -ve. for an unknown reason
59+
[tool.hatch.version]
60+
source = "vcs"
61+
raw-options = { version_scheme = "release-branch-semver" }
6462

6563
[tool.pytest.ini_options]
6664
addopts = "-ra --cov-report= --tb=short --junit-xml=junit-results.xml --capture=sys --durations=10"
67-
testpaths = [
68-
"mne_qt_browser",
69-
]
65+
testpaths = ["mne_qt_browser"]
7066
junit_family = "xunit2"
7167

7268
[tool.black]

0 commit comments

Comments
 (0)