From ace898f3d97b46fcff2a355bbf921de42a040c1c Mon Sep 17 00:00:00 2001 From: "John T. Wodder II" Date: Sun, 19 Nov 2023 10:14:47 -0500 Subject: [PATCH] Switch to Hatch --- .github/dependabot.yml | 10 +++++ .gitignore | 9 ---- CHANGELOG.md | 1 + MANIFEST.in | 6 --- pyproject.toml | 95 +++++++++++++++++++++++++++++++++++++++++- setup.cfg | 80 ----------------------------------- 6 files changed, 104 insertions(+), 97 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 da00ee2..db141fc 100644 --- a/.gitignore +++ b/.gitignore @@ -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/ diff --git a/CHANGELOG.md b/CHANGELOG.md index 3beca49..75d5f6a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,6 @@ v0.7.0 (in development) ----------------------- +- Migrated from setuptools to hatch v0.6.0 (2023-10-31) ------------------- diff --git a/MANIFEST.in b/MANIFEST.in deleted file mode 100644 index 536c9ea..0000000 --- a/MANIFEST.in +++ /dev/null @@ -1,6 +0,0 @@ -include CHANGELOG.* CONTRIBUTORS.* LICENSE tox.ini -graft docs -prune docs/_build -graft test -global-exclude *.py[cod] -recursive-include test/data *.pyc diff --git a/pyproject.toml b/pyproject.toml index b3491a3..346588e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,3 +1,94 @@ [build-system] -requires = ["setuptools >= 46.4.0"] -build-backend = "setuptools.build_meta" +requires = ["hatchling"] +build-backend = "hatchling.build" + +[project] +name = "check-wheel-contents" +dynamic = ["version"] +description = "Check your wheels have the right contents" +readme = "README.rst" +requires-python = ">=3.7" +license = "MIT" +license-files = { paths = ["LICENSE"] } +authors = [ + { name = "John Thorvald Wodder II", email = "check-wheel-contents@varonathe.org" } +] + +keywords = [ + "linter", + "packaging", + "wheel", +] + +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", + "Environment :: Console", + "Intended Audience :: Developers", + "Topic :: Software Development :: Build Tools", + "Topic :: Software Development :: Libraries :: Python Modules", + "Topic :: Software Development :: Quality Assurance", +] + +dependencies = [ + "attrs >= 18.1", + "click >= 7.0", + "packaging", + "backports.cached-property; python_version < '3.8'", + "pydantic ~= 2.0", + "tomli >= 1.2, < 3.0; python_version < '3.11'", + "wheel-filename ~= 1.1", +] + +[project.scripts] +check-wheel-contents = "check_wheel_contents.__main__:main" + +[project.urls] +"Source Code" = "https://github.com/jwodder/check-wheel-contents" +"Bug Tracker" = "https://github.com/jwodder/check-wheel-contents/issues" + +[tool.hatch.version] +path = "src/check_wheel_contents/__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 +plugins = ["pydantic.mypy"] + +[tool.pydantic-mypy] +init_forbid_extra = true +warn_required_dynamic_aliases = true diff --git a/setup.cfg b/setup.cfg deleted file mode 100644 index affd0a3..0000000 --- a/setup.cfg +++ /dev/null @@ -1,80 +0,0 @@ -[metadata] -name = check-wheel-contents -version = attr:check_wheel_contents.__version__ -description = Check your wheels have the right contents -long_description = file:README.rst -long_description_content_type = text/x-rst -author = John Thorvald Wodder II -author_email = check-wheel-contents@varonathe.org -license = MIT -license_files = LICENSE -url = https://github.com/jwodder/check-wheel-contents - -keywords = - linter - packaging - wheel - -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 - Environment :: Console - Intended Audience :: Developers - Topic :: Software Development :: Build Tools - Topic :: Software Development :: Libraries :: Python Modules - Topic :: Software Development :: Quality Assurance - -project_urls = - Source Code = https://github.com/jwodder/check-wheel-contents - Bug Tracker = https://github.com/jwodder/check-wheel-contents/issues - -[options] -packages = find: -package_dir = - =src -python_requires = >=3.7 -install_requires = - attrs >= 18.1 - click >= 7.0 - packaging - backports.cached-property; python_version < "3.8" - pydantic ~= 2.0 - tomli >= 1.2, < 3.0; python_version < "3.11" - wheel-filename ~= 1.1 - -[options.packages.find] -where = src - -[options.entry_points] -console_scripts = - check-wheel-contents = check_wheel_contents.__main__:main - -[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 -plugins = pydantic.mypy - -[pydantic-mypy] -init_forbid_extra = True -warn_required_dynamic_aliases = True