这是indexloc提供的服务,不要输入任何密码
Skip to content

tree-wide: port debpython to termux #23652

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
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 @@ -381,6 +381,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.1"
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=b8fbf8f1c19d900b6b32a5a1dc131c5d8665a7c7eea409e9095209100b903839
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}"
}
2 changes: 1 addition & 1 deletion packages/calcurse/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +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.1
TERMUX_PKG_REVISION=1
TERMUX_PKG_REVISION=2
TERMUX_PKG_SRCURL=https://calcurse.org/files/calcurse-$TERMUX_PKG_VERSION.tar.gz
TERMUX_PKG_SHA256=d86bb37014fd69b8d83ccb904ac979c6b8ddf59ee3dbc80f5a274525e4d5830a
TERMUX_PKG_DEPENDS="libandroid-support, ncurses"
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=2
TERMUX_PKG_REVISION=3
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.3"
TERMUX_PKG_REVISION=1
TERMUX_PKG_SRCURL=https://github.com/matplotlib/matplotlib/archive/refs/tags/v${TERMUX_PKG_VERSION}.tar.gz
TERMUX_PKG_SHA256=d581d3cec14478a0347631f93d534c2acf11bf554670eedd0a200f56ec979d12
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
}
4 changes: 2 additions & 2 deletions packages/python-brotli/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ TERMUX_PKG_DESCRIPTION="lossless compression algorithm and format (Python bindin
TERMUX_PKG_LICENSE="MIT"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION=1.1.0
TERMUX_PKG_REVISION=3
TERMUX_PKG_REVISION=4
TERMUX_PKG_SRCURL=https://github.com/google/brotli/archive/v$TERMUX_PKG_VERSION.tar.gz
TERMUX_PKG_SHA256=e720a6ca29428b803f4ad165371771f5398faba397edf6778837a18599ea13ff
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
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="45.0.5"
TERMUX_PKG_REVISION=1
TERMUX_PKG_SRCURL=https://github.com/pyca/cryptography/archive/refs/tags/${TERMUX_PKG_VERSION}.tar.gz
TERMUX_PKG_SHA256=b17510b03a3c1d1be1aa1b26995a0aca0f1c83f1a749b85ea637f2ccc4850960
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"
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.0"
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=032e65120339d44cdc3efc326c9f660f5f7205f3a535c1fdbf898b29ea01fb72
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
13 changes: 3 additions & 10 deletions packages/python-onnxruntime/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +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.1"
TERMUX_PKG_REVISION=1
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 @@ -29,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 @@ -46,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}"
}
5 changes: 3 additions & 2 deletions packages/python-pycryptodomex/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +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_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
10 changes: 6 additions & 4 deletions packages/python-tflite-runtime/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,22 @@ TERMUX_PKG_DESCRIPTION="TensorFlow Lite Python bindings"
TERMUX_PKG_LICENSE="Apache-2.0"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION="2.19.0"
TERMUX_PKG_REVISION=1
TERMUX_PKG_SRCURL=git+https://github.com/tensorflow/tensorflow
TERMUX_PKG_AUTO_UPDATE=true
TERMUX_PKG_DEPENDS="python, python-numpy, python-pip"
TERMUX_PKG_DEPENDS="python, python-numpy"
TERMUX_PKG_UPDATE_TAG_TYPE="latest-release-tag"
TERMUX_PKG_PYTHON_COMMON_DEPS="setuptools, wheel, pybind11"
TERMUX_PKG_HOSTBUILD=true
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="
-DCMAKE_POLICY_VERSION_MINIMUM=3.5
-DTFLITE_HOST_TOOLS_DIR=$TERMUX_PKG_HOSTBUILD_DIR
"

termux_step_host_build() {
termux_setup_cmake

cmake "$TERMUX_PKG_SRCDIR"/tensorflow/lite
cmake "$TERMUX_PKG_SRCDIR"/tensorflow/lite -DCMAKE_POLICY_VERSION_MINIMUM=3.5
cmake --build . --verbose -j $TERMUX_PKG_MAKE_PROCESSES -t flatbuffers-flatc
}

Expand All @@ -34,7 +36,7 @@ termux_step_pre_configure() {
local BUILD_DIR="$TFLITE_BUILD_DIR"
local PYTHON="$(command -v python)"
local PYBIND11_INCLUDE=$($PYTHON -c "import pybind11; print (pybind11.get_include())")
CPPFLAGS+=" -I$PYTHON_SITE_PKG/numpy/_core/include"
CPPFLAGS+=" -I$TERMUX_PYTHON_HOME/site-packages/numpy/_core/include"
CPPFLAGS+=" -I$PYBIND11_INCLUDE"
CPPFLAGS+=" -I$TERMUX_PREFIX/include/python$TERMUX_PYTHON_VERSION"

Expand Down Expand Up @@ -74,5 +76,5 @@ termux_step_make() {
termux_step_make_install() {
local _pyver="${TERMUX_PYTHON_VERSION//./}"
local _wheel="tflite_runtime-${TERMUX_PKG_VERSION}-cp${_pyver}-cp${_pyver}-linux_${TERMUX_ARCH}.whl"
pip install --no-deps --prefix="$TERMUX_PREFIX" "$TFLITE_BUILD_DIR/dist/${_wheel}"
pip install --force-reinstall --no-deps --prefix="$TERMUX_PREFIX" "$TFLITE_BUILD_DIR/dist/${_wheel}"
}
12 changes: 2 additions & 10 deletions packages/python-tldp/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,13 @@ TERMUX_PKG_DESCRIPTION="Tools for publishing from TLDP sources"
TERMUX_PKG_LICENSE="MIT"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION=0.7.5
TERMUX_PKG_REVISION=5
TERMUX_PKG_REVISION=6
TERMUX_PKG_SRCURL=https://github.com/tLDP/python-tldp/archive/refs/tags/tldp-${TERMUX_PKG_VERSION}.tar.gz
TERMUX_PKG_SHA256=bae313095b877b4272ddccaabd70efcbc526e2c1036f63fb665ec7ce10c94cde
TERMUX_PKG_AUTO_UPDATE=true
TERMUX_PKG_UPDATE_METHOD=repology
TERMUX_PKG_DEPENDS="python, python-pip"
TERMUX_PKG_DEPENDS="python"
TERMUX_PKG_PYTHON_COMMON_DEPS="wheel"
TERMUX_PKG_PYTHON_TARGET_DEPS="networkx, nose"
TERMUX_PKG_PLATFORM_INDEPENDENT=true
TERMUX_PKG_BUILD_IN_SRC=true

termux_step_create_debscripts() {
cat <<- EOF > ./postinst
#!$TERMUX_PREFIX/bin/sh
echo "Installing dependencies through pip..."
pip3 install ${TERMUX_PKG_PYTHON_TARGET_DEPS//, / }
EOF
}
Loading