diff --git a/mingw-w64-python-matplotlib/PKGBUILD b/mingw-w64-python-matplotlib/PKGBUILD index 0ce9aa5875..7289f6247d 100644 --- a/mingw-w64-python-matplotlib/PKGBUILD +++ b/mingw-w64-python-matplotlib/PKGBUILD @@ -3,7 +3,7 @@ _realname=matplotlib pkgbase=mingw-w64-python-${_realname} pkgname=("${MINGW_PACKAGE_PREFIX}-python2-${_realname}" "${MINGW_PACKAGE_PREFIX}-python3-${_realname}") -pkgver=1.5.1 +pkgver=1.5.3 pkgrel=1 pkgdesc="A python plotting library, making publication quality plots (mingw-w64)" arch=('any') @@ -31,8 +31,8 @@ makedepends=( source=("${_realname}-${pkgver}.tar.gz"::"https://github.com/matplotlib/matplotlib/archive/v${pkgver}.tar.gz" setupext.py.patch setup.py.patch) -sha256sums=('64c9f7cce4075d05c2602108ee1795aa6455c2c1d8e4329c95c83465e3806887' - 'ecaa1039d7527e31bbf175b23802123e843678bf0109fee4c76742d8eeee1fe0' +sha256sums=('c72276afc11f0b77cee736a783861039c0284d2e4739de8ca09d2dd1407745aa' + 'dd3f49ab7dfffb4771add36685f0df1d93fb186166e6c08ec72c16f315f3af93' '17e4353062e165dfe54293e39d8924355a4a3c44f2ffee3739d7cc7bddc9c699') noextract=("${_realname}-${pkgver}.tar.gz") diff --git a/mingw-w64-python-matplotlib/setupext.py.patch b/mingw-w64-python-matplotlib/setupext.py.patch index aa7f2d21af..d45d561640 100644 --- a/mingw-w64-python-matplotlib/setupext.py.patch +++ b/mingw-w64-python-matplotlib/setupext.py.patch @@ -1,21 +1,20 @@ ---- matplotlib-1.4.1/setupext.py.orig 2014-10-18 22:26:22.000000000 +0400 -+++ matplotlib-1.4.1/setupext.py 2014-10-19 17:02:34.889800000 +0400 -@@ -15,7 +15,7 @@ +--- matplotlib-1.5.3/setupext.py.orig 2016-09-09 05:50:50.000000000 +0300 ++++ matplotlib-1.5.3/setupext.py 2016-09-23 13:10:33.239264300 +0300 +@@ -19,6 +19,7 @@ + PY3min = (sys.version_info[0] >= 3) + PY32min = (PY3min and sys.version_info[1] >= 2 or sys.version_info[0] > 3) - - PY3 = (sys.version_info[0] >= 3) -- +MSYS = "MSYSTEM" in os.environ try: from subprocess import check_output -@@ -43,9 +43,16 @@ +@@ -46,9 +47,16 @@ return output -if sys.platform != 'win32': +if sys.platform != 'win32' or MSYS: - if sys.version_info[0] < 3: + if not PY3min: - from commands import getstatusoutput + def getstatusoutput(cmd): + """Return (status, output) of executing cmd in a shell.""" @@ -28,7 +27,7 @@ else: from subprocess import getstatusoutput -@@ -120,9 +127,10 @@ +@@ -126,9 +134,10 @@ Returns `True` if `filename` can be found in one of the directories in `include_dirs`. """ @@ -40,7 +39,7 @@ if os.path.exists(os.path.join(dir, filename)): return True return False -@@ -227,6 +235,7 @@ +@@ -239,6 +248,7 @@ """ ext = DelayedExtension(name, files, *args, **kwargs) for dir in get_base_dirs(): @@ -48,7 +47,7 @@ include_dir = os.path.join(dir, 'include') if os.path.exists(include_dir): ext.include_dirs.append(include_dir) -@@ -235,7 +244,6 @@ +@@ -247,7 +257,6 @@ if os.path.exists(lib_dir): ext.library_dirs.append(lib_dir) ext.include_dirs.append('.') @@ -56,7 +55,7 @@ return ext -@@ -247,16 +255,16 @@ +@@ -259,7 +268,7 @@ """ Determines whether pkg-config exists on this machine. """ @@ -65,8 +64,7 @@ self.has_pkgconfig = False else: try: - self.pkg_config = os.environ['PKG_CONFIG'] - except KeyError: +@@ -268,7 +277,7 @@ self.pkg_config = 'pkg-config' self.set_pkgconfig_path() @@ -75,7 +73,7 @@ self.has_pkgconfig = (status == 0) if not self.has_pkgconfig: print("IMPORTANT WARNING:") -@@ -292,7 +300,7 @@ +@@ -309,7 +318,7 @@ command = "{0} --libs --cflags ".format(executable) try: @@ -84,7 +82,7 @@ stderr=subprocess.STDOUT) except subprocess.CalledProcessError: pass -@@ -302,11 +310,16 @@ +@@ -319,11 +328,16 @@ for token in output.split(): attr = flag_map.get(token[:2]) if attr is not None: @@ -103,7 +101,7 @@ for include in default_include_dirs: dir = os.path.join(base, include) if os.path.exists(dir): -@@ -328,7 +341,7 @@ +@@ -345,7 +359,7 @@ return None status, output = getstatusoutput( @@ -112,7 +110,7 @@ if status == 0: return output return None -@@ -941,11 +954,11 @@ +@@ -897,11 +911,11 @@ name = "freetype" def check(self): @@ -126,7 +124,7 @@ if status == 0: version = output else: -@@ -967,6 +980,7 @@ +@@ -926,6 +940,7 @@ return version # Return the first version found in the include dirs. for include_dir in ext.include_dirs: @@ -134,7 +132,7 @@ header_fname = os.path.join(include_dir, 'freetype.h') if os.path.exists(header_fname): major, minor, patch = 0, 0, 0 -@@ -1014,11 +1028,11 @@ +@@ -972,11 +987,11 @@ name = "png" def check(self): @@ -148,25 +146,7 @@ if status == 0: version = output else: -@@ -1452,7 +1466,7 @@ - p = subprocess.Popen( - '. %s ; eval echo ${%s}' % (file, varname), - shell=True, -- executable="/bin/sh", -+ executable="sh", - stdout=subprocess.PIPE) - result = p.communicate()[0] - return result.decode('ascii') -@@ -1524,7 +1538,7 @@ - return tcl_lib, tcl_inc, 'tcl', tk_lib, tk_inc, 'tk' - - def add_flags(self, ext): -- if sys.platform == 'win32': -+ if sys.platform == 'win32' and not MSYS: - major, minor1, minor2, s, tmp = sys.version_info - if sys.version_info[0:2] < (3, 4): - ext.include_dirs.extend(['win32_static/include/tcl85']) -@@ -1660,7 +1674,7 @@ +@@ -1368,7 +1383,7 @@ return ext def add_flags(self, ext): @@ -175,7 +155,7 @@ def getoutput(s): ret = os.popen(s).read().strip() return ret -@@ -1715,7 +1729,7 @@ +@@ -1423,7 +1438,7 @@ 'm' in ext.libraries): ext.libraries.remove('m') @@ -184,7 +164,7 @@ pkg_config.setup_extension(ext, 'pygtk-2.0') pkg_config.setup_extension(ext, 'gtk+-2.0') -@@ -2091,7 +2105,7 @@ +@@ -1830,7 +1845,7 @@ def check(self): try: @@ -193,7 +173,7 @@ stderr=subprocess.STDOUT) return "version %s" % output.splitlines()[1].decode().split()[-1] except (IndexError, ValueError, subprocess.CalledProcessError): -@@ -2104,7 +2118,7 @@ +@@ -1843,7 +1858,7 @@ def check(self): try: @@ -202,7 +182,7 @@ command = 'gswin32c --version' try: output = check_output(command, shell=True, -@@ -2114,7 +2128,7 @@ +@@ -1853,7 +1868,7 @@ output = check_output(command, shell=True, stderr=subprocess.STDOUT) else: @@ -211,7 +191,7 @@ output = check_output(command, shell=True, stderr=subprocess.STDOUT) return "version %s" % output.decode()[:-1] -@@ -2128,7 +2142,7 @@ +@@ -1867,7 +1882,7 @@ def check(self): try: @@ -220,7 +200,7 @@ stderr=subprocess.STDOUT) line = output.splitlines()[0].decode() pattern = '(3\.1\d+)|(MiKTeX \d+.\d+)' -@@ -2144,7 +2158,7 @@ +@@ -1883,7 +1898,7 @@ def check(self): try: