summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Wagie2023-08-25 13:23:13 -0600
committerMark Wagie2023-08-25 13:23:13 -0600
commiteb11b6021d3a37d4ce806e5b7c01e42918d9283f (patch)
tree6580671c9a67e250d35c28102bd622e2b6e33fb0
parent769ab69b90e4892512753b7416dc86549c87a1a1 (diff)
downloadaur-python-timeago.tar.gz
adopt package
-rw-r--r--.SRCINFO13
-rw-r--r--.gitignore7
-rw-r--r--PKGBUILD38
3 files changed, 37 insertions, 21 deletions
diff --git a/.SRCINFO b/.SRCINFO
index a923647fa7c2..4bb7f85570e8 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,15 +1,16 @@
pkgbase = python-timeago
- pkgdesc = Very simple python library, used to format datetime with `***time ago` statement.
+ pkgdesc = Simple library used to format datetime with `***time ago` statement.
pkgver = 1.0.16
- pkgrel = 2
+ pkgrel = 3
url = https://github.com/hustcc/timeago
arch = any
license = MIT
+ makedepends = python-build
makedepends = python-installer
+ makedepends = python-setuptools
+ makedepends = python-wheel
depends = python
- source = https://files.pythonhosted.org/packages/py3/t/timeago/timeago-1.0.16-py3-none-any.whl
- source = https://raw.githubusercontent.com/hustcc/timeago/master/LICENSE
- sha256sums = 9b8cb2e3102b329f35a04aa4531982d867b093b19481cfbb1dac7845fa2f79b0
- sha256sums = e2a15cd0b56cfffbb99e27caeb87afe58ff78097d9c3bd3aea2a251145479912
+ source = timeago-1.0.16.tar.gz::https://github.com/hustcc/timeago/archive/refs/tags/1.0.16.tar.gz
+ sha256sums = 7b54b88b3d0566cbf01ca11077dad8f7ae07a4318479e3d1b30feebe85f7137f
pkgname = python-timeago
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000000..4dab8d6386e3
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,7 @@
+# Ignore everything
+*
+
+# But not these files...
+!.gitignore
+!PKGBUILD
+!.SRCINFO
diff --git a/PKGBUILD b/PKGBUILD
index e227269d79fc..700180bbf912 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,23 +1,31 @@
-# Maintainer: Sophie Tauchert <sophie@999eagle.moe>
-
-_pkgname=timeago
-pkgname=python-${_pkgname}
+# Maintainer: Mark Wagie <mark dot wagie at proton dot me>
+# Contributor: Sophie Tauchert <sophie@999eagle.moe>
+pkgname=python-timeago
+_name=${pkgname#python-}
pkgver=1.0.16
-pkgrel=2
-pkgdesc="Very simple python library, used to format datetime with \`***time ago\` statement."
+pkgrel=3
+pkgdesc="Simple library used to format datetime with \`***time ago\` statement."
arch=('any')
url="https://github.com/hustcc/timeago"
license=('MIT')
depends=('python')
-makedepends=('python-installer')
-provides=()
-# use wheel distribution directly as no source distribution is available
-source=("https://files.pythonhosted.org/packages/py3/${_pkgname::1}/${_pkgname}/${_pkgname}-${pkgver}-py3-none-any.whl"
- "https://raw.githubusercontent.com/hustcc/timeago/master/LICENSE")
-sha256sums=('9b8cb2e3102b329f35a04aa4531982d867b093b19481cfbb1dac7845fa2f79b0'
- 'e2a15cd0b56cfffbb99e27caeb87afe58ff78097d9c3bd3aea2a251145479912')
+makedepends=('python-build' 'python-installer' 'python-setuptools' 'python-wheel')
+source=("$_name-$pkgver.tar.gz::$url/archive/refs/tags/$pkgver.tar.gz")
+sha256sums=('7b54b88b3d0566cbf01ca11077dad8f7ae07a4318479e3d1b30feebe85f7137f')
+
+build() {
+ cd "$_name-$pkgver"
+ python -m build --wheel --no-isolation
+}
+
+check() {
+ cd "$_name-$pkgver"
+ python test/testcase.py
+}
package() {
- install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
- python -m installer --destdir="$pkgdir" "${_pkgname}-${pkgver}-py3-none-any.whl"
+ cd "$_name-$pkgver"
+ python -m installer --destdir="$pkgdir" dist/*.whl
+
+ install -Dm644 LICENSE -t "$pkgdir/usr/share/licenses/$pkgname/"
}