summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorCarlos Aznarán Laos2021-08-12 08:51:15 -0500
committerCarlos Aznarán Laos2021-08-12 08:51:15 -0500
commit2add4cd4daffb37e2f0262c7146053062e03f1d2 (patch)
tree6681a03185f01f87fc1f1b2ca31639abd745e095
downloadaur-2add4cd4daffb37e2f0262c7146053062e03f1d2.tar.gz
Initial commit
-rw-r--r--.SRCINFO14
-rw-r--r--.gitignore1
-rw-r--r--PKGBUILD32
3 files changed, 47 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..a0bb79d2859e
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,14 @@
+pkgbase = python-pytest-codeblocks
+ pkgdesc = Test code blocks in your READMEs
+ pkgver = 0.11.1
+ pkgrel = 1
+ url = https://github.com/nschloe/pytest-codeblocks
+ arch = any
+ license = MIT
+ checkdepends = python-pytest-cov
+ makedepends = python-setuptools
+ depends = python-pytest
+ source = https://github.com/nschloe/pytest-codeblocks/archive/v0.11.1.tar.gz
+ sha512sums = 9a03c097bc0739c9343c40a1ab81675de2fed27fcb9bd7de10f18de1706336e5e0c10b26aaaea922ddc082d1baef48ea776b92672a2ee2aa3775fbbcbd91659f
+
+pkgname = python-pytest-codeblocks
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000000..f59ec20aabf5
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+* \ No newline at end of file
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..11aa79ba37ef
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,32 @@
+_base=pytest-codeblocks
+pkgname=python-${_base}
+pkgdesc="Test code blocks in your READMEs"
+pkgver=0.11.1
+pkgrel=1
+arch=('any')
+url="https://github.com/nschloe/${_base}"
+license=(MIT)
+depends=(python-pytest)
+makedepends=(python-setuptools)
+checkdepends=(python-pytest-cov)
+source=(${url}/archive/v${pkgver}.tar.gz)
+sha512sums=('9a03c097bc0739c9343c40a1ab81675de2fed27fcb9bd7de10f18de1706336e5e0c10b26aaaea922ddc082d1baef48ea776b92672a2ee2aa3775fbbcbd91659f')
+
+export PYTHONPYCACHEPREFIX="${BUILDDIR}/${pkgname}/.cache/cpython/"
+
+build() {
+ cd "${_base}-${pkgver}"
+ python -c "from setuptools import setup; setup();" build
+}
+
+check() {
+ cd "${_base}-${pkgver}"
+ python -c "from setuptools import setup; setup();" install --root="${PWD}/tmp_install" --optimize=1 --skip-build
+ PYTHONPATH="${PWD}/tmp_install$(python -c "import site; print(site.getsitepackages()[0])"):${PYTHONPATH}" python -m pytest -p pytester
+}
+
+package() {
+ cd "${_base}-${pkgver}"
+ python -c "from setuptools import setup; setup();" install --root="$pkgdir" --optimize=1 --skip-build
+ install -Dm 644 LICENSE.txt -t "${pkgdir}/usr/share/licenses/${pkgname}"
+}