diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index 8946b0b..eedfe6a 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -40,11 +40,12 @@ jobs: with: python-version: ${{ matrix.python-version }} - name: Install dependencies - run: | - python -m pip install --upgrade pip - python -m pip install --upgrade wheel + run: python -m pip install --upgrade pip build + - name: Test building sdist + run: python -m build -s . + - name: Test building wheel + run: python -m build -w . - name: Install openneuro-py run: pip install .[tests] - name: Test with pytest - run: | - pytest + run: pytest diff --git a/pyproject.toml b/pyproject.toml index 187a49a..b1871bd 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,3 +1,7 @@ +[build-system] +requires = ["hatchling", "hatch-vcs"] +build-backend = "hatchling.build" + [project] name = "openneuro-py" description = "A Python client for OpenNeuro." @@ -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"