meta-ros/recipes-devtools/python/python-matplotlib/fix_setupext.patch

110 lines
4.0 KiB
Diff
Raw Normal View History

This fixes the numpy import problem in setupext.py using a hard-coded path.
Index: matplotlib-2.1.1/setupext.py
===================================================================
--- matplotlib-2.1.1.orig/setupext.py 2018-01-17 20:21:34.000000000 -0800
+++ matplotlib-2.1.1/setupext.py 2019-04-24 16:08:56.634978457 -0700
@@ -150,6 +150,7 @@ def has_include_file(include_dirs, filen
Returns `True` if `filename` can be found in one of the
directories in `include_dirs`.
"""
+ return True
if sys.platform == 'win32':
include_dirs += os.environ.get('INCLUDE', '.').split(';')
for dir in include_dirs:
@@ -174,7 +175,7 @@ def get_base_dirs():
Returns a list of standard base directories on this platform.
"""
if options['basedirlist']:
- return options['basedirlist']
+ return [os.environ['STAGING_LIBDIR']]
if os.environ.get('MPLBASEDIRLIST'):
return os.environ.get('MPLBASEDIRLIST').split(os.pathsep)
@@ -274,14 +275,6 @@ def make_extension(name, files, *args, *
`distutils.core.Extension` constructor.
"""
ext = DelayedExtension(name, files, *args, **kwargs)
- for dir in get_base_dirs():
- include_dir = os.path.join(dir, 'include')
- if os.path.exists(include_dir):
- ext.include_dirs.append(include_dir)
- for lib in ('lib', 'lib64'):
- lib_dir = os.path.join(dir, lib)
- if os.path.exists(lib_dir):
- ext.library_dirs.append(lib_dir)
ext.include_dirs.append('.')
return ext
@@ -328,6 +321,7 @@ class PkgConfig(object):
" matplotlib may not be able to find some of its dependencies")
def set_pkgconfig_path(self):
+ return
pkgconfig_path = sysconfig.get_config_var('LIBDIR')
if pkgconfig_path is None:
return
@@ -875,14 +869,14 @@ class Numpy(SetupPackage):
reload(numpy)
ext = Extension('test', [])
- ext.include_dirs.append(numpy.get_include())
+ ext.include_dirs.append(os.path.join(os.environ['STAGING_LIBDIR'], 'python2.7/site-packages/numpy/core/include/'))
if not has_include_file(
ext.include_dirs, os.path.join("numpy", "arrayobject.h")):
warnings.warn(
"The C headers for numpy could not be found. "
"You may need to install the development package")
- return [numpy.get_include()]
+ return [os.path.join(os.environ['STAGING_LIBDIR'], 'python2.7/site-packages/numpy/core/include/')]
def check(self):
min_version = extract_versions()['__version__numpy__']
Index: matplotlib-2.1.1/setup.py
===================================================================
--- matplotlib-2.1.1.orig/setup.py 2018-01-17 20:21:34.000000000 -0800
+++ matplotlib-2.1.1/setup.py 2019-04-24 16:01:42.474978457 -0700
@@ -66,27 +66,6 @@ mpl_packages = [
setupext.Python(),
setupext.Platform(),
'Required dependencies and extensions',
- setupext.Numpy(),
- setupext.Six(),
- setupext.Dateutil(),
- setupext.BackportsFuncToolsLRUCache(),
- setupext.Subprocess32(),
- setupext.Pytz(),
- setupext.Cycler(),
- setupext.Tornado(),
- setupext.Pyparsing(),
- setupext.LibAgg(),
- setupext.FreeType(),
- setupext.FT2Font(),
- setupext.Png(),
- setupext.Qhull(),
- setupext.Image(),
- setupext.TTConv(),
- setupext.Path(),
- setupext.ContourLegacy(),
- setupext.Contour(),
- setupext.QhullWrap(),
- setupext.Tri(),
'Optional subpackages',
setupext.SampleData(),
setupext.Toolkits(),
@@ -99,13 +78,8 @@ mpl_packages = [
setupext.BackendMacOSX(),
setupext.BackendQt5(),
setupext.BackendQt4(),
- setupext.BackendGtk3Agg(),
setupext.BackendGtk3Cairo(),
- setupext.BackendGtkAgg(),
- setupext.BackendTkAgg(),
- setupext.BackendWxAgg(),
setupext.BackendGtk(),
- setupext.BackendAgg(),
setupext.BackendCairo(),
setupext.Windowing(),
'Optional LaTeX dependencies',