From 622216dab6805a0c81ef1f59caf2a4e3dec128c1 Mon Sep 17 00:00:00 2001 From: "John T. Wodder II" Date: Sun, 19 Nov 2023 10:32:12 -0500 Subject: [PATCH] Switch to Hatch --- .github/dependabot.yml | 10 +++++ .gitignore | 8 ---- CHANGELOG.md | 1 + MANIFEST.in | 6 --- docs/changelog.rst | 1 + pyproject.toml | 83 +++++++++++++++++++++++++++++++++++++++++- setup.cfg | 68 ---------------------------------- 7 files changed, 93 insertions(+), 84 deletions(-) delete mode 100644 MANIFEST.in delete mode 100644 setup.cfg diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 81579cb..ef3b2be 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -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: diff --git a/.gitignore b/.gitignore index d16a69d..9db2b73 100644 --- a/.gitignore +++ b/.gitignore @@ -1,14 +1,6 @@ -*.egg -*.egg-info/ -*.pyc -.cache/ .coverage* -.eggs/ .mypy_cache/ -.pytest_cache/ .tox/ __pycache__/ -build/ dist/ docs/_build/ -venv/ diff --git a/CHANGELOG.md b/CHANGELOG.md index 82dd7c4..e4f8b6d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ v0.9.0 (in development) ----------------------- - Drop support for Python 3.6 - Support Python 3.11 and 3.12 +- Migrated from setuptools to hatch v0.8.1 (2021-10-05) ------------------- diff --git a/MANIFEST.in b/MANIFEST.in deleted file mode 100644 index 7a2cb7d..0000000 --- a/MANIFEST.in +++ /dev/null @@ -1,6 +0,0 @@ -include CHANGELOG.* CONTRIBUTORS.* LICENSE tox.ini -graft src -graft docs -prune docs/_build -graft test -global-exclude *.py[cod] diff --git a/docs/changelog.rst b/docs/changelog.rst index 5ee3431..7234acb 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -7,6 +7,7 @@ v0.9.0 (in development) ----------------------- - Drop support for Python 3.6 - Support Python 3.11 and 3.12 +- Migrated from setuptools to hatch v0.8.1 (2021-10-05) diff --git a/pyproject.toml b/pyproject.toml index b3491a3..31ea5c0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,3 +1,82 @@ [build-system] -requires = ["setuptools >= 46.4.0"] -build-backend = "setuptools.build_meta" +requires = ["hatchling"] +build-backend = "hatchling.build" + +[project] +name = "javaproperties" +dynamic = ["version"] +description = "Read & write Java .properties files" +readme = "README.rst" +requires-python = ">=3.7" +license = "MIT" +license-files = { paths = ["LICENSE"] } +authors = [ + { name = "John Thorvald Wodder II", email = "javaproperties@varonathe.org" } +] + +keywords = [ + "java", + "properties", + "javaproperties", + "configfile", + "config", + "configuration", +] + +classifiers = [ + "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", + "Intended Audience :: Developers", + "Topic :: Software Development", + "Topic :: Software Development :: Libraries :: Java Libraries", + "Topic :: Utilities", + "Typing :: Typed", +] + +dependencies = [] + +[project.urls] +"Source Code" = "https://github.com/jwodder/javaproperties" +"Bug Tracker" = "https://github.com/jwodder/javaproperties/issues" +"Documentation" = "https://javaproperties.readthedocs.io" + +[tool.hatch.version] +path = "src/javaproperties/__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 +# : +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 diff --git a/setup.cfg b/setup.cfg deleted file mode 100644 index a3b64bc..0000000 --- a/setup.cfg +++ /dev/null @@ -1,68 +0,0 @@ -[metadata] -name = javaproperties -version = attr:javaproperties.__version__ -description = Read & write Java .properties files -long_description = file:README.rst -long_description_content_type = text/x-rst -author = John Thorvald Wodder II -author_email = javaproperties@varonathe.org -license = MIT -license_files = LICENSE -url = https://github.com/jwodder/javaproperties - -keywords = - java - properties - javaproperties - configfile - config - configuration - -classifiers = - 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 - Intended Audience :: Developers - Topic :: Software Development - Topic :: Software Development :: Libraries :: Java Libraries - Topic :: Utilities - Typing :: Typed - -project_urls = - Source Code = https://github.com/jwodder/javaproperties - Bug Tracker = https://github.com/jwodder/javaproperties/issues - Documentation = https://javaproperties.readthedocs.io - -[options] -packages = find: -package_dir = - =src -include_package_data = True -python_requires = >=3.7 - -[options.packages.find] -where = src - -[mypy] -allow_incomplete_defs = False -allow_untyped_defs = False -ignore_missing_imports = False -# : -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