Skip to content

Commit

Permalink
Migrate from setuptools + setuptools_scm to hatchling + hatch-vcs
Browse files Browse the repository at this point in the history
  • Loading branch information
hugovk committed Sep 24, 2022
1 parent 3791b79 commit 288f0c0
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 24 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.10"
python-version: "3.x"
cache: pip
cache-dependency-path: pyproject.toml

Expand All @@ -33,7 +33,6 @@ jobs:
- name: Build package
run: |
python setup.py --version
python -m build
twine check --strict dist/*
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ jobs:
success:
needs: test
runs-on: ubuntu-latest
name: test successful
name: Test successful
steps:
- name: Success
run: echo Test successful
25 changes: 9 additions & 16 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
[build-system]
build-backend = "setuptools.build_meta"
build-backend = "hatchling.build"
requires = [
"setuptools>=61.2",
"setuptools_scm[toml]>=6.2",
"hatch-vcs",
"hatchling",
]

[project]
Expand Down Expand Up @@ -65,21 +65,14 @@ norwegianblue = "norwegianblue.cli:main"
[tool.black]
target_version = ["py37"]

[tool.hatch]
version.source = "vcs"

[tool.hatch.version.raw-options]
local_scheme = "no-local-version"

[tool.isort]
profile = "black"

[tool.pytest.ini_options]
addopts = "--color=yes"

[tool.setuptools]
package-dir = {"" = "src"}
zip-safe = true
license-files = ["LICENSE.txt"]
include-package-data = false

[tool.setuptools.packages.find]
where = ["src"]
namespaces = false

[tool.setuptools_scm]
local_scheme = "no-local-version"
5 changes: 0 additions & 5 deletions setup.py

This file was deleted.

1 change: 1 addition & 0 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ envlist =
lint
pins
py{311, 310, 39, 38, 37}
isolated_build = true

[testenv]
extras =
Expand Down

0 comments on commit 288f0c0

Please sign in to comment.