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 |