2baaf5bcd7
python-cryptography is a python package, but it internally builds a rust crate. As such, it needs to be vendored at install time. Currently, we only pass the path to the sub-directory where the rust source is in the package tree, but calling cargo needs additional variables, most notably it needs CARGO_HOME to be set in the environment, otherwise it ends up writing in the user's own cargo home, which is by default ~/.cargo/ We do not really know what variables are used at vendor time, so we pass the full Cargo environment, that we pass when building target packages. Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr> Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com> Cc: Yegor Yefremov <yegorslists@googlemail.com> Cc: Asaf Kahlon <asafka7@gmail.com> Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
31 lines
1.2 KiB
Makefile
31 lines
1.2 KiB
Makefile
################################################################################
|
|
#
|
|
# python-cryptography
|
|
#
|
|
################################################################################
|
|
|
|
PYTHON_CRYPTOGRAPHY_VERSION = 36.0.1
|
|
PYTHON_CRYPTOGRAPHY_SOURCE = cryptography-$(PYTHON_CRYPTOGRAPHY_VERSION).tar.gz
|
|
PYTHON_CRYPTOGRAPHY_SITE = https://files.pythonhosted.org/packages/f9/4b/1cf8e281f7ae4046a59e5e39dd7471d46db9f61bb564fddbff9084c4334f
|
|
PYTHON_CRYPTOGRAPHY_SETUP_TYPE = setuptools
|
|
PYTHON_CRYPTOGRAPHY_LICENSE = Apache-2.0 or BSD-3-Clause
|
|
PYTHON_CRYPTOGRAPHY_LICENSE_FILES = LICENSE LICENSE.APACHE LICENSE.BSD
|
|
PYTHON_CRYPTOGRAPHY_CPE_ID_VENDOR = cryptography_project
|
|
PYTHON_CRYPTOGRAPHY_CPE_ID_PRODUCT = cryptography
|
|
PYTHON_CRYPTOGRAPHY_DEPENDENCIES = \
|
|
host-python-setuptools-rust \
|
|
host-python-cffi \
|
|
host-rustc \
|
|
openssl
|
|
PYTHON_CRYPTOGRAPHY_ENV = \
|
|
$(PKG_CARGO_ENV) \
|
|
PYO3_CROSS_LIB_DIR="$(STAGING_DIR)/usr/lib/python$(PYTHON3_VERSION_MAJOR)"
|
|
# We need to vendor the Cargo crates at download time
|
|
PYTHON_CRYPTOGRAPHY_DOWNLOAD_POST_PROCESS = cargo
|
|
PYTHON_CRYPTOGRAPHY_DOWNLOAD_DEPENDENCIES = host-rustc
|
|
PYTHON_CRYPTOGRAPHY_DL_ENV = \
|
|
$(PKG_CARGO_ENV) \
|
|
BR_CARGO_MANIFEST_PATH=src/rust/Cargo.toml
|
|
|
|
$(eval $(python-package))
|