diff options
author | Federico Beffa <beffa@fbengineering.ch> | 2015-12-01 17:20:59 +0100 |
---|---|---|
committer | Federico Beffa <beffa@fbengineering.ch> | 2015-12-02 18:21:13 +0100 |
commit | 1bbc659fd2012fbe33b53783c838e84833c74496 (patch) | |
tree | 5aa4bf06346567a9e6b7e39f7d0ca961c016ca8c /gnu/packages/patches | |
parent | 214ed6a39b05069b47a8d13a9f2c7f4243dddb40 (diff) | |
download | guix-1bbc659fd2012fbe33b53783c838e84833c74496.tar.gz |
gnu: python-matplotlib: Add 'TkAgg' backend and update to version '1.4.3'.
* gnu/packages/python.scm (python-matplotlib, python2-matplotlib): Do it. * gnu/packages/patches/matplotlib-setupext-tk.patch: New file. * gnu-system.am (dist_patch_DATA): Add the new patch.
Diffstat (limited to 'gnu/packages/patches')
-rw-r--r-- | gnu/packages/patches/matplotlib-setupext-tk.patch | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/gnu/packages/patches/matplotlib-setupext-tk.patch b/gnu/packages/patches/matplotlib-setupext-tk.patch new file mode 100644 index 0000000000..37c3d686e0 --- /dev/null +++ b/gnu/packages/patches/matplotlib-setupext-tk.patch @@ -0,0 +1,34 @@ +Use 'pkg-config' instead of heuristics to find 'tk' flags. + +--- matplotlib-1.4.3/setupext.py.orig 2015-12-01 14:21:19.554417453 +0100 ++++ matplotlib-1.4.3/setupext.py 2015-12-02 10:39:47.282363530 +0100 +@@ -1457,7 +1457,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') +@@ -1601,8 +1601,19 @@ + # of distros. + + # Query Tcl/Tk system for library paths and version string ++ def getoutput(s): ++ ret = os.popen(s).read().strip() ++ return ret + try: +- tcl_lib_dir, tk_lib_dir, tk_ver = self.query_tcltk() ++ pkg_config_libs = getoutput('pkg-config --libs-only-L tk').split() ++ # drop '-L' part of strings ++ pkg_config_libs = [s[2:] for s in pkg_config_libs] ++ pkg_config_ver = getoutput('pkg-config --modversion tk') ++ tk_ver = re.match(r"(\d+.\d+)[\d.]*", pkg_config_ver).group(1) ++ tcl_lib_dir = next(s for s in pkg_config_libs ++ if re.match(r".*-tcl-.*", s)) + '/tcl' + tk_ver ++ tk_lib_dir = next(s for s in pkg_config_libs ++ if re.match(r".*-tk-.*", s)) + '/tk' + tk_ver + except: + tk_ver = '' + result = self.hardcoded_tcl_config() |