summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoakim Saario2023-10-11 21:24:58 +0200
committerJoakim Saario2023-10-11 21:25:52 +0200
commit5c602c40061285b959122b9a5f8253804138dcb6 (patch)
tree775e9247fda1dcb6f9125998ed027a1f828da8b3
parent06583de414a337434a82f75e4b4a5dcdfdceb764 (diff)
downloadaur-5c602c40061285b959122b9a5f8253804138dcb6.tar.gz
Fix PKGBUILD bugs
-rw-r--r--.SRCINFO5
-rw-r--r--.gitignore2
-rw-r--r--PKGBUILD33
-rw-r--r--no-hatch-vcs.diff9
4 files changed, 33 insertions, 16 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 5f32fb9d62f7..14b144de531f 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = obscura
pkgdesc = Symmetric file encryption using Argon2-based passphrases
pkgver = 0.1.0
- pkgrel = 1
+ pkgrel = 2
url = https://github.com/jocke-l/obscura
arch = any
license = BSD
@@ -9,9 +9,12 @@ pkgbase = obscura
makedepends = python-build
makedepends = python-installer
makedepends = python-hatchling
+ makedepends = python-hatch-fancy-pypi-readme
depends = python-cryptography
depends = python-argon2-cffi
source = obscura-0.1.0.tar.gz::https://github.com/jocke-l/obscura/archive/refs/tags/v0.1.0.tar.gz
+ source = no-hatch-vcs.diff
sha512sums = 5ddbdc8eaaae5cc2b5a89c6898278fd79df4d64dc8eb38a5da6fed2a0ee5bab88c765fccfcd1a566669189c02ccfcd5d699c0164332f39e108cd8288b33a7d6f
+ sha512sums = 3c26edde96c61e8e12570bbba67651520eb2e2ab25582cfb118f895d66aae5a49d985b47c14d5e3d3966e9c87d89ee7d963a707bb07931c37b5eb4dc96f2d642
pkgname = obscura
diff --git a/.gitignore b/.gitignore
index 9f98d1e8e50b..1403cd3b6523 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,3 +2,5 @@
!/PKGBUILD
!/.SRCINFO
!.gitignore
+
+!/no-hatch-vcs.diff
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"
}
diff --git a/no-hatch-vcs.diff b/no-hatch-vcs.diff
new file mode 100644
index 000000000000..6af860033b73
--- /dev/null
+++ b/no-hatch-vcs.diff
@@ -0,0 +1,9 @@
+2c2
+< requires = ["hatchling", "hatch-fancy-pypi-readme", "hatch-vcs"]
+---
+> requires = ["hatchling", "hatch-fancy-pypi-readme"]
+25c25,26
+< dynamic = ["version", "readme"]
+---
+> dynamic = ["readme"]
+> version = "0.1.0"