Skip to content

Commit dae2bf3

Browse files
committed
📦 Migrate from setuptools to hatchling
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.
1 parent 55d0143 commit dae2bf3

File tree

3 files changed

+50
-33
lines changed

3 files changed

+50
-33
lines changed

hatch.toml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
[build.targets.sdist]
2+
include = [
3+
'hooks/*.py',
4+
]
5+
exclude = [
6+
'hooks/*.sh',
7+
]
8+
9+
[build.targets.wheel]
10+
packages = [
11+
'hooks/',
12+
]

pyproject.toml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
[build-system]
2+
requires = [
3+
'hatchling',
4+
]
5+
build-backend = 'hatchling.build'
6+
7+
[project]
8+
name = 'pre-commit-terraform'
9+
version = '0.0.0'
10+
# version_format = '{tag}+{gitsha}'
11+
classifiers = [
12+
'License :: OSI Approved :: MIT License',
13+
'Programming Language :: Python :: 2',
14+
'Programming Language :: Python :: 2.7',
15+
'Programming Language :: Python :: 3',
16+
'Programming Language :: Python :: 3.6',
17+
'Programming Language :: Python :: 3.7',
18+
'Programming Language :: Python :: Implementation :: CPython',
19+
'Programming Language :: Python :: Implementation :: PyPy',
20+
]
21+
description = 'Pre-commit hooks for terraform_docs_replace'
22+
dependencies = [
23+
'setuptools-git-version',
24+
]
25+
26+
[[project.authors]]
27+
name = 'Contributors' # FIXME
28+
# email = 'степан@криївка.укр'
29+
30+
[project.urls]
31+
'GitHub: repo' = 'https://github.com/antonbabenko/pre-commit-terraform'
32+
33+
[project.readme]
34+
file = 'README.md'
35+
content-type = 'text/markdown'
36+
37+
[project.scripts]
38+
terraform_docs_replace = 'hooks.terraform_docs_replace:main'

setup.py

Lines changed: 0 additions & 33 deletions
This file was deleted.

0 commit comments

Comments
 (0)