# # Copyright OpenEmbedded Contributors # # SPDX-License-Identifier: MIT # ## ## Purpose: ## This class is used to update the list of crates in SRC_URI ## by reading Cargo.lock in the source tree. ## ## See meta/recipes-devtools/python/python3-bcrypt_*.bb for an example ## ## To perform the update: bitbake -c update_crates recipe-name addtask do_update_crates after do_patch do_update_crates[depends] = "python3-native:do_populate_sysroot" do_update_crates[nostamp] = "1" do_update_crates[doc] = "Update the recipe by reading Cargo.lock and write in ${THISDIR}/${BPN}-crates.inc" RECIPE_UPDATE_EXTRA_TASKS += "do_update_crates" # The directory where to search for Cargo.lock files CARGO_LOCK_SRC_DIR ??= "${S}" do_update_crates() { TARGET_FILE="${THISDIR}/${BPN}-crates.inc" nativepython3 - <