Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- include $(TOPDIR)/rules.mk
- PKG_NAME:=python-scipy
- PKG_VERSION:=1.2.3
- PKG_RELEASE:=1
- PKG_MAINTAINER:=Matteo Scordino <matteo@silexembedded.co.uk>
- PKG_SOURCE:=scipy-$(PKG_VERSION).tar.gz
- PKG_SOURCE_URL:=https://github.com/scipy/scipy/releases/download/v$(PKG_VERSION)/
- PKG_BUILD_DIR:=$(BUILD_DIR)/scipy-$(PKG_VERSION)
- PKG_BUILD_DEPENDS:=python
- HOST_BUILD_DEPENDS:=python
- HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/scipy-$(PKG_VERSION)
- include $(INCLUDE_DIR)/host-build.mk
- include $(INCLUDE_DIR)/package.mk
- $(call include_mk, python-package.mk)
- define Package/$(PKG_NAME)
- SUBMENU:=Python
- SECTION:=lang
- CATEGORY:=Languages
- TITLE:=The fundamental scipy package
- URL:=https://www.scipy.org/
- DEPENDS:=@!SOFT_FLOAT +INSTALL_GFORTRAN:libgfortran +python +python-numpy
- endef
- define Package/$(PKG_NAME)/description
- scipy. That's all the description I'm going to give you.
- endef
- define Build/Compile
- echo "Cross-compile package, HOST=${HOST}"
- # $(call Build/Compile/PyMod,,install --prefix="/usr" --root="$(PKG_INSTALL_DIR)")
- $(call HostPython, \
- cd $(HOST_BUILD_DIR)/$(strip $(1)); \
- CFLAGS="$(HOST_CFLAGS)" \
- CPPFLAGS="$(HOST_CPPFLAGS)" \
- LDFLAGS="$(HOST_LDFLAGS)" \
- $(3) \
- , \
- ./setup.py $(2) \
- )
- endef
- define Build/InstallDev
- echo "InstallDev"
- mkdir -p $(STAGING_DIR_HOST)/lib/python2.7/site-packages/
- $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR)
- $(CP) \
- $(PKG_INSTALL_DIR)/usr/lib/python2.7/site-packages/* \
- $(1)$(PYTHON_PKG_DIR)
- $(CP) \
- $(PKG_INSTALL_DIR)/usr/lib/python2.7/site-packages/* \
- $(STAGING_DIR_HOST)/lib/python2.7/site-packages/
- endef
- # TODO: this should be moved to python package
- # $(1) => build subdir
- # $(2) => additional arguments to setup.py
- # $(3) => additional variables
- define Host/Compile/PyMod
- echo "Host Compile PyMod"
- $(call HostPython, \
- cd $(HOST_BUILD_DIR)/$(strip $(1)); \
- CFLAGS="$(HOST_CFLAGS)" \
- CPPFLAGS="$(HOST_CPPFLAGS)" \
- LDFLAGS="$(HOST_LDFLAGS)" \
- $(3) \
- , \
- ./setup.py $(2) \
- )
- endef
- define Host/Compile
- echo host-compile
- $(call Host/Compile/PyMod,,install --prefix="/usr" --root="$(STAGING_DIR_HOST)"\
- CYTHON="$(STAGING_DIR_HOST)/usr/bin/cython" )
- endef
- define Host/Install
- endef
- define Package/$(PKG_NAME)/install
- $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR)
- $(CP) $(PKG_INSTALL_DIR)/usr/lib/python2.7/site-packages/* \
- $(1)$(PYTHON_PKG_DIR)
- endef
- #$(eval $(call HostBuild))
- $(eval $(call BuildPackage,$(PKG_NAME),+python-numpy))
Add Comment
Please, Sign In to add comment