From mboxrd@z Thu Jan 1 00:00:00 1970 Delivery-date: Fri, 27 Feb 2026 14:53:21 +0100 Received: from metis.whiteo.stw.pengutronix.de ([2a0a:edc0:2:b01:1d::104]) by lore.white.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vvyHQ-006GRg-1J for lore@lore.pengutronix.de; Fri, 27 Feb 2026 14:53:21 +0100 Received: from [127.0.0.1] (helo=metis.whiteo.stw.pengutronix.de) by metis.whiteo.stw.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1vvyHR-0000EZ-2Q; Fri, 27 Feb 2026 14:53:21 +0100 Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.whiteo.stw.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1vvyH8-0000D8-AE; Fri, 27 Feb 2026 14:53:02 +0100 Received: from pty.whiteo.stw.pengutronix.de ([2a0a:edc0:2:b01:1d::c5]) by drehscheibe.grey.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vvyH6-002uAR-2P; Fri, 27 Feb 2026 14:53:02 +0100 Received: from mol by pty.whiteo.stw.pengutronix.de with local (Exim 4.98.2) (envelope-from ) id 1vvyH7-00000008fuk-4B25; Fri, 27 Feb 2026 14:53:02 +0100 Date: Fri, 27 Feb 2026 14:53:01 +0100 From: Michael Olbrich To: David Jander Message-ID: Mail-Followup-To: David Jander , ptxdist@pengutronix.de References: <20260218100240.4aed79d9@erd003.prtnl> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20260218100240.4aed79d9@erd003.prtnl> X-Sent-From: Pengutronix Hildesheim X-URL: http://www.pengutronix.de/ X-Accept-Language: de,en X-Accept-Content-Type: text/plain X-IRC: #ptxdist @freenode Subject: Re: [ptxdist] Bug: Apparent unsolved circular dependency in HOST_SYSTEM_PYTHON3_SETUPTOOLS X-BeenThere: ptxdist@pengutronix.de X-Mailman-Version: 2.1.29 Precedence: list List-Id: PTXdist Development Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: ptxdist@pengutronix.de Cc: ptxdist@pengutronix.de Sender: "ptxdist" X-SA-Exim-Connect-IP: 127.0.0.1 X-SA-Exim-Mail-From: ptxdist-bounces@pengutronix.de X-SA-Exim-Scanned: No (on metis.whiteo.stw.pengutronix.de); SAEximRunCond expanded to false 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 |