Date: Thursday, April 6, 2023 @ 13:15:02
  Author: felixonmars
Revision: 1438812

archrelease: copy trunk to community-staging-any

Added:
  python-robot-detection/repos/community-staging-any/
  python-robot-detection/repos/community-staging-any/PKGBUILD
    (from rev 1438811, python-robot-detection/trunk/PKGBUILD)

----------+
 PKGBUILD |   41 +++++++++++++++++++++++++++++++++++++++++
 1 file changed, 41 insertions(+)

Copied: python-robot-detection/repos/community-staging-any/PKGBUILD (from rev 
1438811, python-robot-detection/trunk/PKGBUILD)
===================================================================
--- community-staging-any/PKGBUILD                              (rev 0)
+++ community-staging-any/PKGBUILD      2023-04-06 13:15:02 UTC (rev 1438812)
@@ -0,0 +1,41 @@
+# Maintainer: David Runge <[email protected]>
+
+_name=robot-detection
+pkgname=python-robot-detection
+pkgver=0.4.0
+pkgrel=7
+pkgdesc="Detect web crawlers using HTTP User Agent"
+arch=('any')
+url="https://github.com/rory/robot-detection";
+license=('GPL3')
+depends=('python-six')
+makedepends=('python-setuptools')
+checkdepends=('python-pytest')
+# sdist doesn't contain tests:
+# https://github.com/rory/robot-detection/issues/2
+source=("$pkgname-$pkgver.tar.gz::https://github.com/rory/${_name}/archive/v${pkgver}.tar.gz";)
+sha512sums=('10b1fbd2307c375e3cd067e43bee1bc0ff71f4b83ede9b92d2fb8d60edfd6d4a8d1a4d06d74e3c0653056f2e2b2cb81a7e997047093e925bd79bf4626d33d85f')
+
+prepare() {
+  mv -v "${_name}-${pkgver}" "$pkgname-$pkgver"
+}
+
+build() {
+  cd "$pkgname-$pkgver"
+  python setup.py build
+}
+
+check() {
+  cd "$pkgname-$pkgver"
+  export PYTHONPATH="${PWD}/build:${PYTHONPATH}"
+  python ./tests.py
+}
+
+package() {
+  cd "$pkgname-$pkgver"
+  python setup.py install --skip-build \
+    --optimize=1 \
+    --prefix=/usr \
+    --root="${pkgdir}"
+  install -vDm 644 README.md -t "${pkgdir}/usr/share/doc/${pkgname}"
+}

Reply via email to