matplotlib: Update to 1.4.1

This commit is contained in:
Alexpux
2014-10-19 17:30:49 +04:00
parent 58530b2b5a
commit afbcca941a
2 changed files with 46 additions and 48 deletions

View File

@@ -1,5 +1,5 @@
--- old/setupext.py 2014-08-26 04:24:27.000000000 +0200
+++ new/setupext.py 2014-09-19 11:33:06.714884200 +0200
--- 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 @@
@@ -28,24 +28,19 @@
else:
from subprocess import getstatusoutput
@@ -121,6 +128,7 @@
@@ -120,9 +127,10 @@
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(';')
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
@@ -130,7 +138,7 @@
"""
Raises an exception if the given include file can not be found.
"""
- if sys.platform == 'win32':
+ if sys.platform == 'win32' and not MSYS:
include_dirs.extend(os.getenv('INCLUDE', '.').split(';'))
if not has_include_file(include_dirs, filename):
raise CheckFailed(
@@ -220,6 +229,7 @@
@@ -227,6 +235,7 @@
"""
ext = DelayedExtension(name, files, *args, **kwargs)
for dir in get_base_dirs():
@@ -53,7 +48,7 @@
include_dir = os.path.join(dir, 'include')
if os.path.exists(include_dir):
ext.include_dirs.append(include_dir)
@@ -228,7 +238,6 @@
@@ -235,7 +244,6 @@
if os.path.exists(lib_dir):
ext.library_dirs.append(lib_dir)
ext.include_dirs.append('.')
@@ -61,7 +56,7 @@
return ext
@@ -240,11 +249,11 @@
@@ -247,11 +255,11 @@
"""
Determines whether pkg-config exists on this machine.
"""
@@ -73,9 +68,9 @@
- status, output = getstatusoutput("pkg-config --help")
+ status, output = getstatusoutput('sh -c "pkg-config --help"')
self.has_pkgconfig = (status == 0)
def set_pkgconfig_path(self):
@@ -280,7 +289,7 @@
if not self.has_pkgconfig:
print("IMPORTANT WARNING:")
@@ -292,7 +300,7 @@
command = "{0} --libs --cflags ".format(executable)
try:
@@ -84,7 +79,7 @@
stderr=subprocess.STDOUT)
except subprocess.CalledProcessError:
pass
@@ -290,11 +299,16 @@
@@ -302,11 +310,16 @@
for token in output.split():
attr = flag_map.get(token[:2])
if attr is not None:
@@ -103,7 +98,7 @@
for include in default_include_dirs:
dir = os.path.join(base, include)
if os.path.exists(dir):
@@ -316,7 +330,7 @@
@@ -328,7 +341,7 @@
return None
status, output = getstatusoutput(
@@ -112,32 +107,21 @@
if status == 0:
return output
return None
@@ -926,20 +938,20 @@
@@ -941,11 +954,11 @@
name = "freetype"
def check(self):
- if sys.platform == 'win32':
+ if sys.platform == 'win32' and not MSYS:
return "Unknown version"
check_include_file(get_include_dirs(), 'ft2build.h', 'freetype')
return 'Using unknown version found on system.'
- status, output = getstatusoutput("freetype-config --ftversion")
+ status, output = getstatusoutput('sh -c "freetype-config --ftversion"')
if status == 0:
version = output
else:
version = None
-
+
# Early versions of freetype grep badly inside freetype-config,
# so catch those cases. (tested with 2.5.3).
if 'No such file or directory\ngrep:' in version:
version = self.version_from_header()
-
+
return self._check_for_pkg_config(
'freetype2', 'ft2build.h',
min_version='2.4', version=version)
@@ -951,6 +963,7 @@
@@ -967,6 +980,7 @@
return version
# Return the first version found in the include dirs.
for include_dir in ext.include_dirs:
@@ -145,7 +129,21 @@
header_fname = os.path.join(include_dir, 'freetype.h')
if os.path.exists(header_fname):
major, minor, patch = 0, 0, 0
@@ -1411,7 +1424,7 @@
@@ -1014,11 +1028,11 @@
name = "png"
def check(self):
- if sys.platform == 'win32':
+ if sys.platform == 'win32' and not MSYS:
check_include_file(get_include_dirs(), 'png.h', 'png')
return 'Using unknown version found on system.'
- status, output = getstatusoutput("libpng-config --version")
+ status, output = getstatusoutput('sh -c "libpng-config --version"')
if status == 0:
version = output
else:
@@ -1452,7 +1466,7 @@
p = subprocess.Popen(
'. %s ; eval echo ${%s}' % (file, varname),
shell=True,
@@ -154,7 +152,7 @@
stdout=subprocess.PIPE)
result = p.communicate()[0]
return result.decode('ascii')
@@ -1483,7 +1496,7 @@
@@ -1524,7 +1538,7 @@
return tcl_lib, tcl_inc, 'tcl', tk_lib, tk_inc, 'tk'
def add_flags(self, ext):
@@ -163,7 +161,7 @@
major, minor1, minor2, s, tmp = sys.version_info
if sys.version_info[0:2] < (3, 4):
ext.include_dirs.extend(['win32_static/include/tcl85'])
@@ -1619,7 +1632,7 @@
@@ -1660,7 +1674,7 @@
return ext
def add_flags(self, ext):
@@ -172,7 +170,7 @@
def getoutput(s):
ret = os.popen(s).read().strip()
return ret
@@ -1674,7 +1687,7 @@
@@ -1715,7 +1729,7 @@
'm' in ext.libraries):
ext.libraries.remove('m')
@@ -181,7 +179,7 @@
pkg_config.setup_extension(ext, 'pygtk-2.0')
pkg_config.setup_extension(ext, 'gtk+-2.0')
@@ -2050,7 +2063,7 @@
@@ -2091,7 +2105,7 @@
def check(self):
try:
@@ -190,7 +188,7 @@
stderr=subprocess.STDOUT)
return "version %s" % output.splitlines()[1].decode().split()[-1]
except (IndexError, ValueError, subprocess.CalledProcessError):
@@ -2063,7 +2076,7 @@
@@ -2104,7 +2118,7 @@
def check(self):
try:
@@ -199,7 +197,7 @@
command = 'gswin32c --version'
try:
output = check_output(command, shell=True,
@@ -2073,7 +2086,7 @@
@@ -2114,7 +2128,7 @@
output = check_output(command, shell=True,
stderr=subprocess.STDOUT)
else:
@@ -208,7 +206,7 @@
output = check_output(command, shell=True,
stderr=subprocess.STDOUT)
return "version %s" % output.decode()[:-1]
@@ -2087,7 +2100,7 @@
@@ -2128,7 +2142,7 @@
def check(self):
try:
@@ -217,7 +215,7 @@
stderr=subprocess.STDOUT)
line = output.splitlines()[0].decode()
pattern = '(3\.1\d+)|(MiKTeX \d+.\d+)'
@@ -2103,7 +2116,7 @@
@@ -2144,7 +2158,7 @@
def check(self):
try: