diff options
author | Georg Schlisio | 2015-06-24 11:01:22 +0200 |
---|---|---|
committer | Georg Schlisio | 2015-06-24 11:01:22 +0200 |
commit | e6c167ed35576f58bfe31d3bc0bcebe1ba0c4f10 (patch) | |
tree | 49988b4549cdd9f32a26834a626f046eb5744414 | |
parent | 30a227a2e81c70b828f7241d52e734cf1771fdd9 (diff) | |
download | aur-e6c167ed35576f58bfe31d3bc0bcebe1ba0c4f10.tar.gz |
1.2-2, added patch fixing a deep copy issue
-rw-r--r-- | .SRCINFO | 4 | ||||
-rw-r--r-- | PKGBUILD | 24 | ||||
-rw-r--r-- | deepcopy.patch | 16 |
3 files changed, 28 insertions, 16 deletions
@@ -1,15 +1,17 @@ pkgbase = python-amoeba pkgdesc = Amoeba fit routine based on the method of Nelder and Meads pkgver = 1.2 - pkgrel = 1 + pkgrel = 2 url = http://stitchpanorama.sourceforge.net/Python/amoeba.py arch = any license = GPL2 makedepends = python makedepends = python2 source = http://stitchpanorama.sourceforge.net/Python/amoeba.py + source = deepcopy.patch source = setup.py md5sums = 7e6a9ad95d8639ec3d1da7c6db0928fb + md5sums = d741ffab04b35e88f6ca60c3987886ae md5sums = c68322a7608767cc03012e62b3baa546 pkgname = python-amoeba @@ -2,38 +2,32 @@ pkgbase=python-amoeba pkgname=("python-amoeba" "python2-amoeba") pkgver=1.2 -pkgrel=1 +pkgrel=2 pkgdesc="Amoeba fit routine based on the method of Nelder and Meads" url="http://stitchpanorama.sourceforge.net/Python/amoeba.py" arch=('any') license=('GPL2') makedepends=("python" "python2") source=("http://stitchpanorama.sourceforge.net/Python/amoeba.py" + "deepcopy.patch" "setup.py") md5sums=('7e6a9ad95d8639ec3d1da7c6db0928fb' + 'd741ffab04b35e88f6ca60c3987886ae' 'c68322a7608767cc03012e62b3baa546') +prepare() { + cd "$srcdir/.." + # fix an error with initial simplex + patch amoeba.py deepcopy.patch +} + package_python2-amoeba() { depends=('python2') - - ## determine python minor version - #ver=$(python2 --version 2>&1 | cut -d" " -f2 | cut -d"." -f2) - #mkdir -p "${pkgdir}/usr/lib/python2.${ver}/site-packages/amoeba" - #touch "${pkgdir}/usr/lib/python2.${ver}/site-packages/amoeba/__init__.py" - #install -m644 amoeba.py "${pkgdir}/usr/lib/python2.${ver}/site-packages/amoeba" - - ls python2 setup.py install --root="${pkgdir}/" --optimize=1 } package_python-amoeba() { depends=('python') - ls python setup.py install --root="${pkgdir}/" --optimize=1 - ## determine python minor version - #ver=$(python --version 2>&1 | cut -d" " -f2 | cut -d"." -f2) - #mkdir -p "${pkgdir}/usr/lib/python3.${ver}/site-packages/amoeba" - #touch "${pkgdir}/usr/lib/python3.${ver}/site-packages/amoeba/__init__.py" - #install -m644 amoeba.py "${pkgdir}/usr/lib/python3.${ver}/site-packages/amoeba" } diff --git a/deepcopy.patch b/deepcopy.patch new file mode 100644 index 000000000000..b4ca228568f1 --- /dev/null +++ b/deepcopy.patch @@ -0,0 +1,16 @@ +diff --git a/projekte/amoeba.py b/projekte/amoeba.py +index da504b4..3068470 100644 +--- a/projekte/amoeba.py ++++ b/projekte/amoeba.py +@@ -71,9 +71,9 @@ def amoeba(var,scale,func,ftolerance=1.e-4,xtolerance=1.e-4,itmax=500,data=None) + # first set up the simplex + + simplex = [0]*(nvar+1) # set the initial simplex +- simplex[0] = var[:] ++ simplex[0] = var[:]*1 + for i in range(nvar): +- simplex[i+1] = var[:] ++ simplex[i+1] = var[:]*1 + simplex[i+1][i] += scale[i] + + fvalue = [] |