mirror of
https://github.com/arcan1s/ahriman.git
synced 2025-04-24 15:27:17 +00:00
use hatchling instead of flit
This commit is contained in:
parent
4e4029e6a1
commit
d18d146d79
@ -43,7 +43,7 @@ RUN pacman -S --noconfirm --asdeps \
|
|||||||
pacman -S --noconfirm --asdeps \
|
pacman -S --noconfirm --asdeps \
|
||||||
base-devel \
|
base-devel \
|
||||||
python-build \
|
python-build \
|
||||||
python-flit \
|
python-hatchling \
|
||||||
python-installer \
|
python-installer \
|
||||||
python-wheel \
|
python-wheel \
|
||||||
&& \
|
&& \
|
||||||
|
@ -8,7 +8,7 @@ arch=('any')
|
|||||||
url="https://github.com/arcan1s/ahriman"
|
url="https://github.com/arcan1s/ahriman"
|
||||||
license=('GPL3')
|
license=('GPL3')
|
||||||
depends=('devtools>=1:1.0.0' 'git' 'pyalpm' 'python-bcrypt' 'python-inflection' 'python-pyelftools' 'python-requests')
|
depends=('devtools>=1:1.0.0' 'git' 'pyalpm' 'python-bcrypt' 'python-inflection' 'python-pyelftools' 'python-requests')
|
||||||
makedepends=('python-build' 'python-flit' 'python-installer' 'python-wheel')
|
makedepends=('python-build' 'python-hatchling' 'python-installer' 'python-wheel')
|
||||||
optdepends=('python-aioauth-client: web server with OAuth2 authorization'
|
optdepends=('python-aioauth-client: web server with OAuth2 authorization'
|
||||||
'python-aiohttp: web server'
|
'python-aiohttp: web server'
|
||||||
'python-aiohttp-apispec>=3.0.0: web server'
|
'python-aiohttp-apispec>=3.0.0: web server'
|
||||||
@ -42,6 +42,11 @@ package() {
|
|||||||
|
|
||||||
python -m installer --destdir="$pkgdir" "dist/$pkgname-$pkgver-py3-none-any.whl"
|
python -m installer --destdir="$pkgdir" "dist/$pkgname-$pkgver-py3-none-any.whl"
|
||||||
|
|
||||||
|
# hatchling doesn't support installation outside of the python root, so we need to install data files manually
|
||||||
|
local site_packages=$(python -c "import site; print(site.getsitepackages()[0])")
|
||||||
|
cp -a "$pkgdir$site_packages/$pkgname/data/"* "$pkgdir/usr/"
|
||||||
|
rm -r "$pkgdir$site_packages/$pkgname/data"
|
||||||
|
|
||||||
# keep usr/share configs as reference and copy them to /etc
|
# keep usr/share configs as reference and copy them to /etc
|
||||||
install -Dm644 "$pkgdir/usr/share/$pkgname/settings/ahriman.ini" "$pkgdir/etc/ahriman.ini"
|
install -Dm644 "$pkgdir/usr/share/$pkgname/settings/ahriman.ini" "$pkgdir/etc/ahriman.ini"
|
||||||
install -Dm644 "$pkgdir/usr/share/$pkgname/settings/ahriman.ini.d/logging.ini" "$pkgdir/etc/ahriman.ini.d/logging.ini"
|
install -Dm644 "$pkgdir/usr/share/$pkgname/settings/ahriman.ini.d/logging.ini" "$pkgdir/etc/ahriman.ini.d/logging.ini"
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
[build-system]
|
[build-system]
|
||||||
requires = ["flit_core"]
|
requires = ["hatchling"]
|
||||||
build-backend = "flit_core.buildapi"
|
build-backend = "hatchling.build"
|
||||||
|
|
||||||
[project]
|
[project]
|
||||||
name = "ahriman"
|
name = "ahriman"
|
||||||
@ -89,17 +89,26 @@ web = [
|
|||||||
"setuptools", # required by aiohttp-apispec
|
"setuptools", # required by aiohttp-apispec
|
||||||
]
|
]
|
||||||
|
|
||||||
[tool.flit.sdist]
|
[tool.hatch.version]
|
||||||
|
path = "src/ahriman/__init__.py"
|
||||||
|
|
||||||
|
[tool.hatch.build.targets.sdist]
|
||||||
include = [
|
include = [
|
||||||
"AUTHORS",
|
"AUTHORS",
|
||||||
"CONTRIBUTING.md",
|
"CONTRIBUTING.md",
|
||||||
"SECURITY.md",
|
"SECURITY.md",
|
||||||
"package",
|
"package",
|
||||||
|
"src",
|
||||||
"web.png",
|
"web.png",
|
||||||
]
|
]
|
||||||
exclude = [
|
exclude = [
|
||||||
"package/archlinux",
|
"package/archlinux",
|
||||||
]
|
]
|
||||||
|
|
||||||
[tool.flit.external-data]
|
[tool.hatch.build.targets.wheel]
|
||||||
directory = "package"
|
packages = [
|
||||||
|
"src/ahriman",
|
||||||
|
]
|
||||||
|
|
||||||
|
[tool.hatch.build.targets.wheel.force-include]
|
||||||
|
"package" = "ahriman/data"
|
||||||
|
Loading…
Reference in New Issue
Block a user