diff options
-rw-r--r-- | .SRCINFO | 17 | ||||
-rw-r--r-- | 001-fix-python2-print.diff | 28 | ||||
-rw-r--r-- | PKGBUILD | 24 |
3 files changed, 69 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..7c89b7502bd0 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,17 @@ +pkgbase = python-logicmin + pkgdesc = Logic Minimization in Python + pkgver = 0.3.18 + pkgrel = 1 + url = https://github.com/dreylago/logicmin + arch = any + license = MIT + depends = python + depends = python-future + options = !emptydirs + source = https://github.com/dreylago/logicmin/archive/0.3.18.tar.gz + source = 001-fix-python2-print.diff + sha384sums = 5f183125c4ad8376d9b9040d225252cec2e37e438e56a96288b83b4f5f9dad0919bb50f5c571185da5a48fd5012badc9 + sha384sums = 7a33b00a26c1c165f04b40a61382a9e0a0abd6364ccaf9562ef199cda5c965cac99dc34e27e5ff2e4d0a26215c5634bd + +pkgname = python-logicmin + diff --git a/001-fix-python2-print.diff b/001-fix-python2-print.diff new file mode 100644 index 000000000000..5c9a336964d1 --- /dev/null +++ b/001-fix-python2-print.diff @@ -0,0 +1,28 @@ +diff --git a/logicmin/assign.py b/logicmin/assign.py +index b0a4478..75e2a69 100644 +--- a/logicmin/assign.py ++++ b/logicmin/assign.py +@@ -1,3 +1,5 @@ ++from __future__ import print_function
++
+ from fsm import *
+
+ class StateAssign:
+@@ -18,14 +20,14 @@ class StateAssign: + hist[solcost] = hist[solcost] + 1;
+ if solcost < mincost:
+ mincost = solcost
+- print "i",i,"cost",solcost
++ print("i",i,"cost",solcost)
+ fsm.PrintSol()
+ i = i + 1
+ #
+- print "total solutions=",i-1
++ print("total solutions=",i-1)
+
+ for k in range(1000):
+ if hist[k]>0:
+- print k,"=",hist[k]
++ print(k,"=",hist[k])
+
+
diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..4722f1c2a279 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,24 @@ +# Maintainer: Dario Ostuni <another.code.996@gmail.com> +pkgname=python-logicmin +pkgver=0.3.18 +pkgrel=1 +pkgdesc="Logic Minimization in Python" +arch=('any') +url="https://github.com/dreylago/logicmin" +license=('MIT') +depends=('python' 'python-future') +options=(!emptydirs) +source=("https://github.com/dreylago/logicmin/archive/${pkgver}.tar.gz" + "001-fix-python2-print.diff") +sha384sums=('5f183125c4ad8376d9b9040d225252cec2e37e438e56a96288b83b4f5f9dad0919bb50f5c571185da5a48fd5012badc9' + '7a33b00a26c1c165f04b40a61382a9e0a0abd6364ccaf9562ef199cda5c965cac99dc34e27e5ff2e4d0a26215c5634bd') + +prepare() { + cd "$srcdir/logicmin-${pkgver}" + patch -p1 < "${srcdir}/001-fix-python2-print.diff" +} + +package() { + cd "$srcdir/logicmin-${pkgver}" + python setup.py install --root="$pkgdir/" --optimize=1 +} |