From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: <gentoo-python+bounces-188-garchives=archives.gentoo.org@lists.gentoo.org> Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id B310E138010 for <garchives@archives.gentoo.org>; Sun, 28 Oct 2012 16:04:12 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id D873121C04A; Sun, 28 Oct 2012 16:04:08 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 57A9F21C04A for <gentoo-python@lists.gentoo.org>; Sun, 28 Oct 2012 16:04:08 +0000 (UTC) Received: from mail-ea0-f181.google.com (mail-ea0-f181.google.com [209.85.215.181]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: floppym) by smtp.gentoo.org (Postfix) with ESMTPSA id 9177F33D88E for <gentoo-python@lists.gentoo.org>; Sun, 28 Oct 2012 16:04:07 +0000 (UTC) Received: by mail-ea0-f181.google.com with SMTP id m6so1505671eab.40 for <gentoo-python@lists.gentoo.org>; Sun, 28 Oct 2012 09:04:04 -0700 (PDT) Precedence: bulk List-Post: <mailto:gentoo-python@lists.gentoo.org> List-Help: <mailto:gentoo-python+help@lists.gentoo.org> List-Unsubscribe: <mailto:gentoo-python+unsubscribe@lists.gentoo.org> List-Subscribe: <mailto:gentoo-python+subscribe@lists.gentoo.org> List-Id: Discussions centering around the Python ecosystem in Gentoo Linux <gentoo-python.gentoo.org> X-BeenThere: gentoo-python@gentoo.org X-BeenThere: gentoo-python@lists.gentoo.org MIME-Version: 1.0 Received: by 10.14.213.65 with SMTP id z41mr51827633eeo.29.1351440244700; Sun, 28 Oct 2012 09:04:04 -0700 (PDT) Received: by 10.223.75.137 with HTTP; Sun, 28 Oct 2012 09:04:04 -0700 (PDT) In-Reply-To: <20121028165518.5f1afe4a@pomiocik.lan> References: <20121028085705.62e1eed4@pomiocik.lan> <20121028165518.5f1afe4a@pomiocik.lan> Date: Sun, 28 Oct 2012 12:04:04 -0400 Message-ID: <CAJ0EP400yViKCpaTVPgDkcUJkhsH+uHVS4Zy9_hmrfX8qLRifg@mail.gmail.com> Subject: Re: [gentoo-python] distutils-r1 -- support for out-of-source builds? From: Mike Gilbert <floppym@gentoo.org> To: =?UTF-8?B?TWljaGHFgiBHw7Nybnk=?= <mgorny@gentoo.org> Cc: gentoo-python@lists.gentoo.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Archives-Salt: e0e64db1-e265-469b-bdd5-290a4894cf6a X-Archives-Hash: 1773b6534f3509b9ceea117bdf8ad815 On Sun, Oct 28, 2012 at 11:55 AM, Micha=C5=82 G=C3=B3rny <mgorny@gentoo.org= > wrote: > On Sun, 28 Oct 2012 08:57:05 +0100 > Micha=C5=82 G=C3=B3rny <mgorny@gentoo.org> wrote: > >> On the other hand, we would introduce a tiny bit of additional code. > > I did a bit research on the topic, and the code introduced is circa 100 > lines, including docs and esetuppy() which would be probably added > anyway. There are other potential problems however. > > The main issue is how distutils is designed. The only command accepting > build-dir is the 'build' command. Other commands which need to access > the build tree just use some weird method of getting parameters for > other commands. Effectively, if you need to provide a build-dir, you > always have to run 'build'. > > So, the install command would grow from: > > ./setup.py install ... > > to: > > ./setup.py build -b ... install ... > > Of course, all other commands accessing the build-dir would need to > be prepended with the 'build -b ...' as well. For that reason, > the patches I'm going to attach add that thing to esetuppy() directly. > > This has the following implications: > > 1) all calls to esetuppy() involve running build, > > 2) if build takes additional arguments, they may need to be passed > consistently to all esetuppy calls (like: 'build --foo' in args). > Otherwise, a rebuild with different options may happen (but that's > probably a case already anyway). > > In any case, I wouldn't say it's very elegant of Python. It will work > flawlessly for the most of Python packages, and likely most > of the remaining ones would require running in-source builds anyway > (and that can be enabled with a single variable). > > Well, best just look at the code and tell me what you think. > I don't really see any need for out-of-source builds, but if you want to write the code for it I certainly don't mind having it there. I will say that doing out-of-source builds occasionally makes writing src_test a bit tricky; you have to play with the working directory and PYTHONPATH.