diff --git a/mingw-w64-python-matplotlib/PKGBUILD b/mingw-w64-python-matplotlib/PKGBUILD index 4063169a73..6969f546bf 100644 --- a/mingw-w64-python-matplotlib/PKGBUILD +++ b/mingw-w64-python-matplotlib/PKGBUILD @@ -3,13 +3,17 @@ _realname=matplotlib pkgbase=mingw-w64-python-${_realname} pkgname=("${MINGW_PACKAGE_PREFIX}-python2-${_realname}" "${MINGW_PACKAGE_PREFIX}-python3-${_realname}") -pkgver=2.1.2 +pkgver=2.2.2 pkgrel=1 pkgdesc="A python plotting library, making publication quality plots (mingw-w64)" arch=('any') url='https://matplotlib.org/' license=('custom') makedepends=( + "${MINGW_PACKAGE_PREFIX}-python2" + "${MINGW_PACKAGE_PREFIX}-python3" + "${MINGW_PACKAGE_PREFIX}-python2-setuptools" + "${MINGW_PACKAGE_PREFIX}-python3-setuptools" "${MINGW_PACKAGE_PREFIX}-python2-pytz" "${MINGW_PACKAGE_PREFIX}-python3-pytz" "${MINGW_PACKAGE_PREFIX}-python2-numpy" @@ -24,6 +28,8 @@ makedepends=( "${MINGW_PACKAGE_PREFIX}-python3-pyparsing" "${MINGW_PACKAGE_PREFIX}-python2-cycler" "${MINGW_PACKAGE_PREFIX}-python3-cycler" + "${MINGW_PACKAGE_PREFIX}-python2-kiwisolver" + "${MINGW_PACKAGE_PREFIX}-python3-kiwisolver" "${MINGW_PACKAGE_PREFIX}-freetype" "${MINGW_PACKAGE_PREFIX}-libpng" #"${MINGW_PACKAGE_PREFIX}-qhull" @@ -31,8 +37,8 @@ makedepends=( source=("${_realname}-${pkgver}.tar.gz"::"https://github.com/matplotlib/matplotlib/archive/v${pkgver}.tar.gz" setupext.py.patch setup.py.patch) -sha256sums=('613d79282a0a8ba88cfc52dbcf1b08ab070dae395c3d313d141ccc3f87e3c9fa' - 'f5488304fe1be32c968b92e21881bf8e1fcac26620270c03c15a1583a6f46323' +sha256sums=('3a8236e6747dbb48c342ee194a8ced2805205cbd718899b284e4d617189cd397' + '7ecd678f2325486fc79998dd11f79a5c0e0284d3c4260678f47c4b24d0a3d893' '2ace7d4fe23ba9e96f2c81f827c8ea6bc65c532e6bd4eee3a655aae1ae6dab17') noextract=("${_realname}-${pkgver}.tar.gz") @@ -80,6 +86,7 @@ package_python3-matplotlib() { "${MINGW_PACKAGE_PREFIX}-python3-pyqt5" "${MINGW_PACKAGE_PREFIX}-python3-dateutil" "${MINGW_PACKAGE_PREFIX}-python3-pyparsing" + "${MINGW_PACKAGE_PREFIX}-python3-kiwisolver" "${MINGW_PACKAGE_PREFIX}-freetype" "${MINGW_PACKAGE_PREFIX}-libpng" #"${MINGW_PACKAGE_PREFIX}-qhull" @@ -102,6 +109,7 @@ package_python2-matplotlib() { "${MINGW_PACKAGE_PREFIX}-python2-pyqt5" "${MINGW_PACKAGE_PREFIX}-python2-dateutil" "${MINGW_PACKAGE_PREFIX}-python2-pyparsing" + "${MINGW_PACKAGE_PREFIX}-python2-kiwisolver" "${MINGW_PACKAGE_PREFIX}-freetype" "${MINGW_PACKAGE_PREFIX}-libpng" #"${MINGW_PACKAGE_PREFIX}-qhull" diff --git a/mingw-w64-python-matplotlib/setupext.py.patch b/mingw-w64-python-matplotlib/setupext.py.patch index a948d85f07..56ff9e6bc4 100644 --- a/mingw-w64-python-matplotlib/setupext.py.patch +++ b/mingw-w64-python-matplotlib/setupext.py.patch @@ -1,5 +1,5 @@ ---- matplotlib-2.1.2/setupext.py.orig 2018-01-18 07:21:34.000000000 +0300 -+++ matplotlib-2.1.2/setupext.py 2018-01-25 08:37:44.104394400 +0300 +--- 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 @@ PY3min = (sys.version_info[0] >= 3) @@ -7,11 +7,11 @@ +MSYS = "MSYSTEM" in os.environ + - def _get_home(): - """Find user's home directory if possible. -@@ -70,9 +72,17 @@ - # md5 hash of the freetype tarball - LOCAL_FREETYPE_HASH = '348e667d728c597360e4a87c16556597' + def _get_xdg_cache_dir(): + """ +@@ -56,9 +58,17 @@ + LOCAL_FREETYPE_VERSION = '2.6.1' + LOCAL_FREETYPE_HASH = _freetype_hashes.get(LOCAL_FREETYPE_VERSION, 'unknown') -if sys.platform != 'win32': +if sys.platform != 'win32' or MSYS: @@ -28,19 +28,20 @@ else: from subprocess import getstatusoutput -@@ -150,9 +160,10 @@ +@@ -136,10 +146,11 @@ Returns `True` if `filename` can be found in one of the directories in `include_dirs`. """ - if sys.platform == 'win32': + if sys.platform == 'win32' and not MSYS: - include_dirs += os.environ.get('INCLUDE', '.').split(';') + include_dirs = list(include_dirs) # copy before modify + include_dirs += os.environ.get('INCLUDE', '.').split(os.pathsep) for dir in include_dirs: + dir = os.popen(' '.join(['cygpath', '-w', dir])).readline().strip() if os.path.exists(os.path.join(dir, filename)): return True return False -@@ -275,6 +286,7 @@ +@@ -266,6 +277,7 @@ """ ext = DelayedExtension(name, files, *args, **kwargs) for dir in get_base_dirs(): @@ -48,7 +49,7 @@ include_dir = os.path.join(dir, 'include') if os.path.exists(include_dir): ext.include_dirs.append(include_dir) -@@ -310,7 +322,7 @@ +@@ -301,7 +313,7 @@ """ Determines whether pkg-config exists on this machine. """ @@ -57,7 +58,7 @@ self.has_pkgconfig = False else: try: -@@ -319,7 +331,7 @@ +@@ -310,7 +322,7 @@ self.pkg_config = 'pkg-config' self.set_pkgconfig_path() @@ -66,7 +67,7 @@ self.has_pkgconfig = (status == 0) if not self.has_pkgconfig: print("IMPORTANT WARNING:") -@@ -360,7 +372,7 @@ +@@ -351,7 +363,7 @@ command = "{0} --libs --cflags ".format(executable) try: @@ -75,7 +76,7 @@ stderr=subprocess.STDOUT) except subprocess.CalledProcessError: pass -@@ -370,11 +382,16 @@ +@@ -361,11 +373,16 @@ for token in output.split(): attr = flag_map.get(token[:2]) if attr is not None: @@ -93,7 +94,7 @@ for include in default_include_dirs: dir = os.path.join(base, include) if os.path.exists(dir): -@@ -396,7 +413,7 @@ +@@ -387,7 +404,7 @@ return None status, output = getstatusoutput( @@ -102,7 +103,7 @@ if status == 0: return output return None -@@ -1042,14 +1059,14 @@ +@@ -1039,14 +1056,14 @@ if options.get('local_freetype'): return "Using local version for testing" @@ -119,7 +120,7 @@ if status == 0: version = output else: -@@ -1074,6 +1091,8 @@ +@@ -1071,6 +1088,8 @@ return version # Return the first version found in the include dirs. for include_dir in ext.include_dirs: @@ -128,7 +129,7 @@ header_fname = os.path.join(include_dir, 'freetype.h') if os.path.exists(header_fname): major, minor, patch = 0, 0, 0 -@@ -1284,11 +1303,11 @@ +@@ -1281,11 +1300,11 @@ } def check(self): @@ -142,7 +143,7 @@ if status == 0: version = output else: -@@ -1708,7 +1727,7 @@ +@@ -1543,7 +1562,7 @@ return ext def add_flags(self, ext): @@ -151,7 +152,7 @@ def getoutput(s): ret = os.popen(s).read().strip() return ret -@@ -1763,7 +1782,7 @@ +@@ -1598,7 +1617,7 @@ 'm' in ext.libraries): ext.libraries.remove('m') @@ -160,7 +161,7 @@ pkg_config.setup_extension(ext, 'pygtk-2.0') pkg_config.setup_extension(ext, 'gtk+-2.0') -@@ -2182,7 +2201,7 @@ +@@ -2013,7 +2032,7 @@ def check(self): try: @@ -169,7 +170,7 @@ stderr=subprocess.STDOUT) return "version %s" % output.splitlines()[1].decode().split()[-1] except (IndexError, ValueError, subprocess.CalledProcessError): -@@ -2194,14 +2213,14 @@ +@@ -2025,14 +2044,14 @@ optional = True def check(self): @@ -186,7 +187,7 @@ output = check_output(command, shell=True, stderr=subprocess.STDOUT) return "version %s" % output.decode()[:-1] -@@ -2217,7 +2236,7 @@ +@@ -2048,7 +2067,7 @@ def check(self): try: @@ -195,7 +196,7 @@ stderr=subprocess.STDOUT) line = output.splitlines()[0].decode() pattern = '(3\.1\d+)|(MiKTeX \d+.\d+)' -@@ -2233,7 +2252,7 @@ +@@ -2064,7 +2083,7 @@ def check(self): try: