summaryrefslogtreecommitdiffstats
path: root/package/python-numpy/python-numpy.mk
diff options
context:
space:
mode:
authorSamuel Martin <s.martin49@gmail.com>2014-04-23 01:15:37 +0200
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>2014-07-16 22:27:34 +0200
commit6777348f340b5340f6499534e568653f4b68c1c0 (patch)
treee9c5e4544e36f6b12dbbb2ef19ef79e989f458a8 /package/python-numpy/python-numpy.mk
parent643627fc43abf0f2dff248992219ad56e27a21c9 (diff)
downloadbuildroot-6777348f340b5340f6499534e568653f4b68c1c0.tar.gz
buildroot-6777348f340b5340f6499534e568653f4b68c1c0.zip
python-numpy: new package
This patch add NumPy package for python. Since Fortran support has been deprecated in Buildroot since the 2013.11 release, and because most of the external toolchains do not provide a Fortran compiler, it is necessary to explicity disable Fortran compiler to avoid catching the one from the host system if any. We also need to fill a site.cfg file to tell NumPy build-system where it should looking for BLAS and LAPACK libraries. Some packages may include headers provided by python-numpy package, so python-numpy is installed to the staging directory. [Thomas: - add dependency in Config.in to take into account fenv.h requirement, suggested by Yann E. Morin. - modified to use the staging installation logic in the python package infrastructure.] Signed-off-by: Samuel Martin <s.martin49@gmail.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Diffstat (limited to 'package/python-numpy/python-numpy.mk')
-rw-r--r--package/python-numpy/python-numpy.mk28
1 files changed, 28 insertions, 0 deletions
diff --git a/package/python-numpy/python-numpy.mk b/package/python-numpy/python-numpy.mk
new file mode 100644
index 0000000000..e309ef6afa
--- /dev/null
+++ b/package/python-numpy/python-numpy.mk
@@ -0,0 +1,28 @@
+################################################################################
+#
+# python-numpy
+#
+################################################################################
+
+PYTHON_NUMPY_VERSION = 1.8.0
+PYTHON_NUMPY_SOURCE = numpy-$(PYTHON_NUMPY_VERSION).tar.gz
+PYTHON_NUMPY_SITE = http://downloads.sourceforge.net/numpy
+PYTHON_NUMPY_LICENSE = BSD-3c
+PYTHON_NUMPY_LICENSE_FILES = LICENSE.txt
+PYTHON_NUMPY_SETUP_TYPE = distutils
+
+PYTHON_NUMPY_BUILD_OPT = --fcompiler=None
+
+define PYTHON_NUMPY_CONFIGURE_CMDS
+ -rm -f $(@D)/site.cfg
+ echo "[DEFAULT]" >> $(@D)/site.cfg
+ echo "library_dirs = $(STAGING_DIR)/usr/lib" >> $(@D)/site.cfg
+ echo "include_dirs = $(STAGING_DIR)/usr/include" >> $(@D)/site.cfg
+ echo "libraries =" >> $(@D)/site.cfg
+endef
+
+# Some package may include few headers from NumPy, so let's install it
+# in the staging area.
+PYTHON_NUMPY_INSTALL_STAGING = YES
+
+$(eval $(python-package))
OpenPOWER on IntegriCloud