diff options
author | oysstu | 2018-08-06 22:47:29 +0200 |
---|---|---|
committer | oysstu | 2018-08-06 22:47:29 +0200 |
commit | d6eaadbc835545cbb9fd700597e0ca3533003a1b (patch) | |
tree | 8305bba487915841db25620f252e8304558ea55f | |
parent | 9d5b5473b5b140e41a6940267f269037a3e5dac8 (diff) | |
download | aur-d6eaadbc835545cbb9fd700597e0ca3533003a1b.tar.gz |
Add patch for renamed regex import in Python 3.7
-rw-r--r-- | .SRCINFO | 4 | ||||
-rw-r--r-- | PKGBUILD | 13 | ||||
-rw-r--r-- | re-3.7.patch | 16 |
3 files changed, 29 insertions, 4 deletions
@@ -1,7 +1,7 @@ pkgbase = python-paramz pkgdesc = Parameterization Framework for parameterized model creation and handling pkgver = 0.9.2 - pkgrel = 1 + pkgrel = 2 url = https://github.com/sods/paramz arch = any license = BSD @@ -17,7 +17,9 @@ pkgbase = python-paramz optdepends = python-jupyter_client optdepends = jupyter-notebook source = https://github.com/sods/paramz/archive/v0.9.2.tar.gz + source = re-3.7.patch sha512sums = cc63e312dd927bab4f82257ada3a74e5ebd7b349ef765f06171cfa2b40876325c20fb28d268e6824adc1dbe350575e77994292dcc74446c5c16ab53c201b6542 + sha512sums = 01db6862d20f222c83b35008c5b02b5fec60e3103e0f729444b3e07e7a1e2e7b74569b9ef6d4ceb3c9674c929391d2e97f41f96f6c2677e5d08e89e446b732c3 pkgname = python-paramz @@ -3,7 +3,7 @@ pkgname=python-paramz pkgver=0.9.2 -pkgrel=1 +pkgrel=2 pkgdesc="Parameterization Framework for parameterized model creation and handling" arch=("any") license=("BSD") @@ -11,8 +11,15 @@ url="https://github.com/sods/paramz" depends=('python' 'python-numpy' 'python-scipy' 'python-six' 'python-decorator') optdepends=('ipython' 'python-sphinx' 'python-ipykernel' 'python-ipywidgets' 'python-jupyter_client' 'jupyter-notebook') makedepends=() -source=("https://github.com/sods/paramz/archive/v${pkgver}.tar.gz") -sha512sums=("cc63e312dd927bab4f82257ada3a74e5ebd7b349ef765f06171cfa2b40876325c20fb28d268e6824adc1dbe350575e77994292dcc74446c5c16ab53c201b6542") +source=("https://github.com/sods/paramz/archive/v${pkgver}.tar.gz" + "re-3.7.patch") +sha512sums=("cc63e312dd927bab4f82257ada3a74e5ebd7b349ef765f06171cfa2b40876325c20fb28d268e6824adc1dbe350575e77994292dcc74446c5c16ab53c201b6542" + "01db6862d20f222c83b35008c5b02b5fec60e3103e0f729444b3e07e7a1e2e7b74569b9ef6d4ceb3c9674c929391d2e97f41f96f6c2677e5d08e89e446b732c3") + +prepare(){ + # re._pattern_type renamed to re.Pattern in 3.7 + patch -p1 -i re-3.7.patch +} build() { cd "paramz-${pkgver}" diff --git a/re-3.7.patch b/re-3.7.patch new file mode 100644 index 000000000000..c5612a94028a --- /dev/null +++ b/re-3.7.patch @@ -0,0 +1,16 @@ +--- parameterized.py 2018-07-09 16:01:40.000000000 +0200 ++++ src/paramz-0.9.2/paramz/parameterized.py 2018-08-06 22:40:27.675879464 +0200 +@@ -29,7 +29,12 @@ + #=============================================================================== + + import numpy; np = numpy +-from re import compile, _pattern_type ++from re import compile ++try: ++ from re import _pattern_type ++except ImportError: ++ from re import Pattern ++ _pattern_type = Pattern + + from .core.parameter_core import Parameterizable, adjust_name_for_printing + from .core import HierarchyError |