From 46f958832784f1b697df859aaf9e584f61e97bd4 Mon Sep 17 00:00:00 2001 From: "John T. Wodder II" Date: Sun, 19 Nov 2023 10:30:36 -0500 Subject: [PATCH] Switch to Hatch --- .github/dependabot.yml | 10 ++++++ .gitignore | 9 ----- CHANGELOG.md | 1 + MANIFEST.in | 6 ---- pyproject.toml | 78 ++++++++++++++++++++++++++++++++++++++++-- setup.cfg | 63 ---------------------------------- 6 files changed, 87 insertions(+), 80 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 9eaf843..350c421 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 cf3adc1..3ec1631 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,7 @@ v0.3.0 (in development) ----------------------- - Support Python 3.11 and 3.12 +- Migrated from setuptools to hatch v0.2.1 (2022-07-02) ------------------- 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/pyproject.toml b/pyproject.toml index b3491a3..efcc01a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,3 +1,77 @@ [build-system] -requires = ["setuptools >= 46.4.0"] -build-backend = "setuptools.build_meta" +requires = ["hatchling"] +build-backend = "hatchling.build" + +[project] +name = "interleave" +dynamic = ["version"] +description = "Yield from multiple iterators as values become available" +readme = "README.rst" +requires-python = ">=3.7" +license = "MIT" +license-files = { paths = ["LICENSE"] } +authors = [ + { name = "John Thorvald Wodder II", email = "interleave@varonathe.org" } +] + +keywords = [ + "interleaving", + "iterators", + "multithreading", +] + +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 :: Utilities", + "Typing :: Typed", +] + +dependencies = [] + +[project.urls] +"Source Code" = "https://github.com/jwodder/interleave" +"Bug Tracker" = "https://github.com/jwodder/interleave/issues" + +[tool.hatch.version] +path = "src/interleave/__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 +exclude = "test/data/" diff --git a/setup.cfg b/setup.cfg deleted file mode 100644 index 31a9e88..0000000 --- a/setup.cfg +++ /dev/null @@ -1,63 +0,0 @@ -[metadata] -name = interleave -version = attr:interleave.__version__ -description = Yield from multiple iterators as values become available -long_description = file:README.rst -long_description_content_type = text/x-rst -author = John Thorvald Wodder II -author_email = interleave@varonathe.org -license = MIT -license_files = LICENSE -url = https://github.com/jwodder/interleave - -keywords = - interleaving - iterators - multithreading - -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 :: Utilities - Typing :: Typed - -project_urls = - Source Code = https://github.com/jwodder/interleave - Bug Tracker = https://github.com/jwodder/interleave/issues - -[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 -exclude = test/data/