summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichał Wojdyła2023-12-27 18:42:25 +0100
committerMichał Wojdyła2023-12-27 18:42:25 +0100
commit587aeb4f5c0b59c1fff48ae79e40ee605839042e (patch)
tree365387928025d8be07adbddd4adf8998d07d46a6
parent585eca148b0b9bd9846ccd8f29ce70ea807fb14e (diff)
downloadaur-587aeb4f5c0b59c1fff48ae79e40ee605839042e.tar.gz
Apply upstream fix for matplotlib >= 3.8
-rw-r--r--.SRCINFO4
-rw-r--r--PKGBUILD7
-rw-r--r--bumps.patch106
3 files changed, 35 insertions, 82 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 71355266ea8b..38c5c53452ce 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = python-bumps
pkgdesc = Data fitting with uncertainty analysis
pkgver = 0.9.1
- pkgrel = 1
+ pkgrel = 2
url = https://github.com/bumps/bumps
arch = any
license = custom
@@ -15,6 +15,6 @@ pkgbase = python-bumps
source = python-bumps-0.9.1.tar.gz::https://github.com/bumps/bumps/archive/v0.9.1.tar.gz
source = bumps.patch
sha256sums = ad79ec1eafda09d5b476453593278b2607004241b7f339936b230656fa1328fb
- sha256sums = dbe2b429a766f2c8b022f5745cc43d1cf947cb481c348f86fa551d592920e1c0
+ sha256sums = 97eaae9fb391f9e0308bb969b4f5a07c6e137039c6c611814e96a5a027b7578b
pkgname = python-bumps
diff --git a/PKGBUILD b/PKGBUILD
index ac8cff7d239b..d6ba9af73f57 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -3,7 +3,7 @@
pkgname=python-bumps
_name=${pkgname#python-}
pkgver=0.9.1
-pkgrel=1
+pkgrel=2
pkgdesc="Data fitting with uncertainty analysis"
arch=(any)
url="https://github.com/bumps/bumps"
@@ -19,11 +19,12 @@ makedepends=(python-setuptools
source=("$pkgname-$pkgver.tar.gz::https://github.com/${_name}/${_name}/archive/v${pkgver}.tar.gz"
"bumps.patch")
sha256sums=('ad79ec1eafda09d5b476453593278b2607004241b7f339936b230656fa1328fb'
- 'dbe2b429a766f2c8b022f5745cc43d1cf947cb481c348f86fa551d592920e1c0')
+ '97eaae9fb391f9e0308bb969b4f5a07c6e137039c6c611814e96a5a027b7578b')
prepare() {
cd ${_name}-${pkgver}
-# patch -p1 <../bumps.patch
+ # https://github.com/bumps/bumps/issues/129
+ patch -p1 <../bumps.patch
}
build() {
diff --git a/bumps.patch b/bumps.patch
index 54f15a3d77cc..01e9744c7bf9 100644
--- a/bumps.patch
+++ b/bumps.patch
@@ -1,77 +1,29 @@
-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
+From ddfae0d984220e28628cc4706fc14685302d12fe Mon Sep 17 00:00:00 2001
+From: bbm <brian.maranville@nist.gov>
+Date: Wed, 13 Dec 2023 16:54:36 -0500
+Subject: [PATCH] apply fix suggested in #129
+
+---
+ bumps/plotutil.py | 9 +++++++++
+ 1 file changed, 9 insertions(+)
+
+diff --git a/bumps/plotutil.py b/bumps/plotutil.py
+index 3f47e61e..cbbda879 100644
+--- a/bumps/plotutil.py
++++ b/bumps/plotutil.py
+@@ -54,6 +54,15 @@ def next_color():
+ import pylab
+ lines = pylab.gca()._get_lines
+ try:
++ base = lines.get_next_color()
++ except Exception:
++ try: # Cruft 1.7 - 3.7?
++ base = next(lines.prop_cycler)['color']
++ except Exception:
++ try: # Cruft 1.4-1.6?
++ base = next(lines.color_cycle)
++ except Exception: # Cruft 1.3 and earlier
++ base = lines._get_next_cycle_color()
+ base = next(lines.prop_cycler)['color']
+ except Exception:
+ try: # Cruft 1.4-1.6?