这是indexloc提供的服务,不要输入任何密码
Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions build-package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -389,6 +389,10 @@ termux_step_post_massage() {
# shellcheck source=scripts/build/termux_step_create_debscripts.sh
source "$TERMUX_SCRIPTDIR/scripts/build/termux_step_create_debscripts.sh"

# Function to generate debscripts for python packages.
# shellcheck source=scripts/build/termux_step_create_python_debscripts.sh
source "$TERMUX_SCRIPTDIR/scripts/build/termux_step_create_python_debscripts.sh"

# Convert Debian maintainer scripts into pacman-compatible installation hooks.
# This is used only when creating pacman packages.
# shellcheck source=scripts/build/termux_step_create_pacman_install_hook.sh
Expand Down
10 changes: 1 addition & 9 deletions disabled-packages/python-pandas/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ TERMUX_PKG_VERSION=1.5.3
TERMUX_PKG_SRCURL=https://github.com/pandas-dev/pandas/archive/refs/tags/v${TERMUX_PKG_VERSION}.tar.gz
TERMUX_PKG_SHA256=d8abf9c2bf33cac75b28f32c174c29778414eb249e5e2ccb69b1079b97a8fc66
TERMUX_PKG_AUTO_UPDATE=true
TERMUX_PKG_DEPENDS="libc++, python, python-numpy, python-pip"
TERMUX_PKG_DEPENDS="libc++, python, python-numpy"
TERMUX_PKG_PYTHON_COMMON_DEPS="Cython, numpy, wheel"
TERMUX_PKG_PYTHON_TARGET_DEPS="python-dateutil, pytz"
TERMUX_PKG_BUILD_IN_SRC=true
Expand All @@ -18,11 +18,3 @@ termux_step_pre_configure() {
termux_step_make_install() {
pip install --no-deps --no-build-isolation . --prefix $TERMUX_PREFIX
}

termux_step_create_debscripts() {
cat <<- EOF > ./postinst
#!$TERMUX_PREFIX/bin/sh
echo "Installing dependencies through pip..."
pip3 install ${TERMUX_PKG_PYTHON_TARGET_DEPS//, / }
EOF
}
11 changes: 2 additions & 9 deletions packages/borgbackup/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ TERMUX_PKG_DESCRIPTION="Deduplicating and compressing backup program"
TERMUX_PKG_LICENSE="BSD 3-Clause"
TERMUX_PKG_MAINTAINER="Joshua Kahn @TomJo2000"
TERMUX_PKG_VERSION="1.4.2"
TERMUX_PKG_REVISION=1
TERMUX_PKG_SRCURL=https://github.com/borgbackup/borg/releases/download/${TERMUX_PKG_VERSION}/borgbackup-${TERMUX_PKG_VERSION}.tar.gz
TERMUX_PKG_SHA256=8923f5e953205d81138d1d7276c8a1c864215e230994d620c397635568ed376f
TERMUX_PKG_DEPENDS="libacl, liblz4, openssl, python, xxhash, zstd"
Expand All @@ -17,13 +18,5 @@ termux_step_make() {
termux_step_make_install() {
local _pyver="${TERMUX_PYTHON_VERSION//./}"
local _wheel="borgbackup-${TERMUX_PKG_VERSION}-cp${_pyver}-cp${_pyver}-linux_${TERMUX_ARCH}.whl"
pip install --no-deps --prefix="$TERMUX_PREFIX" "$TERMUX_PKG_SRCDIR/dist/${_wheel}"
}

termux_step_create_debscripts() {
cat <<- EOF > ./postinst
#!$TERMUX_PREFIX/bin/sh
echo "Installing dependencies through pip..."
pip3 install $TERMUX_PKG_PYTHON_TARGET_DEPS
EOF
pip install --force-reinstall --no-deps --prefix="$TERMUX_PREFIX" "$TERMUX_PKG_SRCDIR/dist/${_wheel}"
}
1 change: 1 addition & 0 deletions packages/calcurse/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ TERMUX_PKG_DESCRIPTION="calcurse is a calendar and scheduling application for th
TERMUX_PKG_LICENSE="BSD 2-Clause"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION="4.8.2"
TERMUX_PKG_REVISION=1
TERMUX_PKG_SRCURL=https://calcurse.org/files/calcurse-$TERMUX_PKG_VERSION.tar.gz
TERMUX_PKG_SHA256=849ba852c7f37b6772365cb0c42a94cde0fe75efba91363e96a0e7ef797ba565
TERMUX_PKG_AUTO_UPDATE=true
Expand Down
8 changes: 2 additions & 6 deletions packages/calcurse/calcurse-caldav.subpackage.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
TERMUX_SUBPKG_INCLUDE="bin/calcurse-caldav"
TERMUX_SUBPKG_DESCRIPTION="Sync calcurse with remote caldav calendar"
TERMUX_SUBPKG_DEPENDS="python, python-pip"
TERMUX_SUBPKG_DEPENDS="python"
TERMUX_SUBPKG_REPLACES="calcurse (<< 4.7.1-1)"
TERMUX_SUBPKG_BREAKS="calcurse (<< 4.7.1-1)"

termux_step_create_subpkg_debscripts() {
echo "#!$TERMUX_PREFIX/bin/sh" > postinst
echo "pip3 install httplib2" >> postinst
}
TERMUX_SUBPKG_PYTHON_RUNTIME_DEPS="httplib2"
12 changes: 2 additions & 10 deletions packages/electrum/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,27 +3,19 @@ TERMUX_PKG_DESCRIPTION="Electrum is a lightweight Bitcoin wallet"
TERMUX_PKG_LICENSE="MIT"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION="4.5.8"
TERMUX_PKG_REVISION=2
TERMUX_PKG_REVISION=3
TERMUX_PKG_SRCURL=https://download.electrum.org/$TERMUX_PKG_VERSION/Electrum-$TERMUX_PKG_VERSION.tar.gz
TERMUX_PKG_SHA256=dd8595a138132dee87cee76ce760a1d622fc2fd65d3b6ac7df7e53b7fb6ea7e8
# The python dependency list should be compared to
# contrib/requirements/requirements.txt in upstream project on every
# update (or at least every major update). Disable auto updates for
# now.
TERMUX_PKG_AUTO_UPDATE=false
TERMUX_PKG_DEPENDS="python, libsecp256k1, python-pip, python-cryptography"
TERMUX_PKG_DEPENDS="python, libsecp256k1, python-cryptography"
TERMUX_PKG_PYTHON_TARGET_DEPS="'qrcode', 'protobuf<4,>=3.20', 'qdarkstyle>=2.7', 'aiorpcx<0.24,>=0.22.0', 'aiohttp<4.0.0,>=3.3.0', 'aiohttp_socks>=0.8.4', 'certifi', 'attrs>=20.1.0', 'jsonpatch', 'dnspython>=2.0'"
TERMUX_PKG_BUILD_IN_SRC=true
TERMUX_PKG_PLATFORM_INDEPENDENT=true
# asciinema previously contained some files that python packages have in common
TERMUX_PKG_CONFLICTS="asciinema (<< 1.4.0-1)"
TERMUX_PKG_PYTHON_COMMON_DEPS="wheel"
TERMUX_PKG_SERVICE_SCRIPT=("electrum" 'exec electrum daemon 2>&1')

termux_step_create_debscripts() {
cat <<- EOF > ./postinst
#!$TERMUX_PREFIX/bin/sh
echo "Installing dependencies through pip..."
pip3 install ${TERMUX_PKG_PYTHON_TARGET_DEPS//, / }
EOF
}
11 changes: 2 additions & 9 deletions packages/hash-slinger/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@ TERMUX_PKG_DESCRIPTION="Various tools to generate special DNS records"
TERMUX_PKG_LICENSE="GPL-2.0"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION="3.4"
TERMUX_PKG_REVISION=1
TERMUX_PKG_SRCURL=https://github.com/letoams/hash-slinger/archive/refs/tags/${TERMUX_PKG_VERSION}.tar.gz
TERMUX_PKG_SHA256=46274aa2124c766c2c15c73576f895db7556bf03c7d3e9e4bb917858fae34ffc
TERMUX_PKG_AUTO_UPDATE=true
TERMUX_PKG_DEPENDS="ca-certificates, gnupg, openssh, python, pyunbound, resolv-conf, swig, python-pip"
TERMUX_PKG_DEPENDS="ca-certificates, gnupg, openssh, python, pyunbound, resolv-conf, swig"
TERMUX_PKG_PLATFORM_INDEPENDENT=true
TERMUX_PKG_BUILD_IN_SRC=true
TERMUX_PKG_PYTHON_TARGET_DEPS="dnspython, ipaddr, m2crypto, python-gnupg"
Expand All @@ -22,11 +23,3 @@ termux_step_make_install() {
install -Dm600 -t $TERMUX_PREFIX/share/man/man1 ${f}.1
done
}

termux_step_create_debscripts() {
cat <<- EOF > ./postinst
#!$TERMUX_PREFIX/bin/sh
echo "Installing dependencies through pip..."
pip3 install ${TERMUX_PKG_PYTHON_TARGET_DEPS//, / }
EOF
}
12 changes: 2 additions & 10 deletions packages/lv2/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,9 @@ TERMUX_PKG_DESCRIPTION="A plugin standard for audio systems"
TERMUX_PKG_LICENSE="ISC"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION=1.18.10
TERMUX_PKG_REVISION=5
TERMUX_PKG_REVISION=6
TERMUX_PKG_SRCURL=https://lv2plug.in/spec/lv2-${TERMUX_PKG_VERSION}.tar.xz
TERMUX_PKG_SHA256=78c51bcf21b54e58bb6329accbb4dae03b2ed79b520f9a01e734bd9de530953f
TERMUX_PKG_DEPENDS="libxml2, libxslt, python, sord, python-pip, python-lxml"
TERMUX_PKG_DEPENDS="libxml2, libxslt, python, sord, python-lxml"
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="-Dplugins=disabled"
TERMUX_PKG_PYTHON_TARGET_DEPS="pygments, rdflib"

termux_step_create_debscripts() {
cat <<-EOF >./postinst
#!$TERMUX_PREFIX/bin/sh
echo "Installing dependencies through pip..."
pip3 install ${TERMUX_PKG_PYTHON_TARGET_DEPS//, / }
EOF
}
10 changes: 1 addition & 9 deletions packages/manim/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ TERMUX_PKG_DESCRIPTION="A community-maintained Python framework for creating mat
TERMUX_PKG_LICENSE="MIT"
TERMUX_PKG_MAINTAINER="Nguyen Khanh @nguynkhn"
TERMUX_PKG_VERSION="0.19.0"
TERMUX_PKG_REVISION=3
TERMUX_PKG_REVISION=4
TERMUX_PKG_SRCURL=https://github.com/ManimCommunity/manim/archive/refs/tags/v$TERMUX_PKG_VERSION.tar.gz
TERMUX_PKG_SHA256=9047d87bb5ac9d008d22f5d444b984e5b630585a073d69506ef0164c804df2c3
TERMUX_PKG_DEPENDS="ffmpeg, libcairo, pango, xorgproto, python-numpy, python-pillow, pycairo, python-scipy, python-skia-pathops"
Expand All @@ -13,11 +13,3 @@ TERMUX_PKG_PYTHON_COMMON_DEPS="poetry"
TERMUX_PKG_BUILD_IN_SRC=true
TERMUX_PKG_AUTO_UPDATE=true
TERMUX_PKG_EXCLUDED_ARCHES="arm, i686"

termux_step_create_debscripts() {
cat <<- EOF > ./postinst
#!$TERMUX_PREFIX/bin/sh
echo "Installing dependencies through pip..."
pip3 install ${TERMUX_PKG_PYTHON_TARGET_DEPS//, / }
EOF
}
11 changes: 2 additions & 9 deletions packages/matplotlib/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,11 @@ LICENSE/LICENSE_STIX
LICENSE/LICENSE_YORICK"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION="3.10.8"
TERMUX_PKG_REVISION=1
TERMUX_PKG_SRCURL=https://github.com/matplotlib/matplotlib/archive/refs/tags/v${TERMUX_PKG_VERSION}.tar.gz
TERMUX_PKG_SHA256=dbc50c7b15bb8d7dbe51a27a58322ed73f09291772d9e3184f03f11c576693f7
TERMUX_PKG_AUTO_UPDATE=true
TERMUX_PKG_DEPENDS="freetype, libc++, patchelf, ninja, python, python-contourpy, python-numpy, python-pillow, python-pip"
TERMUX_PKG_DEPENDS="freetype, libc++, patchelf, ninja, python, python-contourpy, python-numpy, python-pillow"
_NUMPY_VERSION=$(. $TERMUX_SCRIPTDIR/packages/python-numpy/build.sh; echo $TERMUX_PKG_VERSION)
TERMUX_PKG_PYTHON_COMMON_DEPS="build, 'meson-python>=0.13.1', wheel, 'numpy==$_NUMPY_VERSION', 'pybind11>=2.6.0', 'setuptools>=64', 'setuptools_scm>=7'"

Expand Down Expand Up @@ -58,11 +59,3 @@ termux_step_make_install() {
local _whl="matplotlib-$TERMUX_PKG_VERSION-cp$_pyv-cp$_pyv-linux_$TERMUX_ARCH.whl"
pip install --no-deps --prefix=$TERMUX_PREFIX --force-reinstall $TERMUX_PKG_SRCDIR/dist/$_whl
}

termux_step_create_debscripts() {
cat <<- EOF > ./postinst
#!$TERMUX_PREFIX/bin/sh
echo "Installing dependencies through pip. This may take a while..."
MATHLIB="m" pip3 install matplotlib
EOF
}
6 changes: 3 additions & 3 deletions packages/nala/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,17 @@ TERMUX_PKG_DESCRIPTION="Commandline frontend for the apt package manager"
TERMUX_PKG_LICENSE="GPL-3.0"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION="0.16.0"
TERMUX_PKG_REVISION=1
TERMUX_PKG_SRCURL=https://gitlab.com/volian/nala/-/archive/v${TERMUX_PKG_VERSION}/nala-v${TERMUX_PKG_VERSION}.tar.bz2
TERMUX_PKG_SHA256=49e384aa3b94597d09c61b7accc41d1cf10cb6beea85d4620c80c28d7cdc4d5f
TERMUX_PKG_DEPENDS="python-apt, python-pip"
TERMUX_PKG_DEPENDS="python-apt"
TERMUX_PKG_PLATFORM_INDEPENDENT=true
TERMUX_PKG_BUILD_IN_SRC=true
TERMUX_PKG_AUTO_UPDATE=true
TERMUX_PKG_UPDATE_TAG_TYPE="newest-tag"
TERMUX_PKG_PYTHON_COMMON_DEPS="poetry"
TERMUX_PKG_PYTHON_TARGET_DEPS="anyio, httpx, jsbeautifier, pexpect, python-debian, rich, tomli, typer, typing-extensions"
TERMUX_PKG_PYTHON_RUNTIME_DEPS="nala, python-debian"

termux_step_pre_configure() {
rm -rf nala/__init__.py.orig
Expand Down Expand Up @@ -42,7 +44,5 @@ termux_step_create_debscripts() {
mkdir -p $TERMUX_PREFIX/var/lib/nala
mkdir -p $TERMUX_PREFIX/var/log/nala
mkdir -p $TERMUX_PREFIX/var/lock
echo "Installing dependencies through pip..."
pip3 install nala python-debian
EOF
}
3 changes: 2 additions & 1 deletion packages/python-brotli/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@ TERMUX_PKG_DESCRIPTION="lossless compression algorithm and format (Python bindin
TERMUX_PKG_LICENSE="MIT"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION="1.2.0"
TERMUX_PKG_REVISION=1
TERMUX_PKG_SRCURL=https://github.com/google/brotli/archive/v$TERMUX_PKG_VERSION.tar.gz
TERMUX_PKG_SHA256=816c96e8e8f193b40151dad7e8ff37b1221d019dbcb9c35cd3fadbfe6477dfec
TERMUX_PKG_DEPENDS="python, python-pip"
TERMUX_PKG_DEPENDS="python"
TERMUX_PKG_PYTHON_COMMON_DEPS="wheel"
TERMUX_PKG_BUILD_IN_SRC=true
TERMUX_PKG_AUTO_UPDATE=true
Expand Down
4 changes: 2 additions & 2 deletions packages/python-cmake/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ TERMUX_PKG_DESCRIPTION="Python wrapper for CMake"
TERMUX_PKG_LICENSE="Apache-2.0"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION="4.1.0"
TERMUX_PKG_REVISION=1
TERMUX_PKG_REVISION=2
TERMUX_PKG_SRCURL="https://github.com/scikit-build/cmake-python-distributions/archive/refs/tags/$TERMUX_PKG_VERSION.tar.gz"
TERMUX_PKG_SHA256=95517fc9c5cbd5cdb1be00504361157b70e2e2c69ce912ad83c891ce8e94eb11
TERMUX_PKG_DEPENDS="cmake, cmake-curses-gui, python, python-pip"
TERMUX_PKG_DEPENDS="cmake, cmake-curses-gui, python"
TERMUX_PKG_SETUP_PYTHON=true
TERMUX_PKG_BUILD_IN_SRC=true
TERMUX_PKG_AUTO_UPDATE=true
Expand Down
11 changes: 2 additions & 9 deletions packages/python-cryptography/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@ TERMUX_PKG_LICENSE="Apache-2.0, BSD 3-Clause"
TERMUX_PKG_LICENSE_FILE="LICENSE, LICENSE.APACHE, LICENSE.BSD"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION="46.0.3"
TERMUX_PKG_REVISION=1
TERMUX_PKG_SRCURL=https://github.com/pyca/cryptography/archive/refs/tags/${TERMUX_PKG_VERSION}.tar.gz
TERMUX_PKG_SHA256=b40f9434d14affd208f03f4832aa616cb49e9ce414cb103825a8184eb94002f5
TERMUX_PKG_AUTO_UPDATE=true
TERMUX_PKG_DEPENDS="openssl, python, python-pip"
TERMUX_PKG_DEPENDS="openssl, python"
TERMUX_PKG_BUILD_IN_SRC=true
TERMUX_PKG_UPDATE_TAG_TYPE="newest-tag"
TERMUX_PKG_PYTHON_COMMON_DEPS="wheel, maturin"
Expand All @@ -19,11 +20,3 @@ termux_step_configure() {
export CARGO_BUILD_TARGET=${CARGO_TARGET_NAME}
export PYO3_CROSS_LIB_DIR=$TERMUX_PREFIX/lib
}

termux_step_create_debscripts() {
cat <<- EOF > ./postinst
#!$TERMUX_PREFIX/bin/sh
echo "Installing dependencies through pip..."
pip3 install $TERMUX_PKG_PYTHON_TARGET_DEPS
EOF
}
10 changes: 10 additions & 0 deletions packages/python-cryptography/pyproject.toml.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
--- cryptography-45.0.4/pyproject.toml 2025-06-10 02:53:24.000000000 +0300
+++ cryptography-45.0.4/pyproject.toml.patch 2025-07-02 00:01:20.936683141 +0300
@@ -11,7 +11,6 @@
# well as our build.rs for the rust/cffi bridge.
"setuptools!=74.0.0,!=74.1.0,!=74.1.1,!=74.1.2",
]
-build-backend = "maturin"

[project]
name = "cryptography"
5 changes: 4 additions & 1 deletion packages/python-llvmlite/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ TERMUX_PKG_VERSION=(
"0.44.0"
"15.0.7"
)
TERMUX_PKG_REVISION=1
TERMUX_PKG_SRCURL=(
"https://github.com/numba/llvmlite/archive/refs/tags/v${TERMUX_PKG_VERSION[0]}.tar.gz"
"https://github.com/llvm/llvm-project/releases/download/llvmorg-${TERMUX_PKG_VERSION[1]}/llvm-project-${TERMUX_PKG_VERSION[1]}.src.tar.xz"
Expand All @@ -16,11 +17,12 @@ TERMUX_PKG_SHA256=(
71ec10b77a813e9ceec5f0bdf072a89c838135e6ba182cc1d3a391a59aef37b8
8b5fcb24b4128cf04df1b0b9410ce8b1a729cb3c544e6da885d234280dedeac6
)
TERMUX_PKG_DEPENDS="libc++, libffi, python, python-pip"
TERMUX_PKG_DEPENDS="libc++, libffi, python"
TERMUX_PKG_PYTHON_COMMON_DEPS="wheel"
TERMUX_PKG_BUILD_IN_SRC=true
TERMUX_PKG_AUTO_UPDATE=true
TERMUX_PKG_HOSTBUILD=true
TERMUX_PKG_RM_AFTER_INSTALL="include"

# See http://llvm.org/docs/CMake.html:
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="
Expand Down Expand Up @@ -132,6 +134,7 @@ __llvmlite_build_lib() {
termux_setup_ninja

TERMUX_PKG_EXTRA_CONFIGURE_ARGS="-DLLVM_DIR=$_LLVMLITE_LLVM_INSTALL_DIR/lib/cmake/llvm"
TERMUX_PKG_EXTRA_CONFIGURE_ARGS+=" -DCMAKE_POLICY_VERSION_MINIMUM=3.5"

# Backup dirs and envs
local __old_srcdir="$TERMUX_PKG_SRCDIR"
Expand Down
3 changes: 2 additions & 1 deletion packages/python-lxml/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@ TERMUX_PKG_DESCRIPTION="Python binding for the libxml2 and libxslt libraries"
TERMUX_PKG_LICENSE="MIT"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION="6.0.2"
TERMUX_PKG_REVISION=1
TERMUX_PKG_SRCURL=https://github.com/lxml/lxml/releases/download/lxml-$TERMUX_PKG_VERSION/lxml-$TERMUX_PKG_VERSION.tar.gz
TERMUX_PKG_SHA256=cd79f3367bd74b317dda655dc8fcfa304d9eb6e4fb06b7168c5cf27f96e0cd62
TERMUX_PKG_DEPENDS="libxml2, libxslt, python, python-pip"
TERMUX_PKG_DEPENDS="libxml2, libxslt, python"
TERMUX_PKG_PYTHON_COMMON_DEPS="wheel"
TERMUX_PKG_BUILD_IN_SRC=true
TERMUX_PKG_AUTO_UPDATE=true
Expand Down
14 changes: 3 additions & 11 deletions packages/python-onnxruntime/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ TERMUX_PKG_DESCRIPTION="Cross-platform, high performance ML inferencing and trai
TERMUX_PKG_LICENSE="MIT"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION="1.22.2"
TERMUX_PKG_REVISION=5
TERMUX_PKG_REVISION=6
TERMUX_PKG_SRCURL=git+https://github.com/microsoft/onnxruntime
TERMUX_PKG_DEPENDS="abseil-cpp, libc++, protobuf, libre2, python"
TERMUX_PKG_BUILD_DEPENDS="python-numpy"
Expand All @@ -30,7 +30,7 @@ termux_step_pre_configure() {

TERMUX_PKG_EXTRA_CONFIGURE_ARGS+=" -DPYTHON_EXECUTABLE=$(command -v python3)"
TERMUX_PKG_EXTRA_CONFIGURE_ARGS+=" -DONNX_CUSTOM_PROTOC_EXECUTABLE=$(command -v protoc)"
TERMUX_PKG_EXTRA_CONFIGURE_ARGS+=" -DPython_NumPy_INCLUDE_DIR=$TERMUX_PREFIX/lib/python$TERMUX_PYTHON_VERSION/site-packages/numpy/_core/include"
TERMUX_PKG_EXTRA_CONFIGURE_ARGS+=" -DPython_NumPy_INCLUDE_DIR=$TERMUX_PYTHON_HOME/site-packages/numpy/_core/include"

local TERMUX_PKG_SRCDIR_SAVE="$TERMUX_PKG_SRCDIR"
TERMUX_PKG_SRCDIR+="/cmake"
Expand All @@ -47,13 +47,5 @@ termux_step_make() {
termux_step_make_install() {
local _pyver="${TERMUX_PYTHON_VERSION//./}"
local _wheel="onnxruntime-${TERMUX_PKG_VERSION}-cp${_pyver}-cp${_pyver}-linux_${TERMUX_ARCH}.whl"
pip install --no-deps --prefix="$TERMUX_PREFIX" "$TERMUX_PKG_SRCDIR/dist/${_wheel}"
}

termux_step_create_debscripts() {
cat <<- EOF > ./postinst
#!$TERMUX_PREFIX/bin/sh
echo "Installing dependencies through pip..."
pip3 install onnxruntime
EOF
pip install --force-reinstall --no-deps --prefix="$TERMUX_PREFIX" "$TERMUX_PKG_SRCDIR/dist/${_wheel}"
}
6 changes: 3 additions & 3 deletions packages/python-pycryptodomex/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ TERMUX_PKG_LICENSE="BSD 2-Clause, Public Domain"
TERMUX_PKG_LICENSE_FILE="LICENSE.rst"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION="3.23.0"
TERMUX_PKG_REVISION=1
TERMUX_PKG_REVISION=2
TERMUX_PKG_SRCURL="https://github.com/Legrandin/pycryptodome/archive/refs/tags/v${TERMUX_PKG_VERSION}x.tar.gz"
TERMUX_PKG_SHA256=d3e12d349f62a8c3bd2e7056e2eea925abcfcdd9e2b07bff091bcc05837ac869
TERMUX_PKG_DEPENDS="python, python-pip"
TERMUX_PKG_PYTHON_COMMON_DEPS="wheel"
TERMUX_PKG_DEPENDS="python"
TERMUX_PKG_SETUP_PYTHON=true
TERMUX_PKG_BUILD_IN_SRC=true
TERMUX_PKG_AUTO_UPDATE=true

Expand Down
Loading