|
1 | 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 |
6 | | -+++ matplotlib-1.1.0/setupext.py |
7 | | -@@ -122,8 +122,8 @@ numpy_inc_dirs = [] |
8 | | - # matplotlib build options, which can be altered using setup.cfg |
9 | | - options = {'display_status': True, |
10 | | - 'verbose': False, |
11 | | -- 'provide_pytz': 'auto', |
12 | | -- 'provide_dateutil': 'auto', |
13 | | -+ 'provide_pytz': False, |
14 | | -+ 'provide_dateutil': False, |
15 | | - 'build_agg': True, |
16 | | - 'build_gtk': 'auto', |
17 | | - 'build_gtkagg': 'auto', |
18 | | -@@ -176,10 +176,7 @@ if os.path.exists(setup_cfg): |
19 | | - except: pass |
| 5 | +--- matplotlib-2.0.2.orig/setupext.py |
| 6 | ++++ matplotlib-2.0.2/setupext.py |
| 7 | +@@ -148,6 +148,7 @@ def has_include_file(include_dirs, filen |
| 8 | + Returns `True` if `filename` can be found in one of the |
| 9 | + directories in `include_dirs`. |
| 10 | + """ |
| 11 | ++ return True |
| 12 | + if sys.platform == 'win32': |
| 13 | + include_dirs += os.environ.get('INCLUDE', '.').split(';') |
| 14 | + for dir in include_dirs: |
| 15 | +@@ -172,7 +173,7 @@ def get_base_dirs(): |
| 16 | + Returns a list of standard base directories on this platform. |
| 17 | + """ |
| 18 | + if options['basedirlist']: |
| 19 | +- return options['basedirlist'] |
| 20 | ++ return [os.environ['STAGING_LIBDIR']] |
20 | 21 |
|
21 | | - # For get_base_flags: |
22 | | --if options['basedirlist']: |
23 | | -- basedirlist = options['basedirlist'].split() |
24 | | --else: |
25 | | -- basedirlist = basedir[sys.platform] |
26 | | -+basedirlist = [os.environ['STAGING_LIBDIR']] |
27 | | - print("basedirlist is: %s" % basedirlist) |
| 22 | + basedir_map = { |
| 23 | + 'win32': ['win32_static', ], |
| 24 | +@@ -260,14 +261,6 @@ def make_extension(name, files, *args, * |
| 25 | + `distutils.core.Extension` constructor. |
| 26 | + """ |
| 27 | + ext = DelayedExtension(name, files, *args, **kwargs) |
| 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']: |
30 | | -@@ -555,8 +552,8 @@ def check_for_numpy(): |
| 38 | + return ext |
| 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): |
33 | | - "Add the modules flags to build extensions which use numpy" |
34 | | -- import numpy |
35 | | -- module.include_dirs.append(numpy.get_include()) |
36 | | -+ # Hard-coded path for OE since I know this is where numpy's include dir will be |
37 | | -+ module.include_dirs.append(os.path.join(os.environ['STAGING_LIBDIR'], 'python2.7/site-packages/numpy/core/include/')) |
| 42 | + def set_pkgconfig_path(self): |
| 43 | ++ return |
| 44 | + pkgconfig_path = sysconfig.get_config_var('LIBDIR') |
| 45 | + if pkgconfig_path is None: |
| 46 | + return |
| 47 | +@@ -875,14 +869,14 @@ class Numpy(SetupPackage): |
| 48 | + reload(numpy) |
38 | 49 |
|
39 | | - def add_png_flags(module): |
40 | | - try_pkgconfig(module, 'libpng', 'png') |
| 50 | + ext = Extension('test', []) |
| 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', |
0 commit comments