1
1
mirror of https://github.com/OpenVoiceOS/OpenVoiceOS synced 2025-06-05 22:19:21 +02:00

Add precise-lite support + all dependencies for it.

(No TFlite_runtime package included as of yet)
This commit is contained in:
Peter Steenbergen
2021-09-23 14:55:05 +02:00
parent 014bbf9653
commit 987755a337
35 changed files with 346 additions and 4 deletions

View File

@@ -0,0 +1,24 @@
config BR2_PACKAGE_PYTHON_SCIPY
bool "python-scipy"
depends on BR2_TOOLCHAIN_HAS_FORTRAN
depends on BR2_PACKAGE_OPENBLAS_ARCH_SUPPORTS # build
depends on BR2_PACKAGE_PYTHON_NUMPY_ARCH_SUPPORTS # python-numpy
depends on BR2_TOOLCHAIN_USES_GLIBC || BR2_TOOLCHAIN_USES_MUSL # python-numpy
select BR2_PACKAGE_OPENBLAS # build
select BR2_PACKAGE_CLAPACK # build
select BR2_PACKAGE_PYTHON_NUMPY # runtime
help
Scipy is a Python package that includes modules for
statistics, optimization, linear algebra and much
more.
http://www.scipy.org/
comment "python-scipy needs toolchain with fortran"
depends on !BR2_TOOLCHAIN_HAS_FORTRAN
comment "python-scipy needs lib openblas"
depends on !BR2_PACKAGE_OPENBLAS_ARCH_SUPPORTS
comment "python-scipy needs python-numpy"
depends on !BR2_PACKAGE_PYTHON_NUMPY_ARCH_SUPPORTS

View File

@@ -0,0 +1,2 @@
# Locally calculated
sha256 6b47d5fa7ea651054362561a28b1ccc8da9368a39514c1bbf6c0977a1c376764 scipy-1.7.1.tar.gz

View File

@@ -0,0 +1,33 @@
################################################################################
#
# python-scipy
#
################################################################################
PYTHON_SCIPY_VERSION = 1.7.1
PYTHON_SCIPY_SOURCE = scipy-$(PYTHON_SCIPY_VERSION).tar.gz
PYTHON_SCIPY_SITE = https://files.pythonhosted.org/packages/47/33/a24aec22b7be7fdb10ec117a95e1e4099890d8bbc6646902f443fc7719d1
PYTHON_SCIPY_LICENSE = BSD-3-Clause
PYTHON_SCIPY_LICENSE_FILES = LICENSE.txt doc/sphinxext/LICENSE.txt \
doc/scipy-sphinx-theme/LICENSE.txt
PYTHON_SCIPY_SETUP_TYPE = setuptools
PYTHON_SCIPY_DEPENDENCIES = clapack openblas host-python-numpy \
host-python-pip host-python-pybind \
host-python-pythran host-python-gast \
host-python-beniget host-python-ply
PYTHON_SCIPY_ENV += LDFLAGS="$(TARGET_LDFLAGS) -shared \
-L$(PYTHON3_PATH)/site-packages/numpy/core/lib"
# must be used to locate 'gfortran'
PYTHON_SCIPY_ENV += F90="$(TARGET_FC)"
# trick to locate 'lapack' and 'blas'
define PYTHON_SCIPY_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
endef
$(eval $(python-package))