Skip to content

Commit

Permalink
chore(packaging): Migrate from setuptools to hatchling (#733)
Browse files Browse the repository at this point in the history
This is another modern build backend. The patch deletes `setup.py`
from the repository, and adds configuration for `hatchling` and
declares PEP 621 metadata in `pyproject.toml`.

It does not attempt to change the previously existing behavior.
  • Loading branch information
webknjaz authored Dec 28, 2024
1 parent 55d0143 commit d87bf02
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 33 deletions.
12 changes: 12 additions & 0 deletions hatch.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[build.targets.sdist]
include = [
'hooks/*.py',
]
exclude = [
'hooks/*.sh',
]

[build.targets.wheel]
packages = [
'hooks/',
]
38 changes: 38 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
[build-system]
requires = [
'hatchling',
]
build-backend = 'hatchling.build'

[project]
name = 'pre-commit-terraform'
version = '0.0.0'
# version_format = '{tag}+{gitsha}'
classifiers = [
'License :: OSI Approved :: MIT License',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: Implementation :: CPython',
'Programming Language :: Python :: Implementation :: PyPy',
]
description = 'Pre-commit hooks for terraform_docs_replace'
dependencies = [
'setuptools-git-version',
]

[[project.authors]]
name = 'Contributors' # FIXME
# email = 'степан@криївка.укр'

[project.urls]
'GitHub: repo' = 'https://github.com/antonbabenko/pre-commit-terraform'

[project.readme]
file = 'README.md'
content-type = 'text/markdown'

[project.scripts]
terraform_docs_replace = 'hooks.terraform_docs_replace:main'
33 changes: 0 additions & 33 deletions setup.py

This file was deleted.

0 comments on commit d87bf02

Please sign in to comment.