summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-devtools
diff options
context:
space:
mode:
authorDan McDougall <daniel.mcdougall@liftoffsoftware.com>2012-06-08 20:52:38 +0000
committerKoen Kooi <koen@dominion.thruhere.net>2012-06-20 13:36:28 +0200
commit43010e86aa505afa878a9a8797db59b7cfd81ac6 (patch)
treef132d0e8bc6e65fd22c331e6519ba8b00b8c7e37 /meta-oe/recipes-devtools
parentcdfe54310d11191fad462ed8425d5265da93fb37 (diff)
downloadmeta-openembedded-43010e86aa505afa878a9a8797db59b7cfd81ac6.tar.gz
python-matplotlib : Add recipe for matplotlib 1.1.0.
Adding python-matplotlib recipe. I'm sure many folks will find this useful. Signed-off-by: Dan McDougall <daniel.mcdougall@liftoffsoftware.com> Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
Diffstat (limited to 'meta-oe/recipes-devtools')
-rw-r--r--meta-oe/recipes-devtools/python/python-matplotlib/fix_setup.patch29
-rw-r--r--meta-oe/recipes-devtools/python/python-matplotlib/fix_setupext.patch29
-rw-r--r--meta-oe/recipes-devtools/python/python-matplotlib_1.1.0.bb36
3 files changed, 94 insertions, 0 deletions
diff --git a/meta-oe/recipes-devtools/python/python-matplotlib/fix_setup.patch b/meta-oe/recipes-devtools/python/python-matplotlib/fix_setup.patch
new file mode 100644
index 000000000..938158353
--- /dev/null
+++ b/meta-oe/recipes-devtools/python/python-matplotlib/fix_setup.patch
@@ -0,0 +1,29 @@
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-oe/recipes-devtools/python/python-matplotlib/fix_setupext.patch b/meta-oe/recipes-devtools/python/python-matplotlib/fix_setupext.patch
new file mode 100644
index 000000000..e07159552
--- /dev/null
+++ b/meta-oe/recipes-devtools/python/python-matplotlib/fix_setupext.patch
@@ -0,0 +1,29 @@
1This fixes the numpy import problem in setupext.py using a hard-coded path.
2
3diff --git a/setupext.py b/setupext.py
4index 962cedc..82297c4 100644
5--- a/setupext.py
6+++ b/setupext.py
7@@ -176,10 +176,7 @@ if os.path.exists(setup_cfg):
8 except: pass
9
10 # For get_base_flags:
11-if options['basedirlist']:
12- basedirlist = options['basedirlist'].split()
13-else:
14- basedirlist = basedir[sys.platform]
15+basedirlist = [os.environ['STAGING_LIBDIR']]
16 print("basedirlist is: %s" % basedirlist)
17
18 if options['display_status']:
19@@ -555,8 +552,8 @@ def check_for_numpy():
20
21 def add_numpy_flags(module):
22 "Add the modules flags to build extensions which use numpy"
23- import numpy
24- module.include_dirs.append(numpy.get_include())
25+ # Hard-coded path for OE since I know this is where numpy's include dir will be
26+ module.include_dirs.append(os.path.join(os.environ['STAGING_LIBDIR'], 'python2.7/site-packages/numpy/core/include/'))
27
28 def add_png_flags(module):
29 try_pkgconfig(module, 'libpng', 'png')
diff --git a/meta-oe/recipes-devtools/python/python-matplotlib_1.1.0.bb b/meta-oe/recipes-devtools/python/python-matplotlib_1.1.0.bb
new file mode 100644
index 000000000..788ba2f7c
--- /dev/null
+++ b/meta-oe/recipes-devtools/python/python-matplotlib_1.1.0.bb
@@ -0,0 +1,36 @@
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"
8RDEPENDS_${PN} = "python-core python-distutils python-numpy freetype libpng"
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 BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \
23 ${STAGING_BINDIR_NATIVE}/python setup.py build ${DISTUTILS_BUILD_ARGS} || \
24 true
25}
26
27# need to export these variables for python-config to work
28export PYTHONPATH
29export BUILD_SYS
30export HOST_SYS
31export STAGING_INCDIR
32export STAGING_LIBDIR
33
34
35SRC_URI[md5sum] = "57a627f30b3b27821f808659889514c2"
36SRC_URI[sha256sum] = "be37e1d86c65ecacae6683f8805e051e9904e5f2e02bf2b7a34262c46a6d06a7"