* [ptxdist] Bug: Apparent unsolved circular dependency in HOST_SYSTEM_PYTHON3_SETUPTOOLS
@ 2026-02-18 9:02 David Jander
2026-02-27 13:53 ` Michael Olbrich
0 siblings, 1 reply; 2+ messages in thread
From: David Jander @ 2026-02-18 9:02 UTC (permalink / raw)
To: ptxdist; +Cc: Michael Olbrich
Hi Michael,
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.
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
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.
Best regards,
--
David Jander
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [ptxdist] Bug: Apparent unsolved circular dependency in HOST_SYSTEM_PYTHON3_SETUPTOOLS
2026-02-18 9:02 [ptxdist] Bug: Apparent unsolved circular dependency in HOST_SYSTEM_PYTHON3_SETUPTOOLS David Jander
@ 2026-02-27 13:53 ` Michael Olbrich
0 siblings, 0 replies; 2+ messages in thread
From: Michael Olbrich @ 2026-02-27 13:53 UTC (permalink / raw)
To: David Jander; +Cc: ptxdist
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 |
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-02-27 13:53 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-02-18 9:02 [ptxdist] Bug: Apparent unsolved circular dependency in HOST_SYSTEM_PYTHON3_SETUPTOOLS David Jander
2026-02-27 13:53 ` Michael Olbrich
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox