|
| 1 | +TERMUX_PKG_HOMEPAGE=https://github.com/pyca/cryptography |
| 2 | +TERMUX_PKG_DESCRIPTION="Provides cryptographic recipes and primitives to Python developers" |
| 3 | +TERMUX_PKG_LICENSE="Apache-2.0, BSD 3-Clause" |
| 4 | +TERMUX_PKG_LICENSE_FILE="LICENSE, LICENSE.APACHE, LICENSE.BSD" |
| 5 | +TERMUX_PKG_MAINTAINER="@termux" |
| 6 | +TERMUX_PKG_VERSION="42.0.8" |
| 7 | +TERMUX_PKG_SRCURL=https://github.com/pyca/cryptography/archive/refs/tags/${TERMUX_PKG_VERSION}.tar.gz |
| 8 | +TERMUX_PKG_SHA256=38ee4ce0804e4003e3093db8342cd7e6ee65614c8bbf70c98f1716e0f33709ed |
| 9 | +TERMUX_PKG_AUTO_UPDATE=false |
| 10 | +TERMUX_PKG_DEPENDS="openssl, python, python-pip" |
| 11 | +TERMUX_PKG_BUILD_IN_SRC=true |
| 12 | +TERMUX_PKG_UPDATE_TAG_TYPE="newest-tag" |
| 13 | +TERMUX_PKG_PYTHON_COMMON_DEPS="wheel, cffi, setuptools-rust" |
| 14 | +TERMUX_PKG_PYTHON_BUILD_DEPS="maturin" |
| 15 | + |
| 16 | +TERMUX_PYTHON_VERSION=3.12 |
| 17 | +TERMUX_PYTHON_HOME=$TERMUX_PREFIX/lib/python${TERMUX_PYTHON_VERSION} |
| 18 | +TERMUX_PYTHON_CROSSENV_PREFIX=$TERMUX_PKG_BUILDDIR/python${TERMUX_PYTHON_VERSION/./}-crossenv-prefix-$TERMUX_ARCH |
| 19 | +TUR_AUTO_AUDIT_WHEEL=true |
| 20 | +TUR_AUDIT_WHEEL_NO_LIBS=true |
| 21 | +TUR_AUTO_BUILD_WHEEL=false |
| 22 | +TUR_WHEEL_DIR="wheels/" |
| 23 | + |
| 24 | +source $TERMUX_SCRIPTDIR/common-files/tur_build_wheel.sh |
| 25 | + |
| 26 | +termux_step_configure() { |
| 27 | + termux_setup_rust |
| 28 | + export CARGO_BUILD_TARGET=${CARGO_TARGET_NAME} |
| 29 | + export PYO3_CROSS_PYTHON_VERSION=$TERMUX_PYTHON_VERSION |
| 30 | + export PYO3_CROSS_LIB_DIR=$TERMUX_PREFIX/lib |
| 31 | + export PYTHONPATH=$TERMUX_PREFIX/lib/python${TERMUX_PYTHON_VERSION}/site-packages |
| 32 | +} |
| 33 | + |
| 34 | +termux_step_post_make_install() { |
| 35 | + pip wheel . |
| 36 | + |
| 37 | + mkdir -p wheels |
| 38 | + local _pyver="${TERMUX_PYTHON_VERSION/./}" |
| 39 | + mv cryptography-$TERMUX_PKG_VERSION-cp$_pyver-cp$_pyver-linux_$TERMUX_ARCH.whl ./wheels/ |
| 40 | +} |
0 commit comments