diff options
| author | Khem Raj <raj.khem@gmail.com> | 2017-09-01 15:27:20 -0700 |
|---|---|---|
| committer | Martin Jansa <Martin.Jansa@gmail.com> | 2017-09-07 10:57:37 +0200 |
| commit | 10c8c39c25d902ab5268fa48ac2bc0e42e65b179 (patch) | |
| tree | 26d4745bdeebd5a1734885d777f28b23f6e33713 /meta-python/recipes-devtools/python/python-matplotlib/fix_setupext.patch | |
| parent | 59cbb1d54d62a3a078a126e05310bb1cfa28922a (diff) | |
| download | meta-openembedded-10c8c39c25d902ab5268fa48ac2bc0e42e65b179.tar.gz | |
python-matplotlib: Upgrade to 2.0.2
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Diffstat (limited to 'meta-python/recipes-devtools/python/python-matplotlib/fix_setupext.patch')
| -rw-r--r-- | meta-python/recipes-devtools/python/python-matplotlib/fix_setupext.patch | 136 |
1 files changed, 103 insertions, 33 deletions
diff --git a/meta-python/recipes-devtools/python/python-matplotlib/fix_setupext.patch b/meta-python/recipes-devtools/python/python-matplotlib/fix_setupext.patch index 9a13a1850f..21b9094a14 100644 --- a/meta-python/recipes-devtools/python/python-matplotlib/fix_setupext.patch +++ b/meta-python/recipes-devtools/python/python-matplotlib/fix_setupext.patch | |||
| @@ -1,40 +1,110 @@ | |||
| 1 | This fixes the numpy import problem in setupext.py using a hard-coded path. | 1 | This fixes the numpy import problem in setupext.py using a hard-coded path. |
| 2 | 2 | ||
| 3 | Index: matplotlib-1.1.0/setupext.py | 3 | Index: matplotlib-2.0.2/setupext.py |
| 4 | =================================================================== | 4 | =================================================================== |
| 5 | --- matplotlib-1.1.0.orig/setupext.py | 5 | --- matplotlib-2.0.2.orig/setupext.py |
| 6 | +++ matplotlib-1.1.0/setupext.py | 6 | +++ matplotlib-2.0.2/setupext.py |
| 7 | @@ -122,8 +122,8 @@ numpy_inc_dirs = [] | 7 | @@ -148,6 +148,7 @@ def has_include_file(include_dirs, filen |
| 8 | # matplotlib build options, which can be altered using setup.cfg | 8 | Returns `True` if `filename` can be found in one of the |
| 9 | options = {'display_status': True, | 9 | directories in `include_dirs`. |
| 10 | 'verbose': False, | 10 | """ |
| 11 | - 'provide_pytz': 'auto', | 11 | + return True |
| 12 | - 'provide_dateutil': 'auto', | 12 | if sys.platform == 'win32': |
| 13 | + 'provide_pytz': False, | 13 | include_dirs += os.environ.get('INCLUDE', '.').split(';') |
| 14 | + 'provide_dateutil': False, | 14 | for dir in include_dirs: |
| 15 | 'build_agg': True, | 15 | @@ -172,7 +173,7 @@ def get_base_dirs(): |
| 16 | 'build_gtk': 'auto', | 16 | Returns a list of standard base directories on this platform. |
| 17 | 'build_gtkagg': 'auto', | 17 | """ |
| 18 | @@ -176,10 +176,7 @@ if os.path.exists(setup_cfg): | 18 | if options['basedirlist']: |
| 19 | except: pass | 19 | - return options['basedirlist'] |
| 20 | + return [os.environ['STAGING_LIBDIR']] | ||
| 20 | 21 | ||
| 21 | # For get_base_flags: | 22 | basedir_map = { |
| 22 | -if options['basedirlist']: | 23 | 'win32': ['win32_static', ], |
| 23 | - basedirlist = options['basedirlist'].split() | 24 | @@ -260,14 +261,6 @@ def make_extension(name, files, *args, * |
| 24 | -else: | 25 | `distutils.core.Extension` constructor. |
| 25 | - basedirlist = basedir[sys.platform] | 26 | """ |
| 26 | +basedirlist = [os.environ['STAGING_LIBDIR']] | 27 | ext = DelayedExtension(name, files, *args, **kwargs) |
| 27 | print("basedirlist is: %s" % basedirlist) | 28 | - for dir in get_base_dirs(): |
| 29 | - include_dir = os.path.join(dir, 'include') | ||
| 30 | - if os.path.exists(include_dir): | ||
| 31 | - ext.include_dirs.append(include_dir) | ||
| 32 | - for lib in ('lib', 'lib64'): | ||
| 33 | - lib_dir = os.path.join(dir, lib) | ||
| 34 | - if os.path.exists(lib_dir): | ||
| 35 | - ext.library_dirs.append(lib_dir) | ||
| 36 | ext.include_dirs.append('.') | ||
| 28 | 37 | ||
| 29 | if options['display_status']: | 38 | return ext |
| 30 | @@ -555,8 +552,8 @@ def check_for_numpy(): | 39 | @@ -314,6 +307,7 @@ class PkgConfig(object): |
| 40 | " matplotlib may not be able to find some of its dependencies") | ||
| 31 | 41 | ||
| 32 | def add_numpy_flags(module): | 42 | def set_pkgconfig_path(self): |
| 33 | "Add the modules flags to build extensions which use numpy" | 43 | + return |
| 34 | - import numpy | 44 | pkgconfig_path = sysconfig.get_config_var('LIBDIR') |
| 35 | - module.include_dirs.append(numpy.get_include()) | 45 | if pkgconfig_path is None: |
| 36 | + # Hard-coded path for OE since I know this is where numpy's include dir will be | 46 | return |
| 37 | + module.include_dirs.append(os.path.join(os.environ['STAGING_LIBDIR'], 'python2.7/site-packages/numpy/core/include/')) | 47 | @@ -875,14 +869,14 @@ class Numpy(SetupPackage): |
| 48 | reload(numpy) | ||
| 38 | 49 | ||
| 39 | def add_png_flags(module): | 50 | ext = Extension('test', []) |
| 40 | try_pkgconfig(module, 'libpng', 'png') | 51 | - ext.include_dirs.append(numpy.get_include()) |
| 52 | + ext.include_dirs.append(os.path.join(os.environ['STAGING_LIBDIR'], 'python2.7/site-packages/numpy/core/include/')) | ||
| 53 | if not has_include_file( | ||
| 54 | ext.include_dirs, os.path.join("numpy", "arrayobject.h")): | ||
| 55 | warnings.warn( | ||
| 56 | "The C headers for numpy could not be found. " | ||
| 57 | "You may need to install the development package") | ||
| 58 | |||
| 59 | - return [numpy.get_include()] | ||
| 60 | + return [os.path.join(os.environ['STAGING_LIBDIR'], 'python2.7/site-packages/numpy/core/include/')] | ||
| 61 | |||
| 62 | def check(self): | ||
| 63 | min_version = extract_versions()['__version__numpy__'] | ||
| 64 | Index: matplotlib-2.0.2/setup.py | ||
| 65 | =================================================================== | ||
| 66 | --- matplotlib-2.0.2.orig/setup.py | ||
| 67 | +++ matplotlib-2.0.2/setup.py | ||
| 68 | @@ -66,28 +66,6 @@ mpl_packages = [ | ||
| 69 | setupext.Python(), | ||
| 70 | setupext.Platform(), | ||
| 71 | 'Required dependencies and extensions', | ||
| 72 | - setupext.Numpy(), | ||
| 73 | - setupext.Six(), | ||
| 74 | - setupext.Dateutil(), | ||
| 75 | - setupext.FuncTools32(), | ||
| 76 | - setupext.Subprocess32(), | ||
| 77 | - setupext.Pytz(), | ||
| 78 | - setupext.Cycler(), | ||
| 79 | - setupext.Tornado(), | ||
| 80 | - setupext.Pyparsing(), | ||
| 81 | - setupext.LibAgg(), | ||
| 82 | - setupext.FreeType(), | ||
| 83 | - setupext.FT2Font(), | ||
| 84 | - setupext.Png(), | ||
| 85 | - setupext.Qhull(), | ||
| 86 | - setupext.Image(), | ||
| 87 | - setupext.TTConv(), | ||
| 88 | - setupext.Path(), | ||
| 89 | - setupext.ContourLegacy(), | ||
| 90 | - setupext.Contour(), | ||
| 91 | - setupext.Delaunay(), | ||
| 92 | - setupext.QhullWrap(), | ||
| 93 | - setupext.Tri(), | ||
| 94 | 'Optional subpackages', | ||
| 95 | setupext.SampleData(), | ||
| 96 | setupext.Toolkits(), | ||
| 97 | @@ -100,13 +78,8 @@ mpl_packages = [ | ||
| 98 | setupext.BackendMacOSX(), | ||
| 99 | setupext.BackendQt5(), | ||
| 100 | setupext.BackendQt4(), | ||
| 101 | - setupext.BackendGtk3Agg(), | ||
| 102 | setupext.BackendGtk3Cairo(), | ||
| 103 | - setupext.BackendGtkAgg(), | ||
| 104 | - setupext.BackendTkAgg(), | ||
| 105 | - setupext.BackendWxAgg(), | ||
| 106 | setupext.BackendGtk(), | ||
| 107 | - setupext.BackendAgg(), | ||
| 108 | setupext.BackendCairo(), | ||
| 109 | setupext.Windowing(), | ||
| 110 | 'Optional LaTeX dependencies', | ||
