summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorJoakim Saario2023-10-11 21:24:58 +0200
committerJoakim Saario2023-10-11 21:25:52 +0200
commit5c602c40061285b959122b9a5f8253804138dcb6 (patch)
tree775e9247fda1dcb6f9125998ed027a1f828da8b3 /PKGBUILD
parent06583de414a337434a82f75e4b4a5dcdfdceb764 (diff)
downloadaur-5c602c40061285b959122b9a5f8253804138dcb6.tar.gz
Fix PKGBUILD bugs
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD33
1 files changed, 18 insertions, 15 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 025f10cb4f63..eab5e702f23b 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,30 +2,33 @@
pkgname=obscura
pkgver=0.1.0
-pkgrel=1
+pkgrel=2
pkgdesc='Symmetric file encryption using Argon2-based passphrases'
arch=('any')
url="https://github.com/jocke-l/${pkgname}"
license=('BSD')
depends=('python-cryptography' 'python-argon2-cffi')
-makedepends=('python-build' 'python-installer' 'python-hatchling')
+makedepends=(
+ 'python-build'
+ 'python-installer'
+ 'python-hatchling'
+ 'python-hatch-fancy-pypi-readme'
+)
checkdepends=('python-pytest')
-source=("${pkgname}-${pkgver}.tar.gz::${url}/archive/refs/tags/v${pkgver}.tar.gz")
-sha512sums=('5ddbdc8eaaae5cc2b5a89c6898278fd79df4d64dc8eb38a5da6fed2a0ee5bab88c765fccfcd1a566669189c02ccfcd5d699c0164332f39e108cd8288b33a7d6f')
+source=(
+ "${pkgname}-${pkgver}.tar.gz::${url}/archive/refs/tags/v${pkgver}.tar.gz"
+ 'no-hatch-vcs.diff'
+)
+sha512sums=(
+ '5ddbdc8eaaae5cc2b5a89c6898278fd79df4d64dc8eb38a5da6fed2a0ee5bab88c765fccfcd1a566669189c02ccfcd5d699c0164332f39e108cd8288b33a7d6f'
+ '3c26edde96c61e8e12570bbba67651520eb2e2ab25582cfb118f895d66aae5a49d985b47c14d5e3d3966e9c87d89ee7d963a707bb07931c37b5eb4dc96f2d642'
+)
prepare() {
cd "${srcdir}/${pkgname}-${pkgver}"
- sed -i 's#\(requires = \).*#\1 ["hatchling"]#' pyproject.toml
- sed -i "s#dynamic.*#version = \"${pkgver}\"\nreadme = \"READMD.md\"#" pyproject.toml
+ patch pyproject.toml ../no-hatch-vcs.diff
- awk -v RS= -v ORS='\n\n' '$1 != "[tool.hatch.version]"' \
- pyproject.toml > pyproject.toml
- awk -v RS= -v ORS='\n\n' '$1 != "[tool.hatch.metadata.hooks.fancy-pypi-readme]"' \
- pyproject.toml > pyproject.toml
- awk -v RS= -v ORS='\n\n' \
- '$1 != "[[tool.hatch.metadata.hooks.fancy-pypi-readme.fragments]]"' \
- pyproject.toml > pyproject.toml
}
build() {
@@ -37,12 +40,12 @@ build() {
check() {
cd "${srcdir}/${pkgname}-${pkgver}"
- PYTHONPATH="src:$PYTHONPATH" /usr/bin/pytest -c /dev/null
+ /usr/bin/pytest --no-cov
}
package() {
cd "${srcdir}/${pkgname}-${pkgver}"
- /usr/bin/python -m installer --destdir="${pkgdir}" dist/*.whl .
+ /usr/bin/python -m installer --destdir="${pkgdir}" dist/*.whl
/usr/bin/install -Dm644 LICENSE.md "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE.md"
}