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 B9C26198005 for ; Sun, 24 Feb 2013 12:45:44 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 4DDBBE0552; Sun, 24 Feb 2013 12:45:44 +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 AF3A8E0552 for ; Sun, 24 Feb 2013 12:45:43 +0000 (UTC) Received: from pomiocik.lan (unknown [213.195.173.220]) (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 CFEB433DC80; Sun, 24 Feb 2013 12:45:41 +0000 (UTC) Date: Sun, 24 Feb 2013 13:45:51 +0100 From: =?UTF-8?B?TWljaGHFgiBHw7Nybnk=?= To: gentoo-python@lists.gentoo.org Cc: python@gentoo.org Subject: [gentoo-python] [PATCHES] distutils-r1: making in-source builds more compatible with out-of-source builds Message-ID: <20130224134551.63bd9791@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: 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-SHA512; boundary="Sig_/WUtb_n57hfb2Lu.K0Nv4MZM"; protocol="application/pgp-signature" X-Archives-Salt: 589d694b-5ab8-424b-9e21-ed1378aa3b16 X-Archives-Hash: 445f741a8b642d755693417a4efc2f60 --Sig_/WUtb_n57hfb2Lu.K0Nv4MZM Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hello, Currently in-source builds differ a lot from out-of-source builds. Most notably: - BUILD_DIR points to source dir rather than build dir, - build directories are not overriden, - PYTHONPATH is not set. With the net outcome being that: - in-source builds are theoretically safer for weird build system hacks, - in-source build ebuilds are harder to write, - switching between one and the other requires a fair amount of changes. If we consider then that enabling in-source build should be considered a quick and possibly temporary hack to get the package to build, points 2/3 seem to really outweigh the benefit of 1. For that reason, I'd like to 'unify' the behavior between the two. The patches which I will send in reply to this mail will: 1) make BUILD_DIR point to the 'build' subdirectory in in-source builds, 2) override build locations the same way in both kinds of builds, 3) set PYTHONPATH in in-source builds, 4) [optional] run *_all() phases in implementation-specific sources copy rather than ${S}. This is an incompatible change but seems to be the least troublesome possibility. Most importantly, any ebuild using BUILD_DIR in python_*_all() phase will become at least partially broken. Hopefully, this ain't as bad as it seems. Those ebuilds which used BUILD_DIR there to append to PYTHONPATH will still work. While the appending will no longer be correct, the newly-introduced PYTHONPATH will take precedence and solve the issue for now. There is also the potential of packages being broken because of --build-* overrides. But the most common case of relying on standard locations would probably still work because the new paths will mostly be absolute-path variants of the default locations. In any case, I'm testing this a bit now and will let you know what gets broken. Rationale: The code appends '/build' subdirectory to BUILD_DIR in distutils-r1 (python-r1's BUILD_DIR still points to the sources). This seemed like the best possible way of achieving the goal since: 1) BUILD_DIR is not used commonly in in-source build ebuilds, 2) using ${BUILD_DIR}/lib with BUILD_DIR pointing to source root is likely to collide with package sources, 3) using ${BUILD_DIR}/build/lib conditionally would cause incompatibility with out-of-source builds, 4) using ${BUILD_DIR}/build/lib unconditionally would break a fair number of out-of-source build ebuilds using '${BUILD_DIR}/lib'. Therefore, appending the 'build' subdir to BUILD_DIR seems like the least evil necessary to fix the past mistake. --=20 Best regards, Micha=C5=82 G=C3=B3rny --Sig_/WUtb_n57hfb2Lu.K0Nv4MZM Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (GNU/Linux) iQJ8BAEBCgBmBQJRKguCXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXQ1RUJGMjBGOTk2RkIzQzIyQ0M2RkNBNDBC QUJGMUQ1RkY4QzgxMTBBAAoJELq/HV/4yBEKibYP/0oitSRjeIycyWJjZ3SVqPXa ldsjK6ehDRVf3Nm/6KwmbT4UN8sHp14l6Isz7u3D7QaECYUUlgb3fOeCoOZN0RkX 75WU7KUTN5GksvhCNFPIOfoEN3S8NJHndVyNvoo/qJY7P7/Wm6zBkPYJchApj/ic F1uGrcT89G5iImhmthT/3acH1NVWHr273SktqYe9q2848aCURwiRGuDTqEUimsjN ycB8Fcj+u5tW2WywgjSgoc7WmHAxJoqXnmBOBh07qh8QAhQgnIK9c6kTvBen0951 gNxIS81e6zdZWif/kBxK5tUOEPrafkfBtqO3xS55LKZgp/fjjOEzwkEnESl8x/Gd BiiYMzyVF5gQNf++RZ6/cObXV0C9J/GASSAYdnQ4yAJtAFZpzOrkQmlywKsMKKG0 am+RuLjHzp1IKxAwo/Ite1s7BkK1TiBkVgpMrcU9DZzZfqjznY/tQHZhtxqkGDh+ XF/hWc+gUaMCRUpFUzJzs3GAYzH1L363Oo6iAjML5pDmckS+5xLp+W8nj7y/pnmK 1EC+uQfpAmmXq+1p6O4ueb2aYNQEdlMBL4NfH5pD79s0ZkQ6kiRuLBBIy5eLbyXD qqgUtk/USrs52fGAcnBXyO0Rb5iprndzrosAlh9YzF5dNwfdwwpT1+ql/cszgZhn a5lPjcrJBR3c88MpvyS/ =nNea -----END PGP SIGNATURE----- --Sig_/WUtb_n57hfb2Lu.K0Nv4MZM--