summaryrefslogtreecommitdiffstats
path: root/meta-python/recipes-devtools/python
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2017-09-01 15:27:20 -0700
committerMartin Jansa <Martin.Jansa@gmail.com>2017-09-07 10:57:37 +0200
commit10c8c39c25d902ab5268fa48ac2bc0e42e65b179 (patch)
tree26d4745bdeebd5a1734885d777f28b23f6e33713 /meta-python/recipes-devtools/python
parent59cbb1d54d62a3a078a126e05310bb1cfa28922a (diff)
downloadmeta-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')
-rw-r--r--meta-python/recipes-devtools/python/python-matplotlib/fix_setup.patch29
-rw-r--r--meta-python/recipes-devtools/python/python-matplotlib/fix_setupext.patch136
-rw-r--r--meta-python/recipes-devtools/python/python-matplotlib_1.1.0.bb33
-rw-r--r--meta-python/recipes-devtools/python/python-matplotlib_2.0.2.bb18
4 files changed, 121 insertions, 95 deletions
diff --git a/meta-python/recipes-devtools/python/python-matplotlib/fix_setup.patch b/meta-python/recipes-devtools/python/python-matplotlib/fix_setup.patch
deleted file mode 100644
index 938158353..000000000
--- a/meta-python/recipes-devtools/python/python-matplotlib/fix_setup.patch
+++ /dev/null
@@ -1,29 +0,0 @@
1This fixes the dependency checks inside of setup.py since things like
2'import numpy' won't work with bitbake.
3
4diff --git a/setup.py b/setup.py
5index 2f13821..e6d6ed0 100644
6--- a/setup.py
7+++ b/setup.py
8@@ -113,12 +113,6 @@ if 1:
9 baseline_images = [chop_package(f) for f in baseline_images]
10 package_data['matplotlib'].extend(baseline_images)
11
12-if not check_for_numpy():
13- sys.exit(1)
14-
15-if not check_for_freetype():
16- sys.exit(1)
17-
18 build_ft2font(ext_modules, packages)
19 build_ttconv(ext_modules, packages)
20 build_contour(ext_modules, packages)
21@@ -129,7 +123,7 @@ build_tri(ext_modules, packages)
22
23 print_raw("")
24 print_raw("OPTIONAL BACKEND DEPENDENCIES")
25-has_libpng = check_for_libpng()
26+has_libpng = True
27
28 if has_libpng and options['build_agg']:
29 build_agg(ext_modules, packages)
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 9a13a1850..21b9094a1 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 @@
1This fixes the numpy import problem in setupext.py using a hard-coded path. 1This fixes the numpy import problem in setupext.py using a hard-coded path.
2 2
3Index: matplotlib-1.1.0/setupext.py 3Index: 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__']
64Index: 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',
diff --git a/meta-python/recipes-devtools/python/python-matplotlib_1.1.0.bb b/meta-python/recipes-devtools/python/python-matplotlib_1.1.0.bb
deleted file mode 100644
index 133e66da4..000000000
--- a/meta-python/recipes-devtools/python/python-matplotlib_1.1.0.bb
+++ /dev/null
@@ -1,33 +0,0 @@
1DESCRIPTION = "matplotlib is a python 2D plotting library which produces publication quality figures in a variety of hardcopy formats"
2SECTION = "devel/python"
3LICENSE = "PSF"
4LIC_FILES_CHKSUM = "file://README.txt;md5=83c5bf8b16a5f99507f2f47a21ae3b81"
5PR = "r1"
6
7DEPENDS += "python-numpy freetype libpng python-dateutil python-pytz"
8RDEPENDS_${PN} = "python-core python-distutils python-numpy freetype libpng python-dateutil python-pytz"
9
10SRC_URI = "${SOURCEFORGE_MIRROR}/matplotlib/matplotlib-${PV}.tar.gz \
11 file://fix_setup.patch \
12 file://fix_setupext.patch \
13"
14
15S = "${WORKDIR}/matplotlib-${PV}"
16
17EXTRA_OECONF = "--disable-docs --with-python-includes=${STAGING_INCDIR}/../"
18
19inherit distutils
20
21do_compile_prepend() {
22 ${STAGING_BINDIR_NATIVE}/python setup.py build ${DISTUTILS_BUILD_ARGS} || \
23 true
24}
25
26# need to export these variables for python-config to work
27export PYTHONPATH
28export STAGING_INCDIR
29export STAGING_LIBDIR
30
31
32SRC_URI[md5sum] = "57a627f30b3b27821f808659889514c2"
33SRC_URI[sha256sum] = "be37e1d86c65ecacae6683f8805e051e9904e5f2e02bf2b7a34262c46a6d06a7"
diff --git a/meta-python/recipes-devtools/python/python-matplotlib_2.0.2.bb b/meta-python/recipes-devtools/python/python-matplotlib_2.0.2.bb
new file mode 100644
index 000000000..5b1c3f05b
--- /dev/null
+++ b/meta-python/recipes-devtools/python/python-matplotlib_2.0.2.bb
@@ -0,0 +1,18 @@
1DESCRIPTION = "matplotlib is a python 2D plotting library which produces publication quality figures in a variety of hardcopy formats"
2SECTION = "devel/python"
3LICENSE = "PSF"
4LIC_FILES_CHKSUM = "file://LICENSE/LICENSE;md5=afec61498aa5f0c45936687da9a53d74"
5
6DEPENDS += "python-numpy freetype libpng python-dateutil python-pytz"
7RDEPENDS_${PN} = "python-core python-distutils python-numpy freetype libpng python-dateutil python-pytz"
8
9SRC_URI = "https://github.com/matplotlib/matplotlib/archive/v${PV}.tar.gz \
10 file://fix_setupext.patch \
11"
12SRC_URI[md5sum] = "89717c1ef3c6fdcd6fb1f3b597a4858c"
13SRC_URI[sha256sum] = "aebed23921562792b68b8ca355de5abc176af4424f1987e2fa95f65e5c5e7e89"
14S = "${WORKDIR}/matplotlib-${PV}"
15EXTRA_OECONF = "--disable-docs"
16
17inherit setuptools pkgconfig
18