summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authordvorapa2021-06-14 17:31:43 +0200
committerdvorapa2021-06-14 17:31:43 +0200
commit0378258c5467e1ea792bf48faa81cd67acbd3ac2 (patch)
tree1d411bafe5e48843ffd2a5fa86427c97705ee75e
downloadaur-0378258c5467e1ea792bf48faa81cd67acbd3ac2.tar.gz
new package
-rw-r--r--.SRCINFO15
-rwxr-xr-xPKGBUILD26
-rw-r--r--test.py13
3 files changed, 54 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..77423deb8157
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,15 @@
+pkgbase = python-mwparserfromhell
+ pkgdesc = Python package that provides an easy-to-use and outrageously powerful parser for MediaWiki wikicode.
+ pkgver = 0.6.2
+ pkgrel = 1
+ url = https://github.com/earwig/mwparserfromhell
+ arch = any
+ license = MIT
+ makedepends = python
+ makedepends = python-setuptools
+ source = https://files.pythonhosted.org/packages/source/m/mwparserfromhell/mwparserfromhell-0.6.2.tar.gz
+ sha256sums = d3f74c0101f81ff73c61985b67f2e7048a30dc5f6a578ea1544e69133988d874
+
+pkgname = python-mwparserfromhell
+ depends = python
+ conflicts = python-mwparserfromhell-git
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100755
index 000000000000..c223716c98fc
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,26 @@
+# Maintainer: Pavel Dvorak <dvorapa~seznam~cz>
+
+pkgname=python-mwparserfromhell
+pkgver=0.6.2
+pkgrel=1
+pkgdesc="Python package that provides an easy-to-use and outrageously powerful parser for MediaWiki wikicode."
+arch=(any)
+url=https://github.com/earwig/mwparserfromhell
+license=(MIT)
+makedepends=(python python-setuptools)
+source=("https://files.pythonhosted.org/packages/source/m/mwparserfromhell/mwparserfromhell-$pkgver.tar.gz")
+sha256sums=(d3f74c0101f81ff73c61985b67f2e7048a30dc5f6a578ea1544e69133988d874)
+
+build() {
+ cd "$srcdir/mwparserfromhell-$pkgver"
+ python setup.py build
+}
+
+package() {
+ depends=(python)
+ conflicts=(python-mwparserfromhell-git)
+
+ cd "$srcdir/mwparserfromhell-$pkgver"
+ python setup.py install --optimize=1 --root="$pkgdir/" --skip-build
+ install -Dm644 -t "$pkgdir/usr/share/licenses/$pkgname" LICENSE
+}
diff --git a/test.py b/test.py
new file mode 100644
index 000000000000..ab885cd9c50a
--- /dev/null
+++ b/test.py
@@ -0,0 +1,13 @@
+#!/usr/bin/python
+
+import importlib, pprint, sys
+
+pprint.pprint(sys.path)
+
+name = "mwparserfromhell"
+
+try:
+ importlib.import_module(name)
+ print("import success: " + name)
+except ImportError:
+ print("import error: " + name)