From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id A13901381F3 for ; Sat, 15 Dec 2012 12:17:27 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 2A8AD21C04B; Sat, 15 Dec 2012 12:17:21 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 6842121C04B for ; Sat, 15 Dec 2012 12:17:21 +0000 (UTC) Received: from pomiocik.lan (159-205-67-229.adsl.inetia.pl [159.205.67.229]) (using TLSv1 with cipher ECDHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: mgorny) by smtp.gentoo.org (Postfix) with ESMTPSA id 8DA3D33DCAD; Sat, 15 Dec 2012 12:17:18 +0000 (UTC) Date: Sat, 15 Dec 2012 13:17:28 +0100 From: =?UTF-8?B?TWljaGHFgiBHw7Nybnk=?= To: Tiziano =?UTF-8?B?TcO8bGxlcg==?= Cc: gentoo-python@lists.gentoo.org, python@gentoo.org, cpp@gentoo.org Subject: Re: [gentoo-python] Re: [PATCH 3/3] Convert to python-r1. Message-ID: <20121215131728.4c9c3a51@pomiocik.lan> In-Reply-To: <1355571722.795013.13.camel@storm> References: <1355522916-23815-1-git-send-email-mgorny@gentoo.org> <1355522916-23815-4-git-send-email-mgorny@gentoo.org> <1355571722.795013.13.camel@storm> Organization: Gentoo X-Mailer: Claws Mail 3.9.0 (GTK+ 2.24.14; x86_64-pc-linux-gnu) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Discussions centering around the Python ecosystem in Gentoo Linux X-BeenThere: gentoo-python@gentoo.org X-BeenThere: gentoo-python@lists.gentoo.org Mime-Version: 1.0 Content-Type: multipart/signed; micalg=PGP-SHA256; boundary="Sig_/wV3lSqGRZlkNiuj1K=EHlNj"; protocol="application/pgp-signature" X-Archives-Salt: 1806704d-ab0b-4a01-b7c2-2a1d05d877be X-Archives-Hash: 1a2ee42de2aefb5a80cc301188176f08 --Sig_/wV3lSqGRZlkNiuj1K=EHlNj Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Sat, 15 Dec 2012 12:42:02 +0100 Tiziano M=C3=BCller wrote: > Am Freitag, den 14.12.2012, 23:08 +0100 schrieb Micha=C5=82 G=C3=B3rny: > > --- > > gx86/dev-libs/boost/boost-1.52.0-r5.ebuild | 47 ++++++++++------------= -------- > > 1 file changed, 15 insertions(+), 32 deletions(-) > >=20 > > diff --git a/gx86/dev-libs/boost/boost-1.52.0-r5.ebuild b/gx86/dev-libs= /boost/boost-1.52.0-r5.ebuild > > index 87c7561..10bd293 100644 > > --- a/gx86/dev-libs/boost/boost-1.52.0-r5.ebuild > > +++ b/gx86/dev-libs/boost/boost-1.52.0-r5.ebuild > > @@ -3,11 +3,9 @@ > > # $Header: /var/cvsroot/gentoo-x86/dev-libs/boost/boost-1.52.0-r4.ebui= ld,v 1.1 2012/11/22 03:37:58 flameeyes Exp $ > > =20 > > EAPI=3D"5" > > -PYTHON_DEPEND=3D"python? *" > > -SUPPORT_PYTHON_ABIS=3D"1" > > -RESTRICT_PYTHON_ABIS=3D"*-jython *-pypy-*" > > +PYTHON_COMPAT=3D( python{2_5,2_6,2_7,3_1,3_2,3_3} ) > > =20 > > -inherit flag-o-matic multilib multiprocessing python toolchain-funcs v= ersionator > > +inherit flag-o-matic multilib multiprocessing python-r1 toolchain-func= s versionator > > =20 > > MY_P=3D${PN}_$(replace_all_version_separators _) > > =20 > > @@ -24,6 +22,7 @@ IUSE=3D"debug doc icu +nls mpi python static-libs +th= reads tools" > > RDEPEND=3D"icu? ( >=3Ddev-libs/icu-3.6:=3D ) > > !icu? ( virtual/libiconv ) > > mpi? ( || ( sys-cluster/openmpi[cxx] sys-cluster/mpich2[cxx,threads] = ) ) > > + python? ( ${PYTHON_DEPS} ) > > sys-libs/zlib > > !app-admin/eselect-boost" > > DEPEND=3D"${RDEPEND} > > @@ -50,7 +49,7 @@ create_user-config.jam() { > > fi > > =20 > > if use python; then > > - python_configuration=3D"using python : $(python_get_version) ;" > > + python_configuration=3D"using python : ${EPYTHON#python} ;" >=20 > can you please repeat why there is no EPYTHONV variable? There wasn't one, I didn't want to introduce it myself. The root of the problem is that there are multiple kinds of 'Python version' and people usually have no idea which one they want. In this particular case, boost wants the suffix of python libraries which is specific to CPython. Scrambling it from EPYTHON is the simplest thing to do here. But I'll take a second look at python_configuration because of your earlier comments. >=20 > > fi > > =20 > > cat > user-config.jam << __EOF__ > > @@ -60,12 +59,6 @@ ${python_configuration} > > __EOF__ > > } > > =20 > > -pkg_setup() { > > - if use python; then > > - python_pkg_setup > > - fi > > -} > > - > > src_prepare() { > > epatch \ > > "${FILESDIR}/${PN}-1.48.0-mpi_python3.patch" \ > > @@ -129,7 +122,7 @@ src_compile() { > > create_user-config.jam > > =20 > > ejam ${OPTIONS} \ > > - $(use python && echo --python-buildid=3D${PYTHON_ABI}) \ > > + $(use python && echo --python-buildid=3D${EPYTHON#python}) \ > > || die "Building of Boost libraries failed" > > =20 > > if use python; then > > @@ -143,7 +136,7 @@ src_compile() { > > =20 > > local dir > > for dir in ${PYTHON_DIRS}; do > > - mv ${dir} ${dir}-${PYTHON_ABI} || die "Renaming of '${dir}' to '${= dir}-${PYTHON_ABI}' failed" > > + mv ${dir} ${dir}-${EPYTHON} || die >=20 > Do we loose something by having an explicit error message? > Please leave it there (dito for all the other cases) Well, we lose readability when ebuild has 120-character long lines. >=20 > > done > > =20 > > if use mpi; then > > @@ -158,12 +151,12 @@ src_compile() { > > fi > > fi > > =20 > > - mv stage/lib/mpi.so stage/lib/mpi.so-${PYTHON_ABI} || die "Renamin= g of 'stage/lib/mpi.so' to 'stage/lib/mpi.so-${PYTHON_ABI}' failed" > > + mv stage/lib/mpi.so stage/lib/mpi.so-${EPYTHON} || die > > fi > > fi > > } > > if use python; then > > - python_execute_function building > > + python_foreach_impl building > > else > > building > > fi > > @@ -184,19 +177,19 @@ src_install () { > > if use python; then > > local dir > > for dir in ${PYTHON_DIRS}; do > > - cp -pr ${dir}-${PYTHON_ABI} ${dir} || die "Copying of '${dir}-${PY= THON_ABI}' to '${dir}' failed" > > + cp -pr ${dir}-${EPYTHON} ${dir} || die > > done > > =20 > > if use mpi; then > > - cp -p stage/lib/mpi.so-${PYTHON_ABI} "${MPI_PYTHON_MODULE}" || die= "Copying of 'stage/lib/mpi.so-${PYTHON_ABI}' to '${MPI_PYTHON_MODULE}' fai= led" > > - cp -p stage/lib/mpi.so-${PYTHON_ABI} stage/lib/mpi.so || die "Copy= ing of 'stage/lib/mpi.so-${PYTHON_ABI}' to 'stage/lib/mpi.so' failed" > > + cp -p stage/lib/mpi.so-${EPYTHON} "${MPI_PYTHON_MODULE}" || die > > + cp -p stage/lib/mpi.so-${EPYTHON} stage/lib/mpi.so || die > > fi > > fi > > =20 > > ejam ${OPTIONS} \ > > --includedir=3D"${D}usr/include" \ > > --libdir=3D"${D}usr/$(get_libdir)" \ > > - $(use python && echo --python-buildid=3D${PYTHON_ABI}) \ > > + $(use python && echo --python-buildid=3D${EPYTHON#python}) \ > > install || die "Installation of Boost libraries failed" > > =20 > > if use python; then > > @@ -222,10 +215,12 @@ else: > > del sys > > EOF > > fi > > + > > + python_optimize > > fi > > } > > if use python; then > > - python_execute_function installation > > + python_foreach_impl installation > > else > > installation > > fi > > @@ -320,18 +315,6 @@ pkg_preinst() { > > done > > } > > =20 > > -pkg_postinst() { > > - if use mpi && use python; then > > - python_mod_optimize boost > > - fi > > -} > > - > > -pkg_postrm() { > > - if use mpi && use python; then > > - python_mod_cleanup boost > > - fi > > -} > > - > > # the tests will never fail because these are not intended as sanity > > # tests at all. They are more a way for upstream to check their own co= de > > # on new compilers. Since they would either be completely unreliable >=20 >=20 >=20 --=20 Best regards, Micha=C5=82 G=C3=B3rny --Sig_/wV3lSqGRZlkNiuj1K=EHlNj Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (GNU/Linux) iJwEAQEIAAYFAlDMalgACgkQfXuS5UK5QB2X2AP+NjLOBpnK7gR/CmwoMSWx44hZ qpMOs8UB/snPSKmAZrz+VhIGRllY3Ir3u65CghD3KpIzBa28N78X3ZYcd2qOYE5l Cy+dcze3XeQx8t/P4g81+Qeq9JnENf2QfrGiV7lB3leRtx+dz4xpYi4s2lh1Vvie BhOcMLR8nfl6Ofh5BoM= =uZmQ -----END PGP SIGNATURE----- --Sig_/wV3lSqGRZlkNiuj1K=EHlNj--