From: Michael Olbrich <m.olbrich@pengutronix.de>
To: David Jander <david@protonic.nl>
Cc: ptxdist@pengutronix.de
Subject: Re: [ptxdist] Bug: Apparent unsolved circular dependency in HOST_SYSTEM_PYTHON3_SETUPTOOLS
Date: Fri, 27 Feb 2026 14:53:01 +0100 [thread overview]
Message-ID: <aaGhvdUsc7caV-jO@pengutronix.de> (raw)
In-Reply-To: <20260218100240.4aed79d9@erd003.prtnl>
Hi David,
On Wed, Feb 18, 2026 at 10:02:40AM +0100, David Jander wrote:
> While migrating a project to 2026.02.0 and building from scratch I came
> across this build error:
>
> ----------------------------------------------
> target: host-system-python3-setuptools.compile
> ----------------------------------------------
>
> [...]
>
> ImportError: Cannot import `packaging.licenses`.
> Setuptools>=77.0.0 requires "packaging>=24.2" to work properly.
> Please make sure you have a suitable version installed.
That on is a bit tricky. Setuptools does not strictly need an external
'packaging' because it has a vendored version. However, if an external
version exists, then it is always use. If that one is too old, then the
build fails like this :-/.
So removing the python 'packaging' package on your build machine should
'fix' then problem as well.
But we can fix it in PTXdist as well:
> So apparently HOST_SYSTEM_PYTHON3_SETUPTOOLS is missing a dependency on
> HOST_SYSTEM_PYTHON3_PACKAGING.
>
> But adding this dependency and running oldconfig gets me this:
>
> [..]host-system-python3-flit-core.in:3:error: recursive dependency detected!
> [..]host-system-python3-flit-core.in:3: symbol HOST_SYSTEM_PYTHON3_FLIT_CORE is selected by HOST_SYSTEM_PYTHON3_PACKAGING
> [..]host-system-python3-packaging.in:3: symbol HOST_SYSTEM_PYTHON3_PACKAGING is selected by HOST_SYSTEM_PYTHON3_SETUPTOOLS
> [..]rules/host-system-python3-setuptools.in:3: symbol HOST_SYSTEM_PYTHON3_SETUPTOOLS is selected by HOST_SYSTEM_PYTHON3_FLIT_CORE
>
> And indeed:
>
> $ cat /usr/local/lib/ptxdist-2026.02.0/rules/host-system-python3-packaging.in
> ## SECTION=hosttools_noprompt
>
> config HOST_SYSTEM_PYTHON3_PACKAGING
> tristate
> default y if ALLYES
> select HOST_SYSTEM_PYTHON3
> select HOST_SYSTEM_PYTHON3_FLIT_CORE
>
> $ cat /usr/local/lib/ptxdist-2026.02.0/rules/host-system-python3-flit-core.in
> ## SECTION=hosttools_noprompt
>
> config HOST_SYSTEM_PYTHON3_FLIT_CORE
> tristate
> default y if ALLYES
> select HOST_SYSTEM_PYTHON3
> select HOST_SYSTEM_PYTHON3_SETUPTOOLS
>
> I solved this for my particular situation by removing "select
> HOST_SYSTEM_PYTHON3_SETUPTOOLS" from host-system-python3-flit-core.in
That part is actually mostly ok. flit-core does not actually need
setuptools.
> I assume this will not work in every situation though. Not sure how to fix
> this correctly and it is very possible that I am missing something here.
Not much. Some packages need the implicit dependency on setuptools. That is
deliberate, so that we don't need to always add it. So it just needs to be
moved elsewhere.
I've moved it to host-system-python3-pybuild. That is what the normal
packages already select anyways.
If this works as expected, then all of this should be part of the 2026.03.0
release.
Regards,
Michael
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
prev parent reply other threads:[~2026-02-27 13:53 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-18 9:02 David Jander
2026-02-27 13:53 ` Michael Olbrich [this message]
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=aaGhvdUsc7caV-jO@pengutronix.de \
--to=m.olbrich@pengutronix.de \
--cc=david@protonic.nl \
--cc=ptxdist@pengutronix.de \
/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