Gentoo Archives: gentoo-python

From: "Michał Górny" <mgorny@g.o>
To: "Michał Górny" <mgorny@g.o>
Cc: gentoo-python@l.g.o
Subject: Re: [gentoo-python] distutils-r1 -- support for out-of-source builds?
Date: Sun, 28 Oct 2012 15:54:38
Message-Id: 20121028165518.5f1afe4a@pomiocik.lan
In Reply to: [gentoo-python] distutils-r1 -- support for out-of-source builds? by "Michał Górny"
1 On Sun, 28 Oct 2012 08:57:05 +0100
2 Michał Górny <mgorny@g.o> wrote:
3
4 > On the other hand, we would introduce a tiny bit of additional code.
5
6 I did a bit research on the topic, and the code introduced is circa 100
7 lines, including docs and esetuppy() which would be probably added
8 anyway. There are other potential problems however.
9
10 The main issue is how distutils is designed. The only command accepting
11 build-dir is the 'build' command. Other commands which need to access
12 the build tree just use some weird method of getting parameters for
13 other commands. Effectively, if you need to provide a build-dir, you
14 always have to run 'build'.
15
16 So, the install command would grow from:
17
18 ./setup.py install ...
19
20 to:
21
22 ./setup.py build -b ... install ...
23
24 Of course, all other commands accessing the build-dir would need to
25 be prepended with the 'build -b ...' as well. For that reason,
26 the patches I'm going to attach add that thing to esetuppy() directly.
27
28 This has the following implications:
29
30 1) all calls to esetuppy() involve running build,
31
32 2) if build takes additional arguments, they may need to be passed
33 consistently to all esetuppy calls (like: 'build --foo' in args).
34 Otherwise, a rebuild with different options may happen (but that's
35 probably a case already anyway).
36
37 In any case, I wouldn't say it's very elegant of Python. It will work
38 flawlessly for the most of Python packages, and likely most
39 of the remaining ones would require running in-source builds anyway
40 (and that can be enabled with a single variable).
41
42 Well, best just look at the code and tell me what you think.
43
44 --
45 Best regards,
46 Michał Górny

Attachments

File name MIME type
signature.asc application/pgp-signature

Replies