From 88f4920782a9bcb51857a51b6c02780ab1437ae6 Mon Sep 17 00:00:00 2001 From: Aarni Koskela Date: Fri, 21 Jul 2023 11:40:29 +0300 Subject: [PATCH] Switch packaging to hatch, get rid of setup.cfg --- LICENSE | 1 - pyproject.toml | 30 ++++++++++++++++++++++++++---- setup.cfg | 21 --------------------- 3 files changed, 26 insertions(+), 26 deletions(-) delete mode 100644 setup.cfg diff --git a/LICENSE b/LICENSE index 49a87db..6723980 100644 --- a/LICENSE +++ b/LICENSE @@ -1,4 +1,3 @@ - The MIT License (MIT) Copyright (c) 2018 Valohai diff --git a/pyproject.toml b/pyproject.toml index 74bb88b..2c7a868 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,9 +1,28 @@ [build-system] -requires = [ - "setuptools>=42", - "wheel" +requires = ["hatchling"] +build-backend = "hatchling.build" + +[project] +name = "hai" +dynamic = ["version"] +description = "Toolbelt library" +readme = "README.md" +license = "MIT" +requires-python = ">=3.7" +authors = [ + { name = "Valohai", email = "dev@valohai.com" }, +] + +[project.urls] +Homepage = "https://github.com/valohai/hai" + +[tool.hatch.version] +path = "hai/__init__.py" + +[tool.hatch.build.targets.sdist] +include = [ + "/hai", ] -build-backend = "setuptools.build_meta" [tool.mypy] strict = true @@ -37,3 +56,6 @@ select = [ ignore = [ "E741", # Ambiguous variable name ] + +[tool.pytest.ini_options] +norecursedirs = [".git", ".tox"] diff --git a/setup.cfg b/setup.cfg deleted file mode 100644 index ca676ff..0000000 --- a/setup.cfg +++ /dev/null @@ -1,21 +0,0 @@ -[metadata] -name = hai -version = attr: hai.__version__ -author = Valohai -author_email = dev@valohai.com -maintainer = Aarni Koskela -maintainer_email = akx@iki.fi -description = Toolbelt library -url = https://github.com/valohai/hai - -[options] -packages = find: -python_requires = >=3.7 -include_package_data = true - -[options.packages.find] -where = . -exclude = hai_tests - -[tool:pytest] -norecursedirs = .git .tox