-
-
Notifications
You must be signed in to change notification settings - Fork 4k
Expand file tree
/
Copy pathbuild.sh
More file actions
33 lines (31 loc) · 1.44 KB
/
build.sh
File metadata and controls
33 lines (31 loc) · 1.44 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
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="46.0.6"
TERMUX_PKG_SRCURL=https://github.com/pyca/cryptography/archive/refs/tags/${TERMUX_PKG_VERSION}.tar.gz
TERMUX_PKG_SHA256=234935d92ba2320836036c281163ea64837455dd7e0aaa0f034e574ccc7b4c64
TERMUX_PKG_AUTO_UPDATE=true
TERMUX_PKG_DEPENDS="openssl, python, python-pip"
TERMUX_PKG_BUILD_IN_SRC=true
TERMUX_PKG_UPDATE_TAG_TYPE="newest-tag"
TERMUX_PKG_PYTHON_COMMON_BUILD_DEPS="wheel"
TERMUX_PKG_PYTHON_CROSS_BUILD_DEPS="maturin, 'cffi>=1.12'"
TERMUX_PKG_PYTHON_TARGET_DEPS="'cffi>=1.12'"
termux_step_configure() {
termux_setup_rust
export CARGO_BUILD_TARGET="${CARGO_TARGET_NAME}"
export PYO3_CROSS_LIB_DIR="${TERMUX_PREFIX}/lib"
export ANDROID_API_LEVEL="${TERMUX_PKG_API_LEVEL}"
}
termux_step_make_install() {
# Needed by maturin
# Seems to be needed as we are overriding clang binary name.
# maturin does not ask for this environment variable when using NDK
export ANDROID_API_LEVEL="$TERMUX_PKG_API_LEVEL"
# --no-build-isolation is needed to ensure that maturin is not built for
# cross-python and picked up for execution instead of maturin built for
# build-python
cross-pip install --no-build-isolation --no-deps . --prefix $TERMUX_PREFIX
}