All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] package/python-cryptography: needs cargo env when downloading
@ 2022-02-14 10:28 Yann E. MORIN
  2022-03-05 14:50 ` Arnout Vandecappelle
  0 siblings, 1 reply; 2+ messages in thread
From: Yann E. MORIN @ 2022-02-14 10:28 UTC (permalink / raw)
  To: buildroot; +Cc: Asaf Kahlon, Yann E. MORIN, Thomas Petazzoni

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 tie, 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>
---
 package/python-cryptography/python-cryptography.mk | 1 +
 1 file changed, 1 insertion(+)

diff --git a/package/python-cryptography/python-cryptography.mk b/package/python-cryptography/python-cryptography.mk
index e642691bc5..a524f729c8 100644
--- a/package/python-cryptography/python-cryptography.mk
+++ b/package/python-cryptography/python-cryptography.mk
@@ -24,6 +24,7 @@ PYTHON_CRYPTOGRAPHY_ENV = \
 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))
-- 
2.25.1

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [Buildroot] [PATCH] package/python-cryptography: needs cargo env when downloading
  2022-02-14 10:28 [Buildroot] [PATCH] package/python-cryptography: needs cargo env when downloading Yann E. MORIN
@ 2022-03-05 14:50 ` Arnout Vandecappelle
  0 siblings, 0 replies; 2+ messages in thread
From: Arnout Vandecappelle @ 2022-03-05 14:50 UTC (permalink / raw)
  To: Yann E. MORIN, buildroot; +Cc: Thomas Petazzoni, Asaf Kahlon



On 14/02/2022 11:28, Yann E. MORIN wrote:
> 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 tie, 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>

  Applied to master, thanks.

  Regards,
  Arnout

> ---
>   package/python-cryptography/python-cryptography.mk | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/package/python-cryptography/python-cryptography.mk b/package/python-cryptography/python-cryptography.mk
> index e642691bc5..a524f729c8 100644
> --- a/package/python-cryptography/python-cryptography.mk
> +++ b/package/python-cryptography/python-cryptography.mk
> @@ -24,6 +24,7 @@ PYTHON_CRYPTOGRAPHY_ENV = \
>   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))
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-03-05 14:50 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-14 10:28 [Buildroot] [PATCH] package/python-cryptography: needs cargo env when downloading Yann E. MORIN
2022-03-05 14:50 ` Arnout Vandecappelle

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.