From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 3608A138334 for ; Thu, 28 Nov 2019 16:05:46 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 0A1E6E092C; Thu, 28 Nov 2019 16:05:41 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 9B927E08FF for ; Thu, 28 Nov 2019 16:05:40 +0000 (UTC) Received: from pomiot (c134-66.icpnet.pl [85.221.134.66]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: mgorny) by smtp.gentoo.org (Postfix) with ESMTPSA id A727034D254; Thu, 28 Nov 2019 16:05:38 +0000 (UTC) Message-ID: Subject: Re: [gentoo-dev] [RFC] dev-python/setuptools deps in distutils-r1 packages From: =?UTF-8?Q?Micha=C5=82_G=C3=B3rny?= To: gentoo-dev@lists.gentoo.org Date: Thu, 28 Nov 2019 17:05:34 +0100 In-Reply-To: <20191126133014.GA47055@baraddur.perfinion.com> References: <20191126133014.GA47055@baraddur.perfinion.com> Organization: Gentoo Content-Type: multipart/signed; micalg="pgp-sha512"; protocol="application/pgp-signature"; boundary="=-g5gUd+CNLN8f/KIsYwrD" User-Agent: Evolution 3.32.4 Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@lists.gentoo.org Reply-to: gentoo-dev@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply MIME-Version: 1.0 X-Archives-Salt: 6e2b884d-ee2d-4c36-8935-4e879aa40955 X-Archives-Hash: 87843fbdc0fc15251d8f23ccca0655ae --=-g5gUd+CNLN8f/KIsYwrD Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tue, 2019-11-26 at 21:30 +0800, Jason Zaman wrote: > On Mon, Nov 25, 2019 at 06:38:47PM +0100, Micha=C5=82 G=C3=B3rny wrote: > > Hi, > >=20 > > TL;DR: should we depend on setuptools by default? Alternatively, shoul= d > > we add distutils_enable_setuptools API to provide at least partial > > validity checks. > >=20 > >=20 > > Variant 1: automatic dependency on setuptools > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > > Basically, we add a new trinary pre-inherit variable: > >=20 > > DISTUTILS_USE_SETUPTOOLS=3Dno > > -> no deps > > DISTUTILS_USE_SETUPTOOLS=3Dbdepend > > -> add to BDEPEND (the default) > > DISTUTILS_USE_SETUPTOOLS=3Drdepend > > -> add to BDEPEND+RDEPEND > >=20 > > This is roughly 'erring on the safe side'. The default will work for > > the majority of packages. We will have to disable it for setuptools > > bootstrap deps, and devs will be able to adjust it to correct values > > as they update ebuilds. For the time being, existing *DEPEND > > on setuptools will avoid breaking stuff. > >=20 > > This will also enable me to add extra QA checks to esetup.py. It shoul= d > > be able to reasonably detect incorrect value and report it. This will > > imply some 'false positives' for packages that use the old method of > > specifying setuptools in RDEPEND but that's a minor hassle. > >=20 > > Pros: > > - works out of the box for the majority of packages > > - enables full-range QA checking > >=20 > > Cons: > > - pre-inherit variable > > - some (harmless) false positives on existing packages > >=20 >=20 > I like variant 1 most since in almost all cases it'll be less work in > the ebuilds. What about distutils_optional tho? In tensorflow I have all > the python support behind USE=3D"python" and guard all the deps. In the > optional case is there any way for this to work other than just setting > it to no and doing it manually? > I assume if i set it to no and make it optional then the esetup.py > checks wouldnt happen which isnt as nice. >=20 Hmm, I gave it some more thought and I have an idea. We could introduce new ${DISTUTILS_RDEPEND} and ${DISTUTILS_DEPEND} variables, and deprecate (as a general rule) direct ${PYTHON_DEPS} usage in favor of it. Then we could easily inject setuptools into it. Bad news is that it will make it incorrect to do BDEPEND=3D${RDEPEND} in general, even when DISTUTILS_RDEPEND=3D=3DDISTUTILS_DEPEND. --=20 Best regards, Micha=C5=82 G=C3=B3rny --=-g5gUd+CNLN8f/KIsYwrD Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- iQGTBAABCgB9FiEEx2qEUJQJjSjMiybFY5ra4jKeJA4FAl3f8E5fFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldEM3 NkE4NDUwOTQwOThEMjhDQzhCMjZDNTYzOUFEQUUyMzI5RTI0MEUACgkQY5ra4jKe JA5tbwgApyQNLa6on9drlGr5mux1vypVngwMK73t0aSMJB72VibrqMnf/hXSlyUz YM/FwkbjDhDNRrx4Z2HP9St0tvolOVBQVqTG48oXW8QBnDMipwsbXCBTyhjHDttG th/bw1hGS6Vov05EM1NEkadQeib9JMQMDYUNPAAPfAwgIzh/PQoQuZJNY++FLx+J mnOFXOBetDVb1xVVi3v2GA6h5dfl3GfucOl8nsNLkqB147D0cToJSVfilPBr5m5a Eu8I8AgL+zkDTN2/6vvnw6Y+bmm30TzXNvulQHA9s7GP3gWjCiSCbznW8eTK1IXG v0BWciK6W84WSQvihePtjkZcF6f+yw== =nRud -----END PGP SIGNATURE----- --=-g5gUd+CNLN8f/KIsYwrD--