Skip to content

Commit

Permalink
Switch build backend to hatchling
Browse files Browse the repository at this point in the history
Fixes #111
  • Loading branch information
hoechenberger committed Dec 11, 2023
1 parent 58de4db commit 52e6752
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 11 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,11 @@ jobs:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install --upgrade wheel
python -m pip install --upgrade pip python-build
- name: Test building sdist
python -m build -s .
- name: Test building wheel
python -m build -w .
- name: Install openneuro-py
run: pip install .[tests]
- name: Test with pytest
Expand Down
18 changes: 9 additions & 9 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
[build-system]
requires = ["hatchling", "hatch-vcs"]
build-backend = "hatchling.build"

[project]
name = "openneuro-py"
description = "A Python client for OpenNeuro."
Expand Down Expand Up @@ -35,16 +39,12 @@ openneuro-py = "openneuro.openneuro:cli"
homepage = "https://github.com/hoechenberger/openneuro-py"
changelog = "https://github.com/hoechenberger/openneuro-py/CHANGES.md"

[build-system]
requires = [
"setuptools >= 45",
"setuptools_scm[toml] >= 6.2",
"wheel"
]
build-backend = "setuptools.build_meta"
[tool.hatch.version]
source = "vcs"
raw-options = { version_scheme = "release-branch-semver" }

[tool.setuptools_scm]
# can be left blank
[tool.hatch.build.targets.wheel]
packages = ["openneuro"]

[tool.pytest.ini_options]
addopts = "-ra -vv --tb=short --durations=10"

0 comments on commit 52e6752

Please sign in to comment.