diff --git a/tur-pypi-312/python3.12-cryptography/build.sh b/tur-pypi-312/python3.12-cryptography/build.sh new file mode 100644 index 0000000..7c19727 --- /dev/null +++ b/tur-pypi-312/python3.12-cryptography/build.sh @@ -0,0 +1,40 @@ +TERMUX_PKG_HOMEPAGE=https://github.com/pyca/cryptography +TERMUX_PKG_DESCRIPTION="Provides cryptographic recipes and primitives to Python developers" +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="42.0.8" +TERMUX_PKG_SRCURL=https://github.com/pyca/cryptography/archive/refs/tags/${TERMUX_PKG_VERSION}.tar.gz +TERMUX_PKG_SHA256=38ee4ce0804e4003e3093db8342cd7e6ee65614c8bbf70c98f1716e0f33709ed +TERMUX_PKG_AUTO_UPDATE=false +TERMUX_PKG_DEPENDS="openssl, python, python-pip" +TERMUX_PKG_BUILD_IN_SRC=true +TERMUX_PKG_UPDATE_TAG_TYPE="newest-tag" +TERMUX_PKG_PYTHON_COMMON_DEPS="wheel, cffi, setuptools-rust" +TERMUX_PKG_PYTHON_BUILD_DEPS="maturin" + +TERMUX_PYTHON_VERSION=3.12 +TERMUX_PYTHON_HOME=$TERMUX_PREFIX/lib/python${TERMUX_PYTHON_VERSION} +TERMUX_PYTHON_CROSSENV_PREFIX=$TERMUX_PKG_BUILDDIR/python${TERMUX_PYTHON_VERSION/./}-crossenv-prefix-$TERMUX_ARCH +TUR_AUTO_AUDIT_WHEEL=true +TUR_AUDIT_WHEEL_NO_LIBS=true +TUR_AUTO_BUILD_WHEEL=false +TUR_WHEEL_DIR="wheels/" + +source $TERMUX_SCRIPTDIR/common-files/tur_build_wheel.sh + +termux_step_configure() { + termux_setup_rust + export CARGO_BUILD_TARGET=${CARGO_TARGET_NAME} + export PYO3_CROSS_PYTHON_VERSION=$TERMUX_PYTHON_VERSION + export PYO3_CROSS_LIB_DIR=$TERMUX_PREFIX/lib + export PYTHONPATH=$TERMUX_PREFIX/lib/python${TERMUX_PYTHON_VERSION}/site-packages +} + +termux_step_post_make_install() { + pip wheel . + + mkdir -p wheels + local _pyver="${TERMUX_PYTHON_VERSION/./}" + mv cryptography-$TERMUX_PKG_VERSION-cp$_pyver-cp$_pyver-linux_$TERMUX_ARCH.whl ./wheels/ +}