Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Yann E. MORIN" <yann.morin.1998@free.fr>
To: James Hilliard <james.hilliard1@gmail.com>
Cc: Asaf Kahlon <asafka7@gmail.com>,
	Thomas Petazzoni <thomas.petazzoni@bootlin.com>,
	buildroot@buildroot.org
Subject: Re: [Buildroot] [PATCH 2/3] package/python-pydantic-core: new package
Date: Sat, 25 Nov 2023 16:36:09 +0100	[thread overview]
Message-ID: <20231125153609.GJ3177259@scaer> (raw)
In-Reply-To: <20231125081052.881728-2-james.hilliard1@gmail.com>

James, All,

On 2023-11-25 01:10 -0700, James Hilliard spake thusly:
> Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
> ---
>  package/Config.in                                 |  1 +
>  package/python-pydantic-core/Config.in            |  8 ++++++++
>  .../python-pydantic-core.hash                     |  4 ++++
>  .../python-pydantic-core/python-pydantic-core.mk  | 15 +++++++++++++++
>  4 files changed, 28 insertions(+)
>  create mode 100644 package/python-pydantic-core/Config.in
>  create mode 100644 package/python-pydantic-core/python-pydantic-core.hash
>  create mode 100644 package/python-pydantic-core/python-pydantic-core.mk
> 
> diff --git a/package/Config.in b/package/Config.in
> index 68e6e29a4d..fcc09b07c4 100644
> --- a/package/Config.in
> +++ b/package/Config.in
> @@ -1228,6 +1228,7 @@ menu "External python modules"
>  	source "package/python-pycups/Config.in"
>  	source "package/python-pydal/Config.in"
>  	source "package/python-pydantic/Config.in"
> +	source "package/python-pydantic-core/Config.in"
>  	source "package/python-pydevmem/Config.in"
>  	source "package/python-pydyf/Config.in"
>  	source "package/python-pyelftools/Config.in"
> diff --git a/package/python-pydantic-core/Config.in b/package/python-pydantic-core/Config.in
> new file mode 100644
> index 0000000000..3eeb1844a2
> --- /dev/null
> +++ b/package/python-pydantic-core/Config.in
> @@ -0,0 +1,8 @@
> +config BR2_PACKAGE_PYTHON_PYDANTIC_CORE
> +	bool "python-pydantic-core"
> +	depends on BR2_PACKAGE_HOST_RUSTC_TARGET_ARCH_SUPPORTS
> +	select BR2_PACKAGE_PYTHON_TYPING_EXTENSIONS # runtime
> +	help

So what happens if I apply this patch, which adds pydantic-core, but I
do not apply the next one, which bumps pydantic, so we end up in a
situation with an old pydantic, with the new core also installed?

Do the two conflict, or is it an OK situation (obviously the
pydantic-core would be of little use)?

If there is a conflict, then we will want to introduce the new package
at the same time we do the bump, and that should be explained int he
commit log.

If there is no conflict, then just say, we can ammend the commit log
accordignly.

> +	  Core validation logic for pydantic written in rust.

As it is written in rust, I was wondering... [0]

[--SNIP--]
> diff --git a/package/python-pydantic-core/python-pydantic-core.mk b/package/python-pydantic-core/python-pydantic-core.mk
> new file mode 100644
> index 0000000000..8b61323ab3
> --- /dev/null
> +++ b/package/python-pydantic-core/python-pydantic-core.mk
> @@ -0,0 +1,15 @@
> +################################################################################
> +#
> +# python-pydantic-core
> +#
> +################################################################################
> +
> +PYTHON_PYDANTIC_CORE_VERSION = 2.14.5
> +PYTHON_PYDANTIC_CORE_SOURCE = pydantic_core-$(PYTHON_PYDANTIC_CORE_VERSION).tar.gz
> +PYTHON_PYDANTIC_CORE_SITE = https://files.pythonhosted.org/packages/64/26/cffb93fe9c6b5a91c497f37fae14a4b073ecbc47fc36a9979c7aa888b245
> +PYTHON_PYDANTIC_CORE_SETUP_TYPE = maturin
> +PYTHON_PYDANTIC_CORE_LICENSE = MIT
> +PYTHON_PYDANTIC_CORE_LICENSE_FILES = LICENSE
> +PYTHON_PYDANTIC_CORE_DEPENDENCIES = host-python-typing-extensions

[0] ... why there was dependency on the rust toolchain.

So I looked at the manual [1] to check the maturin setup type, but... It
is *not* documented (although I seem to remember I already asked that it
be, I can't find that mail, so let's say this is the first time I bring
up the subject...)

So I had to look at the code, and see that the rust toolchain is
automatically added when the setup type is maturin.

As I had no idea that maturin was explicitly about python-packages-
written-in-rust, the dependency on rust was not obvious to me... :-/

Could you please extend the manual to descrbe the additional setup types
that are currently supported by Buildroot, please?

[1] https://buildroot.org/downloads/manual/manual.html#_infrastructure_for_python_packages

Regards,
Yann E. MORIN.

> +
> +$(eval $(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

  reply	other threads:[~2023-11-25 15:36 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-25  8:10 [Buildroot] [PATCH 1/3] package/python-annotated-types: new package James Hilliard
2023-11-25  8:10 ` [Buildroot] [PATCH 2/3] package/python-pydantic-core: " James Hilliard
2023-11-25 15:36   ` Yann E. MORIN [this message]
2023-11-26  0:11     ` James Hilliard
2023-11-26 11:27       ` Yann E. MORIN
2023-11-26 16:19         ` James Hilliard
2023-11-26 16:39           ` Yann E. MORIN
2023-11-26 16:46             ` James Hilliard
2023-11-26 17:12   ` Yann E. MORIN
2023-11-25  8:10 ` [Buildroot] [PATCH 3/3] package/python-pydantic: bump to version 2.5.2 James Hilliard
2023-11-26 17:12   ` Yann E. MORIN
2023-11-26 17:11 ` [Buildroot] [PATCH 1/3] package/python-annotated-types: new package Yann E. MORIN

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=20231125153609.GJ3177259@scaer \
    --to=yann.morin.1998@free.fr \
    --cc=asafka7@gmail.com \
    --cc=buildroot@buildroot.org \
    --cc=james.hilliard1@gmail.com \
    --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