From nobody Sat Dec 4 22:40:18 2021 X-Original-To: python@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id A5F7B182AF8F for ; Sat, 4 Dec 2021 22:40:23 +0000 (UTC) (envelope-from se@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4J64Qb10hFz4SqP; Sat, 4 Dec 2021 22:40:23 +0000 (UTC) (envelope-from se@freebsd.org) Received: from [IPV6:2003:cd:5f1d:f700:9946:5d85:4263:3628] (p200300cd5f1df70099465d8542633628.dip0.t-ipconnect.de [IPv6:2003:cd:5f1d:f700:9946:5d85:4263:3628]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: se/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 4EAB52961E; Sat, 4 Dec 2021 22:40:20 +0000 (UTC) (envelope-from se@freebsd.org) Message-ID: <2b37c7f7-1b3b-24fa-e209-f93f1bf4efaf@freebsd.org> Date: Sat, 4 Dec 2021 23:40:18 +0100 List-Id: FreeBSD-specific Python issues List-Archive: https://lists.freebsd.org/archives/freebsd-python List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-python@freebsd.org X-BeenThere: freebsd-python@freebsd.org MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.3.2 Subject: Re: devel/py-pyparsing and devel/py-packaging have circular dependency Content-Language: en-US From: Stefan Esser To: Alexey Dokuchaev , python@freebsd.org Cc: Koichiro Iwao , ports-developers@freebsd.org References: In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="------------Vd3rHy2ui1czzk0A9uPgoQ8q" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638657623; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=0CcbklSPvchI0q243AUWHV4ELdqh4dzQblbDy2dFSYY=; b=gl3+bOZ9jb5oCJYT1H+9PA9ZiwoYbWXF65v8MQnu8n2q8SMmc0rOzEjX049DThtTElmDEU dTzLqOdsgZpzySN9QQKG9VPV8HH37gHLAuNDHehC6QcyE5f3eFidil062Ig4tma3zjpU+B dKlmMFNT5NJir/BLfrGGouK0X94cbZh21PnGkwbC5GsFcpE0UmS9QT46Jnn3rDEbPmSCTN 43MgNHRsfyrkLK37Mj7FxgN1eRNWWo7hTcdYpjJWm9mayP/HiDn90Z7/A6NpSgmuoWx+jJ Mgj31xZ89gqiing9rDpu0rb2OfplRk/adQSafg8LBIcVHhFMGJiHrt5tL376Ig== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638657623; a=rsa-sha256; cv=none; b=s0M+Et3NKN84g5iJn0UMiljDnmTqhGW9xoDWshEN/dW97h16lrMmbfxV9RQ1Fzhustrkzn knJJLmEtBbSJSiAyVJr6xcRY9Lx/RQnQi52tjHoYtC0BSUU/i20szkRVChlP+fIec+UfKq XSlBn+taP9VSNZq3Y72mOpG+HVapaa9Ypv4+bRDcgOyYBupuU/t+yb8HR+dZSkmJS06coV A5wa5Rk3dhLNGkrTPR8twucxLzeQTNzWzOt7YhMJ+qHMgbZuhA1IGyUtIsckk4vhveENo/ DJV0XE/gnTBcsXp2bCeU5LKkb/jmSUdlaSR7REWxUTBPP41TviLcKO+lIZEs6w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --------------Vd3rHy2ui1czzk0A9uPgoQ8q Content-Type: multipart/mixed; boundary="------------X2N9s25l0SVnMOgTZNy7abYQ"; protected-headers="v1" From: Stefan Esser To: Alexey Dokuchaev , python@freebsd.org Cc: Koichiro Iwao , ports-developers@freebsd.org Message-ID: <2b37c7f7-1b3b-24fa-e209-f93f1bf4efaf@freebsd.org> Subject: Re: devel/py-pyparsing and devel/py-packaging have circular dependency References: In-Reply-To: --------------X2N9s25l0SVnMOgTZNy7abYQ Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Am 04.12.21 um 14:19 schrieb Stefan Esser: > Am 04.12.21 um 10:51 schrieb Alexey Dokuchaev: >> On Sat, Dec 04, 2021 at 05:45:55PM +0800, Po-Chuan Hsieh wrote: >>> The python dependencies are all correct. >>> py-pyparsing DOES NOT REQUIRE py-packaging. >=20 > True, but apparently only when building in a clean jail. >=20 >> I concur; just built and packaged those ports successfully in my tinde= rbox >> against Python versions 3.8 and 3.9. >=20 > Yes, it works when building with poudriere, but no, it does not > work with a plain "make" on a system with other Python ports > already installed. >=20 > In order to observe the issue, I had to delete the two packages > with "pkg delete -f". They cannot be re-installed from a port > using a plain "make" on the base system, thereafter. A personal mail from Kai Knoblich mentioned PR 259981: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D259981 The issue is that py-setuptools_scm depends on py-packaging and py-pyparsing, and it is used for all dependency checks when a ports setup.py is executed. IMHO, a failure of setuptools_scm due to a missing run dependency should lead to a fall-back mode that works as if setuptools_scm was not installed at all. Less than 70 of 7070 ports in devel/py-* have a direct dependency on py-setuptools_scm. But as soon as py-setuptools_scm is installed, it is invoked even for ports that do not depend on it (like py-packaging and py-pyparsing). And if it fails due to failed imports, then it prevents configuring of ports *that do not actually depend on it*. If a execution of py-setuptools_scm was fatal only for ports that have a direct dependency on it, then the build of py-packaging and py-pyparsing could succeed, even with py-setuptools_scm not usable. I have tried all permutations of parameters in the following command: # portmaster devel/py-black devel/py-pyparsing devel/py-packaging \ devel/py-setuptools_scm And this command succeed every time and for each permutation that I tried, independently of whether these ports were installed or not at that time. But if only py-pyparsing or py-packaging is missing, then the existence of py-setuptools_scm prevents their installation from a port, as described in this PR. Again: IMHO a failure to execute py-setuptools_scm should not be fatal, except for ports that directly depend on it. I have no idea whether that can easily be achieved, but I do not see any other solution. Can an option be passed to a port's setup.py to prevent it from trying to invoke py-setuptools_scm? (It would suffice to pass such an option for builds of py-pyparsing and py-packaging.) And again: this is not a portmaster issue. It affects building of ports with plain make in the same way, if one of the two packages py-setuptools_scm depends on has been lost. Regards, STefan --------------X2N9s25l0SVnMOgTZNy7abYQ-- --------------Vd3rHy2ui1czzk0A9uPgoQ8q Content-Type: application/pgp-signature; name="OpenPGP_signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="OpenPGP_signature" -----BEGIN PGP SIGNATURE----- wsB5BAABCAAjFiEEo3HqZZwL7MgrcVMTR+u171r99UQFAmGr7lIFAwAAAAAACgkQR+u171r99UR5 yAf/a1zAJty3CWBBQSG61FiZScW7T648xtYuFZdKoO5WW5AcqlIFofkRy6Wwof8pggUGNTYIFbz2 aPBOxGTngi+xOq9dX9uryP/5tj5KqmQhQnLlQKc48MVY72yoRNDNOjtpZFWWfMUUIITSKC9EOsQu RWbtL6s7i28Pi7dfBIyBeSHsGYWRx9l2t0v92CuHYXfX5Xv0ZAx3zjXz0ys5ibW9D4Xjx3Fom3FX I7kzVBfks8Exg+STSl16z64Ym7v7DOB+v0oHR7CdP4m/paz8prpG+CW08r0fEk9YiHPjryhdmwnx 82+ND/kA2XZXUaF5q/8P8XX+WKVEPojH7qWUv1NtSg== =TBcL -----END PGP SIGNATURE----- --------------Vd3rHy2ui1czzk0A9uPgoQ8q--