diff --git a/mingw-w64-python2-matplotlib/setupext.py.patch b/mingw-w64-python2-matplotlib/setupext.py.patch index 56ff9e6bc4..bca656bd00 100644 --- a/mingw-w64-python2-matplotlib/setupext.py.patch +++ b/mingw-w64-python2-matplotlib/setupext.py.patch @@ -1,6 +1,6 @@ ---- matplotlib-2.1.2/setupext.py.orig 2018-03-17 03:56:24.000000000 +0100 -+++ matplotlib-2.1.2/setupext.py 2018-05-26 16:33:06.183466400 +0200 -@@ -22,6 +22,8 @@ +--- matplotlib-2.2.4/setupext.py.orig 2019-02-26 05:07:47.000000000 +0300 ++++ matplotlib-2.2.4/setupext.py 2019-02-28 11:16:25.082326600 +0300 +@@ -57,6 +57,8 @@ PY3min = (sys.version_info[0] >= 3) @@ -9,7 +9,7 @@ def _get_xdg_cache_dir(): """ -@@ -56,9 +58,17 @@ +@@ -186,9 +188,17 @@ LOCAL_FREETYPE_VERSION = '2.6.1' LOCAL_FREETYPE_HASH = _freetype_hashes.get(LOCAL_FREETYPE_VERSION, 'unknown') @@ -28,7 +28,7 @@ else: from subprocess import getstatusoutput -@@ -136,10 +146,11 @@ +@@ -266,10 +276,11 @@ Returns `True` if `filename` can be found in one of the directories in `include_dirs`. """ @@ -41,7 +41,7 @@ if os.path.exists(os.path.join(dir, filename)): return True return False -@@ -266,6 +277,7 @@ +@@ -396,6 +407,7 @@ """ ext = DelayedExtension(name, files, *args, **kwargs) for dir in get_base_dirs(): @@ -49,7 +49,7 @@ include_dir = os.path.join(dir, 'include') if os.path.exists(include_dir): ext.include_dirs.append(include_dir) -@@ -301,7 +313,7 @@ +@@ -427,7 +439,7 @@ """ Determines whether pkg-config exists on this machine. """ @@ -58,7 +58,7 @@ self.has_pkgconfig = False else: try: -@@ -310,7 +322,7 @@ +@@ -436,7 +448,7 @@ self.pkg_config = 'pkg-config' self.set_pkgconfig_path() @@ -67,7 +67,7 @@ self.has_pkgconfig = (status == 0) if not self.has_pkgconfig: print("IMPORTANT WARNING:") -@@ -351,7 +363,7 @@ +@@ -477,7 +489,7 @@ command = "{0} --libs --cflags ".format(executable) try: @@ -76,7 +76,7 @@ stderr=subprocess.STDOUT) except subprocess.CalledProcessError: pass -@@ -361,11 +373,16 @@ +@@ -487,11 +499,16 @@ for token in output.split(): attr = flag_map.get(token[:2]) if attr is not None: @@ -94,7 +94,7 @@ for include in default_include_dirs: dir = os.path.join(base, include) if os.path.exists(dir): -@@ -387,7 +404,7 @@ +@@ -513,7 +530,7 @@ return None status, output = getstatusoutput( @@ -103,7 +103,7 @@ if status == 0: return output return None -@@ -1039,14 +1056,14 @@ +@@ -1165,14 +1182,14 @@ if options.get('local_freetype'): return "Using local version for testing" @@ -112,7 +112,7 @@ try: check_include_file(get_include_dirs(), 'ft2build.h', 'freetype') except CheckFailed: - check_include_file(get_include_dirs(), 'freetype2\\ft2build.h', 'freetype') + check_include_file(get_include_dirs(), os.path.join('freetype2', 'ft2build.h'), 'freetype') return 'Using unknown version found on system.' - status, output = getstatusoutput("freetype-config --ftversion") @@ -120,7 +120,7 @@ if status == 0: version = output else: -@@ -1071,6 +1088,8 @@ +@@ -1197,6 +1214,8 @@ return version # Return the first version found in the include dirs. for include_dir in ext.include_dirs: @@ -129,7 +129,7 @@ header_fname = os.path.join(include_dir, 'freetype.h') if os.path.exists(header_fname): major, minor, patch = 0, 0, 0 -@@ -1281,11 +1300,11 @@ +@@ -1369,11 +1388,11 @@ } def check(self): @@ -143,7 +143,7 @@ if status == 0: version = output else: -@@ -1543,7 +1562,7 @@ +@@ -1631,7 +1650,7 @@ return ext def add_flags(self, ext): @@ -152,7 +152,7 @@ def getoutput(s): ret = os.popen(s).read().strip() return ret -@@ -1598,7 +1617,7 @@ +@@ -1686,7 +1705,7 @@ 'm' in ext.libraries): ext.libraries.remove('m') @@ -161,7 +161,7 @@ pkg_config.setup_extension(ext, 'pygtk-2.0') pkg_config.setup_extension(ext, 'gtk+-2.0') -@@ -2013,7 +2032,7 @@ +@@ -2101,7 +2120,7 @@ def check(self): try: @@ -170,7 +170,7 @@ stderr=subprocess.STDOUT) return "version %s" % output.splitlines()[1].decode().split()[-1] except (IndexError, ValueError, subprocess.CalledProcessError): -@@ -2025,14 +2044,14 @@ +@@ -2113,14 +2132,14 @@ optional = True def check(self): @@ -187,7 +187,7 @@ output = check_output(command, shell=True, stderr=subprocess.STDOUT) return "version %s" % output.decode()[:-1] -@@ -2048,7 +2067,7 @@ +@@ -2136,7 +2155,7 @@ def check(self): try: @@ -195,8 +195,8 @@ + output = check_output('sh -c "latex -version"', shell=True, stderr=subprocess.STDOUT) line = output.splitlines()[0].decode() - pattern = '(3\.1\d+)|(MiKTeX \d+.\d+)' -@@ -2064,7 +2083,7 @@ + pattern = r'(3\.1\d+)|(MiKTeX \d+.\d+)' +@@ -2152,7 +2171,7 @@ def check(self): try: