diff --git a/.github/workflows/setup.sh b/.github/workflows/setup.sh index 48dd2118..5a10aa90 100755 --- a/.github/workflows/setup.sh +++ b/.github/workflows/setup.sh @@ -12,7 +12,7 @@ pacman -Syyu --noconfirm # main dependencies pacman -S --noconfirm devtools git npm pyalpm python-bcrypt python-filelock python-inflection python-pyelftools python-requests python-systemd sudo # make dependencies -pacman -S --noconfirm --asdeps base-devel python-build python-flit python-installer python-tox python-wheel +pacman -S --noconfirm --asdeps base-devel python-build python-hatchling python-installer python-tox python-wheel # optional dependencies if [[ -z $MINIMAL_INSTALL ]]; then # web server diff --git a/docker/Dockerfile b/docker/Dockerfile index 0bac9e1a..d1b986c1 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -35,7 +35,7 @@ RUN pacman -S --noconfirm --asdeps \ RUN pacman -S --noconfirm --asdeps \ base-devel \ python-build \ - python-flit \ + python-hatchling \ python-installer \ python-setuptools \ python-tox \ diff --git a/package/archlinux/PKGBUILD b/package/archlinux/PKGBUILD index 322ec56e..0c8e9fc7 100644 --- a/package/archlinux/PKGBUILD +++ b/package/archlinux/PKGBUILD @@ -9,7 +9,7 @@ arch=('any') url="https://ahriman.readthedocs.io/" license=('GPL-3.0-or-later') depends=('devtools>=1:1.0.0' 'git' 'pyalpm' 'python-bcrypt' 'python-filelock' 'python-inflection' 'python-pyelftools' 'python-requests') -makedepends=('npm' 'python-build' 'python-flit' 'python-installer' 'python-wheel') +makedepends=('npm' 'python-build' 'python-hatchling' 'python-installer' 'python-wheel') source=("https://github.com/arcan1s/ahriman/releases/download/$pkgver/$pkgbase-$pkgver.tar.gz" "$pkgbase.sysusers" "$pkgbase.tmpfiles") diff --git a/pyproject.toml b/pyproject.toml index 607a56be..0e605fe8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [build-system] -requires = ["flit_core"] -build-backend = "flit_core.buildapi" +requires = ["hatchling"] +build-backend = "hatchling.build" [project] name = "ahriman" @@ -112,21 +112,32 @@ tests = [ "pytest-spec", ] -[tool.flit.sdist] +[tool.hatch.version] +path = "src/ahriman/__init__.py" + +[tool.hatch.build.targets.sdist] include = [ - "AUTHORS", - "CONTRIBUTING.md", - "SECURITY.md", - "package", - "frontend", - "subpackages.py", - "web.png", + "/AUTHORS", + "/CONTRIBUTING.md", + "/COPYING", + "/README.md", + "/SECURITY.md", + "/frontend", + "/package", + "/pyproject.toml", + "/src", + "/subpackages.py", + "/web.png", ] exclude = [ - "package/archlinux", - "frontend/node_modules", - "frontend/package-lock.json", + "/package/archlinux", + "/frontend/node_modules", + "/frontend/package-lock.json", ] -[tool.flit.external-data] -directory = "package" +[tool.hatch.build.targets.wheel] +packages = ["src/ahriman"] + +[tool.hatch.build.targets.wheel.shared-data] +"package/lib" = "lib" +"package/share" = "share"