package/python-orjson: convert to use the python-package infrastructure
Signed-off-by: James Hilliard <james.hilliard1@gmail.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
This commit is contained in:
parent
d8bc53e37a
commit
2cbf1e4d3a
@ -6,17 +6,16 @@
|
||||
|
||||
PYTHON_ORJSON_VERSION = 3.6.8
|
||||
PYTHON_ORJSON_SITE = $(call github,ijl,orjson,$(PYTHON_ORJSON_VERSION))
|
||||
PYTHON_ORJSON_SETUP_TYPE = pep517
|
||||
PYTHON_ORJSON_LICENSE = Apache-2.0 or MIT
|
||||
PYTHON_ORJSON_LICENSE_FILES = LICENSE-APACHE LICENSE-MIT
|
||||
PYTHON_ORJSON_DEPENDENCIES = host-python-cffi
|
||||
PYTHON_ORJSON_CARGO_ENV = \
|
||||
PYTHON_ORJSON_DEPENDENCIES = host-python-cffi host-python-maturin
|
||||
PYTHON_ORJSON_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_ORJSON_DOWNLOAD_POST_PROCESS = cargo
|
||||
PYTHON_ORJSON_DOWNLOAD_DEPENDENCIES = host-rustc
|
||||
PYTHON_ORJSON_DL_ENV = $(PKG_CARGO_ENV)
|
||||
|
||||
# orjson uses "maturin" to generate distribution packages - rather than teach
|
||||
# buildroot how to understand this, we reach in and install directly.
|
||||
define PYTHON_ORJSON_INSTALL_TARGET_CMDS
|
||||
$(INSTALL) -m 0755 -D $(@D)/target/$(RUSTC_TARGET_NAME)/release/liborjson.so \
|
||||
$(TARGET_DIR)/usr/lib/python$(PYTHON3_VERSION_MAJOR)/site-packages/orjson.so
|
||||
endef
|
||||
|
||||
$(eval $(cargo-package))
|
||||
$(eval $(python-package))
|
||||
|
Loading…
Reference in New Issue
Block a user