summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrás Wacha2019-07-22 10:18:22 +0200
committerAndrás Wacha2019-07-22 11:36:37 +0200
commit8a19c108884720d20a179bf019f001b88c657da1 (patch)
treed120f70494a805f32a3fcfbf36b3c2f029456900
downloadaur-8a19c108884720d20a179bf019f001b88c657da1.tar.gz
Initial commit
-rw-r--r--.SRCINFO27
-rw-r--r--PKGBUILD55
-rw-r--r--bumps.patch77
3 files changed, 159 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..2a0248744df
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,27 @@
+pkgbase = python-bumps
+ pkgdesc = Data fitting with uncertainty analysis
+ pkgver = 0.7.11
+ pkgrel = 1
+ url = https://github.com/bumps/bumps
+ arch = any
+ license = custom
+ makedepends = python-setuptools
+ makedepends = python-sphinx
+ makedepends = python-nose
+ makedepends = python-docutils
+ makedepends = python-pygments
+ makedepends = python-jinja>=2
+ depends = python-numpy
+ depends = python-scipy
+ depends = python-matplotlib
+ depends = python-wxpython
+ depends = python-pyparsing
+ depends = python-periodictable
+ depends = python-scikit-learn
+ source = https://github.com/bumps/bumps/archive/v0.7.11.tar.gz
+ source = bumps.patch
+ sha256sums = f0c368d7beb4307297fb5298658921941a80c21e7bc52fb5dab1a1d1ef16d250
+ sha256sums = SKIP
+
+pkgname = python-bumps
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..1e4dba20875
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,55 @@
+# Maintainer: András Wacha <awacha@gmail.com>
+pkgname=python-bumps
+_name=${pkgname#python-}
+pkgver=0.7.11
+pkgrel=1
+pkgdesc="Data fitting with uncertainty analysis"
+arch=(any)
+url="https://github.com/bumps/bumps"
+license=('custom')
+makedepends=( python-setuptools
+ python-sphinx
+ python-nose
+ python-docutils
+ python-pygments
+ 'python-jinja>=2'
+)
+depends=( python-numpy
+ python-scipy
+ python-matplotlib
+ python-wxpython
+ python-pyparsing
+ python-periodictable
+ python-scikit-learn
+)
+source=("https://github.com/${_name}/${_name}/archive/v${pkgver}.tar.gz"
+ "bumps.patch")
+sha256sums=('f0c368d7beb4307297fb5298658921941a80c21e7bc52fb5dab1a1d1ef16d250'
+ 'SKIP')
+
+prepare() {
+ cd ${_name}-${pkgver}
+ patch -p1 <../bumps.patch
+}
+
+build() {
+ cd ${_name}-${pkgver}
+ python setup.py build
+ (cd bumps/dream && cc compiled.c -I ../../Random123/include/ -O2 -fopenmp -shared -lm -o _compiled.so -fPIC )
+ (cd doc && make html)
+ (cd doc && make pdf)
+}
+
+check() {
+ cd ${_name}-${pkgver}
+# python test.py
+}
+
+package() {
+ cd ${_name}-${pkgver}
+ python setup.py install --root="$pkgdir/" --optimize=1 --skip-build
+ mkdir -p ${pkgdir}/usr/share/licenses/python-bumps
+ cp ${srcdir}/${_name}-${pkgver}/LICENSE.txt ${pkgdir}/usr/share/licenses/python-bumps/license.txt
+ mkdir -p ${pkgdir}/usr/share/doc/python-bumps
+ cp ${srcdir}/${_name}-${pkgver}/doc/_build/html ${pkgdir}/usr/share/doc/python-bumps -R
+}
diff --git a/bumps.patch b/bumps.patch
new file mode 100644
index 00000000000..54f15a3d77c
--- /dev/null
+++ b/bumps.patch
@@ -0,0 +1,77 @@
+diff -Naur bumps-0.7.11/bumps/numdifftools/core.py bumps-0.7.11_patched/bumps/numdifftools/core.py
+--- bumps-0.7.11/bumps/numdifftools/core.py 2019-07-22 11:00:07.663853366 +0200
++++ bumps-0.7.11_patched/bumps/numdifftools/core.py 2018-09-24 21:06:44.000000000 +0200
+@@ -23,7 +23,7 @@
+ import numpy as np
+ from collections import namedtuple
+ from numpy import linalg
+-from scipy import misc
++from scipy import misc, special
+ import warnings
+
+ # 2016-04-19 PAK use relative imports
+@@ -631,9 +631,9 @@
+ def _vstack(self, sequence, steps):
+ # sequence = np.atleast_2d(sequence)
+ original_shape = np.shape(sequence[0])
+- f_del = np.vstack(list(np.ravel(r)) for r in sequence)
+- h = np.vstack(list(np.ravel(np.ones(original_shape)*step))
+- for step in steps)
++ f_del = np.vstack([list(np.ravel(r)) for r in sequence])
++ h = np.vstack([list(np.ravel(np.ones(original_shape)*step))
++ for step in steps])
+ if f_del.size != h.size:
+ raise ValueError('fun did not return data of correct size ' +
+ '(it must be vectorized)')
+@@ -683,6 +683,7 @@
+ >>> np.allclose(fd(1), 2.71828183)
+ True
+
++ >>> fd = nd.Derivative(np.exp)
+ >>> d2 = fd([1, 2])
+ >>> np.allclose(d2, [ 2.71828183, 7.3890561 ])
+ True
+@@ -781,7 +780,7 @@
+ inv_sr = 1.0 / step_ratio
+ offset = [1, 1, 2, 2, 4, 1, 3][parity]
+ c0 = [1.0, 1.0, 1.0, 2.0, 24.0, 1.0, 6.0][parity]
+- c = c0/misc.factorial(np.arange(offset, step * nterms + offset, step))
++ c = c0/special.factorial(np.arange(offset, step * nterms + offset, step))
+ [i, j] = np.ogrid[0:nterms, 0:nterms]
+ return np.atleast_2d(c[j] * inv_sr ** (i * (step * j + offset)))
+
+diff -Naur bumps-0.7.11/doc/conf.py bumps-0.7.11_patched/doc/conf.py
+--- bumps-0.7.11/doc/conf.py 2019-07-22 11:01:21.761248474 +0200
++++ bumps-0.7.11_patched/doc/conf.py 2018-09-24 21:06:44.000000000 +0200
+@@ -51,8 +51,8 @@
+ #'sphinx.ext.jsmath',
+ 'sphinx.ext.mathjax',
+ #'only_directives',
++ 'matplotlib.sphinxext.mathmpl',
++ #'matplotlib.sphinxext.only_directives',
+- #'matplotlib.sphinxext.mathmpl',
+- 'matplotlib.sphinxext.only_directives',
+ 'matplotlib.sphinxext.plot_directive',
+ #'inheritance_diagram',
+ 'dollarmath',
+diff -Naur bumps-0.7.11/doc/Makefile bumps-0.7.11_patched/doc/Makefile
+--- bumps-0.7.11/doc/Makefile 2019-07-22 11:00:58.871022945 +0200
++++ bumps-0.7.11_patched/doc/Makefile 2018-09-24 21:06:44.000000000 +0200
+@@ -4,7 +4,7 @@
+ # You can set these variables from the command line.
+ PYTHON ?= python
+ SPHINXOPTS =
++SPHINXBUILD = sphinx-build
+-SPHINXBUILD = $(PYTHON) -m sphinx.__init__
+ #sphinx-build
+ PAPER =
+ BUILDDIR = _build
+@@ -12,7 +12,7 @@
+ # Internal variables.
+ PAPEROPT_a4 = -D latex_paper_size=a4
+ PAPEROPT_letter = -D latex_paper_size=letter
++ALLSPHINXOPTS = -a $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
+-ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
+
+ .PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp \
+ devhelp epub latex pdf text man changes linkcheck doctest