From a863de639a77976d6bfa8a2fdcae342f6070589e Mon Sep 17 00:00:00 2001 From: Nezar Abdennur Date: Tue, 13 Feb 2024 08:18:26 -0500 Subject: [PATCH] maint: Switch to hatchling build system --- MANIFEST.in | 17 ----------------- pyproject.toml | 28 ++++++++++++++++++---------- 2 files changed, 18 insertions(+), 27 deletions(-) delete mode 100644 MANIFEST.in diff --git a/MANIFEST.in b/MANIFEST.in deleted file mode 100644 index b1369fc..0000000 --- a/MANIFEST.in +++ /dev/null @@ -1,17 +0,0 @@ -include LICENSE -include CHANGES -include README.rst - -graft tests -graft docs -prune docs/_build -prune docs/_static -prune docs/_templates - -global-exclude __pycache__/* -global-exclude *.so -global-exclude *.pyd -global-exclude *.pyc -global-exclude .git* -global-exclude .deps/* -global-exclude .DS_Store \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 628c9f0..409d35b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [build-system] -requires = ["setuptools>=43.0.0", "wheel"] -build-backend = "setuptools.build_meta" +requires = ["hatchling", "hatch-vcs"] +build-backend = "hatchling.build" [project] name = "pqdict" @@ -32,7 +32,8 @@ classifiers = [ "Programming Language :: Python :: Implementation :: PyPy", ] -dynamic = ["readme", "version"] +readme = "README.rst" +dynamic = ["version"] dependencies = [] [project.optional-dependencies] @@ -56,15 +57,22 @@ documentation = "https://pqdict.readthedocs.io" repository = "https://github.com/nvictus/pqdict" changelog = "https://github.com/nvictus/pqdict/blob/master/CHANGES" -[tool.setuptools.dynamic] -readme = { file = ["README.rst"] } -version = { attr = "pqdict.__version__" } +[tool.hatch.version] +path = "pqdict/__init__.py" -[tool.setuptools.package-data] -pqdict = ['py.typed'] +[tool.hatch.envs.default.scripts] +lint = "ruff ." +fix = "ruff --fix ." +test = "pytest" +docs = "sphinx-autobuild docs docs/_build/html" -[tool.distutils.bdist_wheel] -universal = true +[tool.hatch.envs.test] +template = "default" +skip-install = false +features = ["test"] + +[[tool.hatch.envs.test.matrix]] +python = ["3.8", "3.9", "3.10", "3.11"] [tool.isort] profile = "black"