Skip to content

Commit

Permalink
Switch to Hatch
Browse files Browse the repository at this point in the history
  • Loading branch information
jwodder committed Nov 19, 2023
1 parent d21ce2f commit 12ff78c
Show file tree
Hide file tree
Showing 7 changed files with 137 additions and 130 deletions.
10 changes: 10 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
version: 2
updates:
- package-ecosystem: pip
directory: /
schedule:
interval: weekly
commit-message:
prefix: "[python]"
labels:
- dependencies
- d:python

- package-ecosystem: github-actions
directory: /
schedule:
Expand Down
9 changes: 0 additions & 9 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,16 +1,7 @@
*.egg
*.egg-info/
*.pyc
.cache/
.coverage*
.eggs/
.mypy_cache/
.nox/
.pytest_cache/
.tox/
__pycache__/
build/
dist/
docs/.doctrees/
docs/_build/
venv/
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
v2.4.0 (in development)
-----------------------
- Migrated from setuptools to hatch

v2.3.0 (2023-11-19)
-------------------
Expand Down
6 changes: 0 additions & 6 deletions MANIFEST.in

This file was deleted.

1 change: 1 addition & 0 deletions docs/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ Changelog

v2.4.0 (in development)
-----------------------
- Migrated from setuptools to hatch


v2.3.0 (2023-11-19)
Expand Down
127 changes: 125 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,126 @@
[build-system]
requires = ["setuptools >= 46.4.0"]
build-backend = "setuptools.build_meta"
requires = ["hatchling"]
build-backend = "hatchling.build"

[project]
name = "versioningit"
dynamic = ["version"]
description = "Versioning It with your Version In Git"
readme = "README.rst"
requires-python = ">=3.7"
license = "MIT"
license-files = { paths = ["LICENSE"] }
authors = [
{ name = "John Thorvald Wodder II", email = "[email protected]" }
]

keywords = [
"Git",
"Mercurial",
"VCS",
"packaging",
"version",
]

classifiers = [
"Development Status :: 5 - Production/Stable",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
"License :: OSI Approved :: MIT License",
"Framework :: Hatch",
"Framework :: Setuptools Plugin",
"Intended Audience :: Developers",
"Topic :: Software Development :: Build Tools",
"Topic :: Software Development :: Version Control",
"Topic :: Software Development :: Version Control :: Git",
"Topic :: Software Development :: Version Control :: Mercurial",
"Typing :: Typed",
]

dependencies = [
"importlib-metadata >= 3.6; python_version < '3.10'",
"packaging >= 17.1",
"tomli >= 1.2, < 3.0; python_version < '3.11'",
]

[project.scripts]
versioningit = "versioningit.__main__:main"

[project.entry-points."setuptools.finalize_distribution_options"]
versioningit = "versioningit.hook:setuptools_finalizer"

[project.entry-points."hatch"]
versioningit = "versioningit.hatch"

[project.entry-points."versioningit.vcs"]
git = "versioningit.git:describe_git"
git-archive = "versioningit.git:describe_git_archive"
hg = "versioningit.hg:describe_hg"

[project.entry-points."versioningit.tag2version"]
basic = "versioningit.basics:basic_tag2version"

[project.entry-points."versioningit.next_version"]
minor = "versioningit.next_version:next_minor_version"
minor-release = "versioningit.next_version:next_minor_release_version"
smallest = "versioningit.next_version:next_smallest_version"
smallest-release = "versioningit.next_version:next_smallest_release_version"
null = "versioningit.next_version:null_next_version"

[project.entry-points."versioningit.format"]
basic = "versioningit.basics:basic_format"

[project.entry-points."versioningit.template_fields"]
basic = "versioningit.basics:basic_template_fields"

[project.entry-points."versioningit.write"]
basic = "versioningit.basics:basic_write"

[project.entry-points."versioningit.onbuild"]
replace-version = "versioningit.onbuild:replace_version_onbuild"

[project.urls]
"Source Code" = "https://github.com/jwodder/versioningit"
"Bug Tracker" = "https://github.com/jwodder/versioningit/issues"
"Documentation" = "https://versioningit.readthedocs.io"

[tool.hatch.version]
path = "src/versioningit/__init__.py"

[tool.hatch.build.targets.sdist]
include = [
"/docs",
"/src",
"/test",
"CHANGELOG.*",
"CONTRIBUTORS.*",
"tox.ini",
]

[tool.hatch.envs.default]
python = "3"

[tool.mypy]
allow_incomplete_defs = false
allow_untyped_defs = false
ignore_missing_imports = false
# <https://github.com/python/mypy/issues/7773>:
no_implicit_optional = true
implicit_reexport = false
local_partial_types = true
pretty = true
show_error_codes = true
show_traceback = true
strict_equality = true
warn_redundant_casts = true
warn_return_any = true
warn_unreachable = true
exclude = "test/data/"
113 changes: 0 additions & 113 deletions setup.cfg

This file was deleted.

0 comments on commit 12ff78c

Please sign in to comment.