summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorTechcable2021-04-01 22:05:05 -0700
committerTechcable2021-04-01 22:05:05 -0700
commit2e7cba0b3ca1f483ffd254317fac8b8223ffd4d5 (patch)
tree7791391cfdb0388df7d6a55d78f8f244f0791a47
downloadaur-2e7cba0b3ca1f483ffd254317fac8b8223ffd4d5.tar.gz
Initial version: 2.0.1
-rw-r--r--.SRCINFO22
-rw-r--r--.gitignore7
-rw-r--r--PKGBUILD53
3 files changed, 82 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..8796a62dd2f2
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,22 @@
+pkgbase = mathicsscript
+ pkgdesc = A more advanced command-line interface to Mathics.
+ pkgver = 2.0.1
+ pkgrel = 1
+ url = https://github.com/Mathics3/mathicsscript
+ arch = any
+ license = custom
+ checkdepends = python-pytest
+ depends = mathics>=2.0.0
+ depends = mathics<2.1.0
+ depends = python-click
+ depends = python-colorama
+ depends = python-pygments
+ depends = python-columnize
+ depends = python-networkx
+ depends = python-pygments
+ depends = python-term-background
+ source = mathicsscript-2.0.1.tar.gz::https://github.com/Mathics3/mathicsscript/archive/refs/tags/2.0.1.tar.gz
+ sha256sums = c9ac844240b652c431cd3e5111dd2093d09b5306bf1d20b929deb337f443f0b8
+
+pkgname = mathicsscript
+
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000000..2343c6cadaf4
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,7 @@
+# Tars
+mathicsscript*.tar.gz
+mathicsscript*.pkg.tar.zst
+
+# makepkg
+src
+pkg
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..4850681d9f5e
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,53 @@
+# Maintainer: Techcable <Techcable at techcable dot net>
+pkgname=mathicsscript
+pkgver=2.0.1
+pkgrel=1
+pkgdesc="A more advanced command-line interface to Mathics."
+arch=("any")
+url="https://github.com/Mathics3/mathicsscript"
+# No license is explicitly stated, however since Mathics is
+# GPLv3 we can assume it's implicitly GPL-compatible
+license=('custom')
+groups=()
+depends=("mathics>=2.0.0" "mathics<2.1.0"
+ "python-click" "python-colorama" "python-pygments"
+ "python-columnize" "python-networkx"
+ "python-pygments" "python-term-background")
+checkdepends=("python-pytest")
+backup=() # Do we have any config files?
+options=()
+install=
+source=("${pkgname}-${pkgver}.tar.gz::${url}/archive/refs/tags/${pkgver}.tar.gz")
+sha256sums=("c9ac844240b652c431cd3e5111dd2093d09b5306bf1d20b929deb337f443f0b8")
+validpgpkeys=()
+
+prepare() {
+ # We prepare a 'hack bin' for the tests
+ cd "$pkgname-$pkgver"
+ mkdir -p "hack-bin"
+ echo -e '#!/bin/bash\npython3 -m mathicsscript "$@"' > "hack-bin/${pkgname}"
+ chmod +x "hack-bin/${pkgname}"
+}
+
+build() {
+ cd "$pkgname-$pkgver"
+ python setup.py build
+}
+
+check() {
+ cd "$pkgname-$pkgver"
+ # Test environment needs this -_-
+ # Essentially they assume we've already been installed
+ export PYTHONPATH="."
+ # NOTE: This includes a 'mathicsscript' executable
+ export PATH="$PATH:$(pwd)/hack-bin"
+ pytest test
+}
+
+package() {
+ cd "$pkgname-$pkgver"
+ python setup.py install --root="${pkgdir}/" --prefix="usr/"
+ # For some reason, setuptools seems to like including these
+ # test files....
+ rm -r "${pkgdir}"/usr/lib/python*/site-packages/test
+}