2 # Copyright (C) 2019 Jakub Piotr Cłapa <jpc@loee.pl>
3 # Copyright (C) 2020 Alexandru Ardelean <ardeleanalex@gmail.com>
6 include $(TOPDIR
)/rules.mk
12 PYPI_NAME
:=$(PKG_NAME
)
13 PKG_HASH
:=dff4af63638afcc57a3dfb9e4b26d434a7a602d225b42d746ea7fe2edf1342fd
15 PKG_MAINTAINER
:=Alexandru Ardelean
<ardeleanalex@gmail.com
>
17 PKG_LICENSE
:=BSD-3-Clause
18 PKG_LICENSE_FILES
:=LICENSE.txt
19 PKG_CPE_ID
:=cpe
:/a
:numpy
:numpy
21 PKG_CONFIG_DEPENDS
:= \
22 CONFIG_NUMPY_OPENBLAS_SUPPORT
26 HOST_PYTHON3_PACKAGE_BUILD_DEPENDS
:=Cython
29 include $(INCLUDE_DIR
)/package.mk
30 include ..
/python3-package.mk
32 define Package
/python3-numpy
36 TITLE
:=The fundamental package for scientific computing with Python
37 URL
:=https
://www.numpy.org
/
38 DEPENDS
:=@
!SOFT_FLOAT
+INSTALL_GFORTRAN
:libgfortran
+python3 \
39 +NUMPY_OPENBLAS_SUPPORT
:openblas
42 # We need to duplicate the omitted arhitectures same as openblas
43 define Package
/python3-numpy
/config
48 config NUMPY_OPENBLAS_SUPPORT
49 bool
"Enable OpenBLAS support"
55 ifdef CONFIG_NUMPY_OPENBLAS_SUPPORT
56 define Build
/Prepare
/numpy-sitecfg
57 echo
"[DEFAULT]" > $(PKG_BUILD_DIR
)/site.cfg
58 echo
"library_dirs = $(STAGING_DIR)/usr/lib" >> $(PKG_BUILD_DIR
)/site.cfg
59 echo
"include_dirs = $(STAGING_DIR)/usr/include" >> $(PKG_BUILD_DIR
)/site.cfg
60 echo
>> $(PKG_BUILD_DIR
)/site.cfg
61 echo
"[openblas]" >> $(PKG_BUILD_DIR
)/site.cfg
62 echo
"libraries = openblas" >> $(PKG_BUILD_DIR
)/site.cfg
63 echo
"runtime_library_dirs = /usr/lib" >> $(PKG_BUILD_DIR
)/site.cfg
68 $(call Build
/Prepare
/Default
)
69 $(call Build
/Prepare
/numpy-sitecfg
)
72 define Package
/python3-numpy
/description
73 NumPy is the fundamental package for array computing with Python.
75 By default
, this package is built without some modules.
76 For some modules to be available
, the INSTALL_GFORTRAN symbol needs
77 to be enabled in the OpenWrt core
/toolchain.
80 $(eval
$(call Py3Package
,python3-numpy
))
81 $(eval
$(call BuildPackage
,python3-numpy
))
82 $(eval
$(call BuildPackage
,python3-numpy-src
))