Skip to content

Commit

Permalink
new package: python3.9-numpy
Browse files Browse the repository at this point in the history
  • Loading branch information
licy183 committed Sep 21, 2023
1 parent c3fa103 commit 8de32d8
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 0 deletions.
29 changes: 29 additions & 0 deletions tur-pypi/python3.9-numpy/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
TERMUX_PKG_HOMEPAGE=https://numpy.org/
TERMUX_PKG_DESCRIPTION="The fundamental package for scientific computing with Python"
TERMUX_PKG_LICENSE="BSD 3-Clause"
TERMUX_PKG_MAINTAINER="@termux-user-repository"
TERMUX_PKG_VERSION="1.24.2"
TERMUX_PKG_SRCURL=git+https://github.com/numpy/numpy
TERMUX_PKG_DEPENDS="libc++, libopenblas, python3.9"
TERMUX_PKG_BUILD_IN_SRC=true
TERMUX_PKG_PYTHON_COMMON_DEPS="wheel, pybind11, 'Cython<3', pythran"
TERMUX_PKG_AUTO_UPDATE=true
TERMUX_PKG_RM_AFTER_INSTALL="
bin/
"

TERMUX_PYTHON_VERSION=3.9
TERMUX_PYTHON_CROSSENV_PREFIX=$TERMUX_PKG_BUILDDIR/python39-crossenv-prefix-$TERMUX_ARCH
TUR_AUTO_AUDIT_WHEEL=true

source $TERMUX_SCRIPTDIR/common-files/tur_elf_cleaner_for_wheel.sh

termux_step_post_get_source() {
export PATH="$TERMUX_PREFIX/opt/python$TERMUX_PYTHON_VERSION/cross/bin:$PATH"
}

termux_step_pre_configure() {
export MATHLIB="m"

LDFLAGS+=" -lm"
}
12 changes: 12 additions & 0 deletions tur-pypi/python3.9-numpy/site.cfg.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
--- a/site.cfg
+++ b/site.cfg
@@ -0,0 +1,9 @@
+[DEFAULT]
+library_dirs = @TERMUX_PREFIX@/lib
+include_dirs = @TERMUX_PREFIX@/include
+
+[openblas]
+libraries = openblas
+library_dirs = @TERMUX_PREFIX@/lib
+include_dirs = @TERMUX_PREFIX@/include
+runtime_library_dirs = @TERMUX_PREFIX@/lib
11 changes: 11 additions & 0 deletions tur-pypi/python3.9-numpy/test.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
--- a/numpy/core/tests/test_mem_policy.py
+++ b/numpy/core/tests/test_mem_policy.py
@@ -18,6 +18,8 @@
"""
if sys.platform.startswith('cygwin'):
pytest.skip('link fails on cygwin')
+ if os.path.exists("/system/bin/app_process"):
+ pytest.skip('link fails on Android')
if IS_WASM:
pytest.skip("Can't build module inside Wasm")
functions = [

0 comments on commit 8de32d8

Please sign in to comment.