Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
58 commits
Select commit Hold shift + click to select a range
c4f4b9e
scripts(free-space.sh): remove more stuff from runner
thunder-coding Feb 25, 2026
7fa8ab4
ci: also clean docker compressed archives
thunder-coding Feb 25, 2026
bf8d7d2
ci(packages): do all builds in docker
thunder-coding Feb 25, 2026
f1cba27
scripts: allow more flexible configuration of docker container
thunder-coding Feb 26, 2026
07815b5
ci(packages): do not prune docker
thunder-coding Feb 26, 2026
9d70f15
ci(packages): split docker image building to separate step
thunder-coding Feb 26, 2026
d6f2fd1
ci: move clean compressed docker images to free-space.sh
thunder-coding Feb 26, 2026
1244081
scripts(run-docker.sh): add short option to mount /data and
thunder-coding Feb 27, 2026
1597725
chore,ci(packages): Allow forcing free space
thunder-coding Mar 1, 2026
6055b64
fix,scripts(run-docker.sh): improved command line argument parsing
thunder-coding Mar 1, 2026
51e6a83
chore,scripts(run-docker.sh): limit line width to 80 for usage and get
thunder-coding Mar 1, 2026
f109436
fixup! fix,scripts(run-docker.sh): improved command line argument par…
thunder-coding Mar 1, 2026
81b7a8c
fix,scripts(run-docker.sh): do not bail out on first flag
thunder-coding Mar 1, 2026
9ffd54f
fixup! scripts: allow more flexible configuration of docker container
thunder-coding Mar 1, 2026
7f6c357
fixup! scripts(free-space.sh): remove more stuff from runner
thunder-coding Mar 1, 2026
ce58061
ci: use fuse-overlayfs to reduce runtime storage used by builder
thunder-coding Feb 23, 2026
59acf32
chore(CODEOWNERS): assign for docker security profiles
thunder-coding Feb 23, 2026
f01340b
chore,ci: make apparmor optional
thunder-coding Feb 24, 2026
2e02fc5
scripts(run-docker.sh): always use sudo with APPARMOR_PARSER
thunder-coding Feb 24, 2026
37bebda
scripts: more apparmor hardening
thunder-coding Feb 25, 2026
4f27ace
fix,scripts(run-docker.sh): Properly handle the case when apparmor is
thunder-coding Feb 28, 2026
d64d636
fix,scripts(run-docker.sh): only show AppArmor log when using apparmor
thunder-coding Mar 1, 2026
5cd57bd
bump(main/python): 3.13.11
thunder-coding Dec 25, 2025
649ef3c
fix(main/python): unexpanded autotools variable in pkgconfig
thunder-coding Jan 9, 2026
4dfc034
fix(main/python): build without -Wl,--as-needed
thunder-coding Jan 12, 2026
6737c81
chore(main/python): build with parallelism [[TESTING REQUIRED]]
thunder-coding Dec 25, 2025
0696447
scripts(termux_setup_build_python): build-python for cross compilation
thunder-coding Dec 26, 2025
1b89be0
scripts(termux_setup_python_pip): use build python and add minor
thunder-coding Dec 26, 2025
5588148
rebuild(main/python-pip): with python3.13
thunder-coding Dec 26, 2025
de8d0da
scripts(termux_setup_meson): use ubuntu's packaged python
thunder-coding Dec 27, 2025
2a5e662
scripts(termux_setup_python_pip): fix install shebang with crossenv
thunder-coding Dec 27, 2025
e2c69f1
chore(main/python): take up maintainership
thunder-coding Dec 28, 2025
59354bd
scripts(termux_setup_python_pip): crossenv 1.6.1
thunder-coding Dec 28, 2025
6b20e1c
pip hardcode api level instead of getting it from runtime
thunder-coding Jan 8, 2026
243257b
fix(main/python): ctypes.util.find_library on android
thunder-coding Jan 10, 2026
c936e70
scripts(termux_setup_python_pip): allow installing wheels without and…
thunder-coding Jan 12, 2026
2f695d8
fix(main/python): module linking to libpython3.so
thunder-coding Jan 19, 2026
4b7a2d2
fix(main/python): hardcode android api level than detecting at runtime
thunder-coding Jan 25, 2026
f932149
bump(main/python): 3.13.12
thunder-coding Feb 13, 2026
04a0338
chore(main/python): allow on-device builds
thunder-coding Feb 13, 2026
adb15b9
chore(main/python): only disable getlogin_r for API level < 28
thunder-coding Mar 1, 2026
5394c3d
rebuild(main/manim): with python 3.13
thunder-coding Jan 24, 2026
c8c85fa
rebuild(main/matplotlib): with python 3.13
thunder-coding Jan 24, 2026
0e99acc
rebuild(main/python-pillow): with python 3.13
thunder-coding Jan 19, 2026
aea1ab4
rebuild(main/python-torch): with python 3.13
thunder-coding Jan 23, 2026
88aa6be
rebuild(main/python-torchaudio): with python 3.13
thunder-coding Jan 24, 2026
eadbd40
rebuild(main/python-torchcodec): with python 3.13
thunder-coding Jan 24, 2026
cdc934d
rebuild(main/python-torchvision): with python 3.13
thunder-coding Jan 24, 2026
4818085
rebuild(main/boost): with python 3.13
thunder-coding Jan 12, 2026
999284b
rebuild(main/libxml2): with python 3.13
thunder-coding Jan 9, 2026
9e2723d
rebuild(main/pycairo): with python 3.13
thunder-coding Jan 12, 2026
d8587bd
rebuild(main/python-contourpy): with python 3.13
thunder-coding Jan 23, 2026
bd867ab
rebuild(main/python-lxml): with python 3.13
thunder-coding Jan 23, 2026
2a55fee
rebuild(main/python-numpy): with python 3.13
thunder-coding Jan 12, 2026
0f8c5de
rebuild(main/python-scipy): with python 3.13
thunder-coding Jan 23, 2026
65955aa
rebuild(main/python-skia-pathops): with python 3.13
thunder-coding Jan 12, 2026
611aef0
rebuild(main/xcb-proto): with python3.13
thunder-coding Dec 26, 2025
6519baf
Python 3.13 rebuild 2
thunder-coding Mar 1, 2026
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
6 changes: 4 additions & 2 deletions .github/workflows/package_updates.yml
Original file line number Diff line number Diff line change
Expand Up @@ -113,13 +113,15 @@ jobs:
size: 16G
priority: 100
device_name: /dev/zram0
- name: Load Docker image
run: |
./scripts/run-docker.sh echo ""
- name: Free additional disk space
run: CLEAN_DOCKER_IMAGES=false ./scripts/free-space.sh
run: ./scripts/free-space.sh
- name: Process package updates
env:
GITHUB_TOKEN: ${{ secrets.TERMUXBOT2_TOKEN }}
BUILD_PACKAGES: "true"
TERMUX_DOCKER__CONTAINER_EXEC_COMMAND__PRE_CHECK_IF_WILL_BUILD_PACKAGES: "true"
CREATE_ISSUE: "true"
GIT_COMMIT_PACKAGES: "true"
GIT_PUSH_PACKAGES: "true"
Expand Down
66 changes: 34 additions & 32 deletions .github/workflows/packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ on:
packages:
description: "A space-separated names of packages selected for rebuilding"
required: true
free-space:
description: "Free space even if not building large package (useful when building a large number of packages)"
type: boolean
default: false

permissions: {} # none

Expand Down Expand Up @@ -98,7 +102,6 @@ jobs:
# Forces CI to cancel current build with status 'passed'
if grep -qiP '^\s*%ci:no-build\s*$' <(git log --format="%B" -n 1 --no-merges "HEAD"); then
tar cf artifacts/debs-${{ matrix.target_arch }}.tar debs
echo "docker-build=true" >> $GITHUB_OUTPUT
echo "[!] Force exiting as tag '%ci:no-build' was applied to HEAD commit message."
exit 0
fi
Expand Down Expand Up @@ -186,31 +189,33 @@ jobs:

echo "packages: ${packages[*]}"

docker='true'
free_space='false'
if [ "${{ github.event_name }}" == "workflow_dispatch" ]; then
free_space=${{ github.event.inputs.free-space }}
else
if grep -qiP '^\s*%ci:free-disk\s*$' <(git log --format="%B" -n 1 --no-merges "HEAD"); then
free_space=true
fi
fi
if [[ "${#packages[@]}" -gt 0 ]]; then
for pkg in "${packages[@]}"; do
if grep -qFx "$pkg" ./scripts/big-pkgs.list; then
docker='false'
free_space='true'
break
fi
done
fi
echo "free-space=$free_space" >> $GITHUB_OUTPUT

echo "docker-build=$docker" >> $GITHUB_OUTPUT
needs_docker_build=false
if [ "${{ github.event_name }}" != "workflow_dispatch" ]; then
# Build local Docker image if setup scripts were changed.
# Useful for pull requests submitting changes for both build environment and packages.
if grep -qP '^scripts/(Dockerfile|properties\.sh|setup-android-sdk\.sh|setup-ubuntu\.sh)$' <<< "$CHANGED_FILES"; then
echo "Detected changes for environment setup scripts. Building custom Docker image now."
if [ $docker == 'false' ]; then
echo "Skipping due to building large packages."
exit 0
fi
cd ./scripts
docker build -t ghcr.io/termux/package-builder:latest .
cd ..
needs_docker_build=true
fi
fi
echo "needs-docker-build=$needs_docker_build" >> $GITHUB_OUTPUT

- name: Lint packages
run: |
Expand All @@ -235,22 +240,24 @@ jobs:
priority: 100
device_name: /dev/zram0

- name: Build docker image
if: ${{ steps.build-info.outputs.needs-docker-build == 'true' }}
run: |
docker build -t ghcr.io/termux/package-builder:latest scripts/
docker buildx prune -af

- name: Load Docker image
if: ${{ steps.build-info.outputs.free-space == 'true' && steps.build-info.outputs.skip-building != 'true' }}
run: |
./scripts/run-docker.sh echo ""

- name: Free additional disk space (if needed)
if: ${{ steps.build-info.outputs.docker-build == 'false' && steps.build-info.outputs.skip-building != 'true' }}
if: ${{ steps.build-info.outputs.free-space == 'true' && steps.build-info.outputs.skip-building != 'true' }}
run: |
./scripts/setup-ubuntu.sh
# need to unset these for setup-android-sdk.sh.
unset NDK ANDROID_HOME
./scripts/setup-android-sdk.sh
rm -f ${HOME}/lib/ndk-*.zip ${HOME}/lib/sdk-*.zip
sudo apt install ninja-build
./scripts/free-space.sh

- name: Build packages
if: ${{ steps.build-info.outputs.skip-building != 'true' }}
env:
DOCKER_BUILD: ${{ steps.build-info.outputs.docker-build }}
TERMUX_DOCKER__CONTAINER_EXEC_COMMAND__PRE_CHECK_IF_WILL_BUILD_PACKAGES: "true"
run: |
declare -a packages=()
for repo_path in $(jq --raw-output 'del(.pkg_format) | keys | .[]' repo.json); do
Expand All @@ -263,16 +270,7 @@ jobs:
echo "packages: ${packages[*]}"

if [[ "${#packages[@]}" -gt 0 ]]; then
if [ "$DOCKER_BUILD" == 'false' ]; then
# these need to be unset a second time again for ./build-package.sh
# when it is run outside of Docker, because GitHub Actions does not
# support permanently unsetting variables at time of writing.
# https://github.com/actions/runner/issues/1126
unset NDK ANDROID_HOME
./build-package.sh -I -C -a "${{ matrix.target_arch }}" "${packages[@]}"
else
./scripts/run-docker.sh ./build-package.sh -I -C -a "${{ matrix.target_arch }}" "${packages[@]}"
fi
./scripts/run-docker.sh -d ./build-package.sh -I -C -a "${{ matrix.target_arch }}" "${packages[@]}"
fi

- name: Generate build artifacts
Expand Down Expand Up @@ -317,6 +315,10 @@ jobs:
with:
name: debs-${{ matrix.target_arch }}-${{ github.sha }}
path: ./artifacts
- name: AppArmor Logs
if: always()
run: |
sudo dmesg | grep apparmor

test-buildorder-random:
permissions:
Expand Down
4 changes: 4 additions & 0 deletions CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@
/scripts/ @Grimler91 @thunder-coding
/repo.json @Grimler91 @thunder-coding

# Docker security profiles
/scripts/profile.json @thunder-coding @licy183
/scripts/*.apparmor @thunder-coding

# Build script linter
/scripts/lint-packages.sh @TomJo2000

Expand Down
4 changes: 4 additions & 0 deletions build-package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,10 @@ source "$TERMUX_SCRIPTDIR/scripts/build/setup/termux_setup_ldc.sh"
# shellcheck source=scripts/build/setup/termux_setup_no_integrated_as.sh
source "$TERMUX_SCRIPTDIR/scripts/build/setup/termux_setup_no_integrated_as.sh"

# Utility function for setting up build-python for cross-compilation of Python and crossenv
# shellcheck source=scripts/build/setup/termux_setup_build_python.sh
source "$TERMUX_SCRIPTDIR/scripts/build/setup/termux_setup_build_python.sh"

# Utility function for python packages to setup a python.
# shellcheck source=scripts/build/setup/termux_setup_python_pip.sh
source "$TERMUX_SCRIPTDIR/scripts/build/setup/termux_setup_python_pip.sh"
Expand Down
13 changes: 12 additions & 1 deletion clean.sh
Original file line number Diff line number Diff line change
Expand Up @@ -93,5 +93,16 @@ fi
rm -Rf "/data/data/.built-packages"
fi

rm -Rf "$TERMUX_TOPDIR"
# unmount overlayfs before we remove the parent directory
[ -d "$TERMUX_TOPDIR" ] && for dir in $(find "$TERMUX_TOPDIR" -type d); do
if mountpoint -q "$dir"; then
umount "$dir"
fi
done

# We can't use rm -Rf "$TERMUX_TOPDIR" in case the "$TERMUX_TOPDIR" is mounted as a Docker volume
if [ -d "$TERMUX_TOPDIR" ]; then
find "$TERMUX_TOPDIR" -type f,l -delete
find "$TERMUX_TOPDIR" -type d ! -path "$TERMUX_TOPDIR" -delete
fi
} 5< "$TERMUX_BUILD_LOCK_FILE"
4 changes: 4 additions & 0 deletions packages/boost/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,15 @@ TERMUX_PKG_MAINTAINER="@termux"
# Never forget to always bump revision of reverse dependencies and rebuild them
# when bumping version.
TERMUX_PKG_VERSION="1:1.90.0"
TERMUX_PKG_REVISION=1
_VERSION="${TERMUX_PKG_VERSION:2}"
TERMUX_PKG_SRCURL="https://archives.boost.io/release/${_VERSION}/source/boost_${_VERSION//./_}.tar.bz2"
TERMUX_PKG_SHA256=49551aff3b22cbc5c5a9ed3dbc92f0e23ea50a0f7325b0d198b705e8ee3fc305
TERMUX_PKG_AUTO_UPDATE=false
TERMUX_PKG_DEPENDS="libc++, libbz2, libiconv, liblzma, zlib, libandroid-wordexp"
# Although python is a build dependency, boost needs to be rebuilt when major
# versions of python are updated to ensure that CMake's find_package detects
# Boost.Python as python version is hardcoded into it
TERMUX_PKG_BUILD_DEPENDS="python"
TERMUX_PKG_BREAKS="libboost-python (<= 1.65.1-2), boost-dev"
TERMUX_PKG_REPLACES="libboost-python (<= 1.65.1-2), boost-dev"
Expand Down
2 changes: 1 addition & 1 deletion packages/libxml2/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ TERMUX_PKG_DESCRIPTION="Library for parsing XML documents"
TERMUX_PKG_LICENSE="MIT"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION="2.15.1"
TERMUX_PKG_REVISION=1
TERMUX_PKG_REVISION=2
TERMUX_PKG_SRCURL=https://download.gnome.org/sources/libxml2/${TERMUX_PKG_VERSION%.*}/libxml2-${TERMUX_PKG_VERSION}.tar.xz
TERMUX_PKG_SHA256=c008bac08fd5c7b4a87f7b8a71f283fa581d80d80ff8d2efd3b26224c39bc54c
TERMUX_PKG_AUTO_UPDATE=true
Expand Down
1 change: 1 addition & 0 deletions packages/manim/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +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.20.1"
TERMUX_PKG_REVISION=1
TERMUX_PKG_SRCURL="https://github.com/ManimCommunity/manim/archive/refs/tags/v$TERMUX_PKG_VERSION.tar.gz"
TERMUX_PKG_SHA256=384791b838ae5a6f408dcf4eb86e7fe04957fd2910fb26038690457a44204caf
TERMUX_PKG_DEPENDS="cmake, ffmpeg, libcairo, pango, xorgproto, python-numpy, python-pillow, python-pip, pycairo, python-scipy, python-skia-pathops"
Expand Down
4 changes: 2 additions & 2 deletions packages/matplotlib/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ LICENSE/LICENSE_STIX
LICENSE/LICENSE_YORICK"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION="3.10.8"
TERMUX_PKG_REVISION=1
TERMUX_PKG_REVISION=2
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
Expand Down Expand Up @@ -56,6 +56,6 @@ termux_step_make() {

termux_step_make_install() {
local _pyv="${TERMUX_PYTHON_VERSION/./}"
local _whl="matplotlib-$TERMUX_PKG_VERSION-cp$_pyv-cp$_pyv-linux_$TERMUX_ARCH.whl"
local _whl="matplotlib-$TERMUX_PKG_VERSION-cp$_pyv-cp$_pyv-android_$TERMUX_ARCH.whl"
pip install --no-deps --prefix=$TERMUX_PREFIX --force-reinstall $TERMUX_PKG_SRCDIR/dist/$_whl
}
1 change: 1 addition & 0 deletions packages/pycairo/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ TERMUX_PKG_DESCRIPTION="Python bindings for the cairo graphics library"
TERMUX_PKG_LICENSE="LGPL-2.1"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION="1.29.0"
TERMUX_PKG_REVISION=1
TERMUX_PKG_SRCURL=https://github.com/pygobject/pycairo/releases/download/v${TERMUX_PKG_VERSION}/pycairo-${TERMUX_PKG_VERSION}.tar.gz
TERMUX_PKG_SHA256=f3f7fde97325cae80224c09f12564ef58d0d0f655da0e3b040f5807bd5bd3142
TERMUX_PKG_AUTO_UPDATE=true
Expand Down
4 changes: 2 additions & 2 deletions packages/python-contourpy/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ TERMUX_PKG_DESCRIPTION="Python library for calculating contours in 2D quadrilate
TERMUX_PKG_LICENSE="BSD 3-Clause"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION="1.3.3"
TERMUX_PKG_REVISION=2
TERMUX_PKG_REVISION=3
TERMUX_PKG_SRCURL=git+https://github.com/contourpy/contourpy
TERMUX_PKG_DEPENDS="python, python-numpy, python-pip"
TERMUX_PKG_BUILD_DEPENDS="pybind11"
Expand Down Expand Up @@ -37,6 +37,6 @@ termux_step_make() {

termux_step_make_install() {
local _pyv="${TERMUX_PYTHON_VERSION/./}"
local _whl="contourpy-$TERMUX_PKG_VERSION-cp$_pyv-cp$_pyv-linux_$TERMUX_ARCH.whl"
local _whl="contourpy-$TERMUX_PKG_VERSION-cp$_pyv-cp$_pyv-android_$TERMUX_ARCH.whl"
pip install --force-reinstall --no-deps --prefix=$TERMUX_PREFIX $TERMUX_PKG_SRCDIR/dist/$_whl
}
1 change: 1 addition & 0 deletions packages/python-lxml/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ 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"
Expand Down
4 changes: 2 additions & 2 deletions packages/python-numpy/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ TERMUX_PKG_LICENSE="BSD 3-Clause"
TERMUX_PKG_MAINTAINER="@termux"
# Revbump revdeps after updating
TERMUX_PKG_VERSION="2.2.5"
TERMUX_PKG_REVISION=3
TERMUX_PKG_REVISION=4
TERMUX_PKG_SRCURL=git+https://github.com/numpy/numpy
TERMUX_PKG_DEPENDS="libc++, libopenblas, python"
TERMUX_PKG_AUTO_UPDATE=false
Expand Down Expand Up @@ -73,6 +73,6 @@ termux_step_make() {

termux_step_make_install() {
local _pyv="${TERMUX_PYTHON_VERSION/./}"
local _whl="numpy-$TERMUX_PKG_VERSION-cp$_pyv-cp$_pyv-linux_$TERMUX_ARCH.whl"
local _whl="numpy-$TERMUX_PKG_VERSION-cp$_pyv-cp$_pyv-android_$TERMUX_ARCH.whl"
pip install --no-deps --prefix=$TERMUX_PREFIX --force-reinstall $TERMUX_PKG_SRCDIR/dist/$_whl
}
1 change: 1 addition & 0 deletions packages/python-pillow/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ TERMUX_PKG_DESCRIPTION="Python Imaging Library"
TERMUX_PKG_LICENSE="custom"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION="12.1.1"
TERMUX_PKG_REVISION=1
TERMUX_PKG_SRCURL=https://github.com/python-pillow/Pillow/archive/refs/tags/${TERMUX_PKG_VERSION}.tar.gz
TERMUX_PKG_SHA256=d29fefc0ba637833b59cafc7649e1237186741c31b210178b0a4e9cd9e01ffdf
TERMUX_PKG_AUTO_UPDATE=true
Expand Down
14 changes: 14 additions & 0 deletions packages/python-pip/android-api-abi.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
Allow installing without specifying abi version. Needed for crossenv specifically.
May not be needed for on-device, but let's just keep it just in case in case there is some psycho who is doing this already
diff --git a/src/pip/_vendor/packaging/tags.py b/src/pip/_vendor/packaging/tags.py
index 8522f59c4..ef55342fb 100644
--- a/src/pip/_vendor/packaging/tags.py
+++ b/src/pip/_vendor/packaging/tags.py
@@ -563,6 +563,7 @@ def android_platforms(
# without major patching. Yield every API level from the maximum down to the
# minimum, inclusive.
min_api_level = 16
+ yield f"android_{abi}"
for ver in range(api_level, min_api_level - 1, -1):
yield f"android_{ver}_{abi}"

3 changes: 2 additions & 1 deletion packages/python-scipy/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ TERMUX_PKG_DESCRIPTION="Fundamental algorithms for scientific computing in Pytho
TERMUX_PKG_LICENSE="BSD 3-Clause"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION="1.17.1"
TERMUX_PKG_REVISION=1
TERMUX_PKG_SRCURL=git+https://github.com/scipy/scipy
TERMUX_PKG_DEPENDS="libc++, libopenblas, python, python-numpy, python-pip"
TERMUX_PKG_BUILD_DEPENDS="python-numpy-static, pybind11"
Expand Down Expand Up @@ -64,6 +65,6 @@ termux_step_make() {

termux_step_make_install() {
local _pyv="${TERMUX_PYTHON_VERSION/./}"
local _whl="scipy-$TERMUX_PKG_VERSION-cp$_pyv-cp$_pyv-linux_$TERMUX_ARCH.whl"
local _whl="scipy-$TERMUX_PKG_VERSION-cp$_pyv-cp$_pyv-android_$TERMUX_ARCH.whl"
pip install --force-reinstall --no-deps --prefix=$TERMUX_PREFIX $TERMUX_PKG_SRCDIR/dist/$_whl
}
1 change: 1 addition & 0 deletions packages/python-skia-pathops/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ TERMUX_PKG_DESCRIPTION="Python bindings for the Skia library's Path Ops"
TERMUX_PKG_LICENSE="BSD 3-Clause"
TERMUX_PKG_MAINTAINER="Nguyen Khanh @nguynkhn"
TERMUX_PKG_VERSION="0.9.2"
TERMUX_PKG_REVISION=1
TERMUX_PKG_SRCURL=https://github.com/fonttools/skia-pathops/archive/refs/tags/v${TERMUX_PKG_VERSION}.tar.gz
TERMUX_PKG_SHA256=4f696a24c83e5bf93b809cbe2a01e55810ec3b05bd88b54a0fdbdc16e2d40eaa
TERMUX_PKG_DEPENDS="libc++, python, python-pip"
Expand Down
1 change: 1 addition & 0 deletions packages/python-torch/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ TERMUX_PKG_DESCRIPTION="Tensors and Dynamic neural networks in Python"
TERMUX_PKG_LICENSE="BSD 3-Clause"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION="2.10.0"
TERMUX_PKG_REVISION=1
TERMUX_PKG_SRCURL=git+https://github.com/pytorch/pytorch
TERMUX_PKG_UPDATE_TAG_TYPE="latest-release-tag"
TERMUX_PKG_DEPENDS="abseil-cpp, libc++, libopenblas, libprotobuf, python, python-numpy, python-pip"
Expand Down
1 change: 1 addition & 0 deletions packages/python-torchaudio/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ TERMUX_PKG_DESCRIPTION="Data manipulation and transformation for audio signal pr
TERMUX_PKG_LICENSE="BSD 2-Clause"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION="2.10.0"
TERMUX_PKG_REVISION=1
TERMUX_PKG_SRCURL="https://github.com/pytorch/audio/archive/refs/tags/v${TERMUX_PKG_VERSION}.tar.gz"
TERMUX_PKG_SHA256=d0d0d9575025eb85150356a0b0de75b553484838006af17a62470b52d59845d1
TERMUX_PKG_DEPENDS="libc++, python, python-pip, python-torch, python-torchcodec"
Expand Down
1 change: 1 addition & 0 deletions packages/python-torchcodec/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ TERMUX_PKG_DESCRIPTION="PyTorch media decoding and encoding"
TERMUX_PKG_LICENSE="BSD 3-Clause"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION="0.10.0"
TERMUX_PKG_REVISION=1
TERMUX_PKG_SRCURL="https://github.com/pytorch/torchcodec/archive/refs/tags/v${TERMUX_PKG_VERSION}.tar.gz"
TERMUX_PKG_SHA256=a970d3dd51f65ee12898397e54079bcd19c9d498cddfb661379721cfcc2c36e2
TERMUX_PKG_DEPENDS="ffmpeg, google-glog, libc++, python, python-pip, python-torch"
Expand Down
1 change: 1 addition & 0 deletions packages/python-torchvision/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ TERMUX_PKG_DESCRIPTION="Datasets, Transforms and Models specific to Computer Vis
TERMUX_PKG_LICENSE="BSD 3-Clause"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION="0.25.0"
TERMUX_PKG_REVISION=1
TERMUX_PKG_SRCURL="https://github.com/pytorch/vision/archive/refs/tags/v${TERMUX_PKG_VERSION}.tar.gz"
TERMUX_PKG_SHA256=a7ac1b3ab489d71f6e27edfad1e27616e4b8a9b1517e60fce4a950600d3510e8
TERMUX_PKG_DEPENDS="libc++, ffmpeg, python, python-numpy, python-pillow, python-pip, python-torch, libjpeg-turbo, libpng, libwebp, zlib"
Expand Down
23 changes: 0 additions & 23 deletions packages/python/0001-fix-hardcoded-paths.patch
Original file line number Diff line number Diff line change
@@ -1,26 +1,3 @@
--- a/Lib/aifc.py
+++ b/Lib/aifc.py
@@ -920,7 +920,7 @@
if __name__ == '__main__':
import sys
if not sys.argv[1:]:
- sys.argv.append('/usr/demos/data/audio/bach.aiff')
+ sys.argv.append('@TERMUX_PREFIX@/demos/data/audio/bach.aiff')
fn = sys.argv[1]
with open(fn, 'r') as f:
print("Reading", fn)
--- a/Lib/mailcap.py
+++ b/Lib/mailcap.py
@@ -55,7 +55,8 @@
# Don't bother with getpwuid()
home = '.' # Last resort
mailcaps = [home + '/.mailcap', '/etc/mailcap',
- '/usr/etc/mailcap', '/usr/local/etc/mailcap']
+ '/usr/etc/mailcap', '/usr/local/etc/mailcap',
+ '@TERMUX_PREFIX@/etc/mailcap']
return mailcaps


--- a/Lib/mimetypes.py
+++ b/Lib/mimetypes.py
@@ -49,6 +49,7 @@
Expand Down
Loading