Skip to content

Commit

Permalink
Use hatch build system
Browse files Browse the repository at this point in the history
  • Loading branch information
davidbrochart committed Apr 22, 2023
1 parent 4f7d17b commit 1d52d54
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 10 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ jobs:
with:
python-version: 3.x
- name: Install dependencies
run: pip install build
run: pip install hatch
- name: Create packages
run: python -m build
run: hatch build
- name: Upload packages
uses: pypa/gh-action-pypi-publish@release/v1
with:
Expand Down
18 changes: 10 additions & 8 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
[build-system]
requires = [
"setuptools >= 61",
"setuptools_scm >= 6.4"
]
build-backend = "setuptools.build_meta"
requires = ["hatchling"]
build-backend = "hatchling.build"

[project]
name = "asphalt"
Expand Down Expand Up @@ -67,9 +64,14 @@ tokio = "tokio:TokioLoopPolicy"
[project.scripts]
asphalt = "asphalt.core.cli:main"

[tool.setuptools_scm]
version_scheme = "post-release"
local_scheme = "dirty-tag"
[tool.hatch.version]
path = "src/asphalt/core/__init__.py"

[tool.hatch.build.targets.wheel]
only-include = ["src/asphalt"]

[tool.hatch.build.targets.wheel.sources]
"src" = ""

[tool.isort]
skip_gitignore = true
Expand Down
2 changes: 2 additions & 0 deletions src/asphalt/core/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
__version__ = "4.11.1"

__all__ = (
"CLIApplicationComponent",
"Component",
Expand Down

0 comments on commit 1d52d54

Please sign in to comment.