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 887E1198005 for ; Wed, 27 Feb 2013 21:41:38 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id CDCE8E0A7D; Wed, 27 Feb 2013 21:41:35 +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 D7AD2E0A72 for ; Wed, 27 Feb 2013 21:41:34 +0000 (UTC) Received: from pomiocik.lan (77-253-193-205.adsl.inetia.pl [77.253.193.205]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: mgorny) by smtp.gentoo.org (Postfix) with ESMTPSA id 9A28433DE9E; Wed, 27 Feb 2013 21:41:32 +0000 (UTC) Date: Wed, 27 Feb 2013 22:41:52 +0100 From: =?UTF-8?B?TWljaGHFgiBHw7Nybnk=?= To: gentoo-dev@lists.gentoo.org Cc: python@gentoo.org Subject: [gentoo-dev] [RFC] multibuild.eclass -- a generic pluggable framework to handle multi-variant builds Message-ID: <20130227224152.6d1293c9@pomiocik.lan> Organization: Gentoo X-Mailer: Claws Mail 3.9.0 (GTK+ 2.24.16; x86_64-pc-linux-gnu) 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 Mime-Version: 1.0 Content-Type: multipart/signed; micalg=PGP-SHA512; boundary="Sig_/HG.MTEE9pXIIQBMZwYErJFG"; protocol="application/pgp-signature" X-Archives-Salt: 3f75bf60-65cf-4cc9-a0d0-588a8ac33c82 X-Archives-Hash: 5e6cf8d4b3a52f4a37e45f96fd0f470e --Sig_/HG.MTEE9pXIIQBMZwYErJFG Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hello, Recently python-r1 and multilib-build started to share a few bits of code related to running the build process for multiple 'variants' of the same package. Over time, the code extended and it is a bit cumbersome to maintain the two copies and keep them in sync. Therefore, I'd like to propose a new multibuild.eclass which will provide a generic framework for eclasses and ebuilds to perform multi-variant builds. The eclass currently is intended to provide two functions: - multibuild_foreach, - multibuild_parallel_foreach. These functions are supposed to execute the child process for each of the enabled variants with support for the following: - setting BUILD_DIR to an unique location which can be used to build the sources, - teeing logs to a variant-specific log file to make reading them easier, - nesting multiple uses of multibuild.eclass -- e.g. fftw build 3-4 'float type' variants + multilib. It also fixes some of the issues that were noticed within distutils-r1 / python-r1. I will send patches in the reply to this message. The patches: 1) introduce the initial version of multibuild based on the code from python-r1 and distutils-r1, 2) improve running 'tee' to a method not requiring subshelling the called function, 3) fix an issue of trying to write ${WORKDIR%/}-${impl} if S=3D${WORKDIR}, 4) convert multilib-build to use the new eclass, 5) provide python-r1 with a function to obtain enabled implementation list to make the migration possible, 6) convert python-r1 and distutils-r1 to use the new eclass, 7) move run_in_build_dir() common function to the new eclass, 8) convert sci-libs/fftw to the new eclass as an example of nested use. That's just the initial approach. If it works fine, the todo lists: 1) supporting nested parallel builds, 2) adding a function to run a snippet with just one ('default') variant, and possibly more. What are your thoughts? --=20 Best regards, Micha=C5=82 G=C3=B3rny --Sig_/HG.MTEE9pXIIQBMZwYErJFG Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (GNU/Linux) iQJ8BAEBCgBmBQJRLn2gXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXQ1RUJGMjBGOTk2RkIzQzIyQ0M2RkNBNDBC QUJGMUQ1RkY4QzgxMTBBAAoJELq/HV/4yBEKPcoQAMTiBsNTyzZkzSs9yyQn8GOc vLwzL8dv/nVpC+uZwDW957bLII6qzzl+1OYzH8J/71wsVrj7X+5qOrP6kpIbfOMx zSUobkD8Yt9LecMRsLUQGKzmdbkkq4DSWW9YAFqbiZ9jNBK7u54hlURywepk1G8k NI6xaNMmSH+QkoCUiW4nz3V6Pkjn3Q1qcSGK3Zc/kHYLvwUCh9VoO7rIaKUAwCau GfcHUkMgvP0kmMVlME4jIgXRPNP9gmA2MqeFTZF+9qg8sEGgcz8DgzKU3wdcbyqk lzz6QbaoI/DUf2MFaQNYqGuH1qXOZafkLxm1cngzkxsVAbUG3ko8zPkekik2zwEh 5bXI50S2/xQ2Dzx+oZqHZossaLInP7Gyfov+qQ78GMMe9pbqxBPt2ApDsLvMYJD8 fZjLc1xXqNmHBgVBDkADk0ywnnPqTvHYwUC2M4MZSURP6dMohq6qjuVK+BENiOQ3 zrBRfMTrgkje2mWEaAy2OG4cECvUba2uNBKdQHsCu+442WROiAWAMhnACsY4W2Gj 1BjCSeDiY3WlXBF6dGVhH1l4N939KKcZi6wBgh0evTjinYpWpixt8mtFKEJ50JwX jVoqBWToxIa1tyKLk/VzEW+8e5MfvkZ1i0RBM8eQ3EQIdjBafLVomxQEULnK0XyW LDtqId+RoqfVTbUV4k6C =6khP -----END PGP SIGNATURE----- --Sig_/HG.MTEE9pXIIQBMZwYErJFG--