From: "Yann E. MORIN" <yann.morin.1998@free.fr>
To: "Clément Léger" <clement.leger@bootlin.com>
Cc: Etienne Carriere <etienne.carriere@linaro.org>,
Thomas Petazzoni <thomas.petazzoni@bootlin.com>,
buildroot@buildroot.org
Subject: Re: [Buildroot] [PATCH v4 2/8] package/python-cryptography: enable host package
Date: Mon, 14 Mar 2022 21:31:49 +0100 [thread overview]
Message-ID: <20220314203149.GW283544@scaer> (raw)
In-Reply-To: <20220314153111.1390512-3-clement.leger@bootlin.com>
Clément, All,
On 2022-03-14 16:31 +0100, Clément Léger via buildroot spake thusly:
> Enable host package and add needed dependencies.
>
> Acked-by: Etienne Carriere <etienne.carriere@linaro.org>
> Signed-off-by: Clément Léger <clement.leger@bootlin.com>
> ---
> package/python-cryptography/python-cryptography.mk | 14 ++++++++++++++
> 1 file changed, 14 insertions(+)
>
> diff --git a/package/python-cryptography/python-cryptography.mk b/package/python-cryptography/python-cryptography.mk
> index a524f729c8..8a4ffe6d75 100644
> --- a/package/python-cryptography/python-cryptography.mk
> +++ b/package/python-cryptography/python-cryptography.mk
> @@ -17,14 +17,28 @@ PYTHON_CRYPTOGRAPHY_DEPENDENCIES = \
> host-python-cffi \
> host-rustc \
> openssl
> +HOST_PYTHON_CRYPTOGRAPHY_DEPENDENCIES = \
> + host-python-setuptools-rust \
> + host-python-cffi \
> + host-rustc \
> + host-openssl
> PYTHON_CRYPTOGRAPHY_ENV = \
> $(PKG_CARGO_ENV) \
> PYO3_CROSS_LIB_DIR="$(STAGING_DIR)/usr/lib/python$(PYTHON3_VERSION_MAJOR)"
> +HOST_PYTHON_CRYPTOGRAPHY_ENV = \
> + $(HOST_PKG_CARGO_ENV) \
> + PYO3_CROSS_LIB_DIR="$(HOST_DIR)/usr/lib/python$(PYTHON3_VERSION_MAJOR)"
> # We need to vendor the Cargo crates at download time
> PYTHON_CRYPTOGRAPHY_DOWNLOAD_POST_PROCESS = cargo
> +HOST_PYTHON_CRYPTOGRAPHY_DOWNLOAD_POST_PROCESS = cargo
I think the host variant should automatically inherit that setting from
the target variant.
Afterall, it seems reasonable to expect that the download of the host
and target variants should usually be exactly the same.
> PYTHON_CRYPTOGRAPHY_DOWNLOAD_DEPENDENCIES = host-rustc
> +HOST_PYTHON_CRYPTOGRAPHY_DOWNLOAD_DEPENDENCIES = host-rustc
Ditto for the download dependencies.
Although that may intoduce a circular dependency (i.e.: foo has host-foo
as a download dependency, so of course host-foo can't have host-foo as
download dependency...)
> PYTHON_CRYPTOGRAPHY_DL_ENV = \
> $(PKG_CARGO_ENV) \
> BR_CARGO_MANIFEST_PATH=src/rust/Cargo.toml
> +HOST_PYTHON_CRYPTOGRAPHY_DL_ENV = \
> + $(HOST_PKG_CARGO_ENV) \
> + BR_CARGO_MANIFEST_PATH=src/rust/Cargo.toml
I am going to suggest that should also be the case for the _DL_ENV. Note
however that you would anyway need to override it for this package,
becasue thwe host and target variants have different go env.
So, something like (with _DL_SUBDIR thrown into the mix; of course, the
whole was thoroughly untested):
package/pkg-generic: host variant inherits download settings
Blablabla Afterall, it seems reasonable to expect that the download
of the host and target variants should usually be exactly the same,
but packages can still override that for the host vairant in special
cases blablabla...
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
diff --git a/package/pkg-generic.mk b/package/pkg-generic.mk
index b3a7e1d60e..79fcf603d3 100644
--- a/package/pkg-generic.mk
+++ b/package/pkg-generic.mk
@@ -540,6 +540,30 @@ ifndef $(2)_SUBDIR
endif
endif
+ifndef $(2)_DL_SUBDIR
+ ifdef $(3)_DL_SUBDIR
+ $(2)_DL_SUBDIR = $$($(3)_DL_SUBDIR)
+ endif
+endif
+
+ifndef $(2)_DOWNLOAD_DEPENDENCIES
+ ifdef $(3)_DOWNLOAD_DEPENDENCIES
+ $(2)_DOWNLOAD_DEPENDENCIES = $$(filter-out $(1),$$($(3)_DOWNLOAD_DEPENDENCIES))
+ endif
+endif
+
+ifndef $(2)_DL_ENV
+ ifdef $(3)_DL_ENV
+ $(2)_DL_ENV = $$($(3)_DL_ENV)
+ endif
+endif
+
+ifndef $(2)_DOWNLOAD_POST_PROCESS
+ ifdef $(3)_DOWNLOAD_POST_PROCESS
+ $(2)_DOWNLOAD_POST_PROCESS = $$($(3)_DOWNLOAD_POST_PROCESS)
+ endif
+endif
+
ifndef $(2)_STRIP_COMPONENTS
ifdef $(3)_STRIP_COMPONENTS
$(2)_STRIP_COMPONENTS = $$($(3)_STRIP_COMPONENTS)
Thoughts?
Regards,
Yann E. MORIN.
> $(eval $(python-package))
> +$(eval $(host-python-package))
> --
> 2.34.1
>
> _______________________________________________
> buildroot mailing list
> buildroot@buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
next prev parent reply other threads:[~2022-03-14 20:32 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-14 15:31 [Buildroot] [PATCH v4 0/8] boot/optee-os: support new optee-os 3.16.0 build dependencies Clément Léger via buildroot
2022-03-14 15:31 ` [Buildroot] [PATCH v4 1/8] boot/optee-os: add option to select DTC dependency Clément Léger via buildroot
2022-03-14 17:23 ` Etienne Carriere
2022-03-14 21:01 ` Yann E. MORIN
2022-03-20 18:24 ` Peter Korsgaard
2022-03-14 15:31 ` [Buildroot] [PATCH v4 2/8] package/python-cryptography: enable host package Clément Léger via buildroot
2022-03-14 20:31 ` Yann E. MORIN [this message]
2022-03-15 8:10 ` Thomas Petazzoni via buildroot
2022-03-16 18:17 ` Yann E. MORIN
2022-03-14 15:31 ` [Buildroot] [PATCH v4 3/8] boot/optee-os: add support to build with python-cryptography Clément Léger via buildroot
2022-03-14 17:20 ` Etienne Carriere
2022-03-14 20:23 ` Thomas Petazzoni via buildroot
2022-03-14 15:31 ` [Buildroot] [PATCH v4 4/8] boot/optee-os: bump to version 3.16.0 Clément Léger via buildroot
2022-03-14 15:31 ` [Buildroot] [PATCH v4 5/8] package/optee-test: " Clément Léger via buildroot
2022-03-14 15:31 ` [Buildroot] [PATCH v4 6/8] package/optee-examples: " Clément Léger via buildroot
2022-03-14 15:31 ` [Buildroot] [PATCH v4 7/8] package/optee-client: " Clément Léger via buildroot
2022-03-14 15:31 ` [Buildroot] [PATCH v4 8/8] package/optee-benchmark: " Clément Léger via buildroot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220314203149.GW283544@scaer \
--to=yann.morin.1998@free.fr \
--cc=buildroot@buildroot.org \
--cc=clement.leger@bootlin.com \
--cc=etienne.carriere@linaro.org \
--cc=thomas.petazzoni@bootlin.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox