1 |
I'll try to say this without offending anybody. |
2 |
Any package that uses DistUtils (ie, you have build or install lines that |
3 |
use 'setup.py'), *please* understand that the following is *incorrect*: |
4 |
|
5 |
python setup.py --prefix=${D}/usr build || die |
6 |
(or install) |
7 |
|
8 |
That sets the *prefix* to ${D}/usr, which for most things isn't an issue, |
9 |
but the *prefix* is embedded in some apps. |
10 |
|
11 |
The *correct* way to build or install is to use the following form: |
12 |
|
13 |
src_compile() { |
14 |
python setup.py --prefix=/usr build || die |
15 |
} |
16 |
|
17 |
src_install() { |
18 |
python setup.py --root=${D} --prefix=/usr install || die |
19 |
# etc... |
20 |
} |
21 |
|
22 |
The reason why has to do with the same reasons why doing a ./configure |
23 |
with a --prefix of ${D}/usr is a *bad* idea -- it is *not* the prefix (the |
24 |
prefix is /usr). |
25 |
|
26 |
Additionally, even though DistUtils is nice enough to build during install |
27 |
if |
28 |
not already built, it's generally good practice to have a separate build |
29 |
in |
30 |
src_compile, but that is less critical than the --prefix issue. |
31 |
|
32 |
Thanks! |
33 |
|
34 |
-- |
35 |
Pound for pound, the amoeba is the most vicious animal on earth. |
36 |
|
37 |
Jon Nelson <jnelson@×××××××.net> |
38 |
C and Python Code Gardener |