* [gentoo-dev] packages using DistUtils
@ 2002-04-28 16:28 Jon Nelson
2002-04-28 16:37 ` Jon Nelson
0 siblings, 1 reply; 2+ messages in thread
From: Jon Nelson @ 2002-04-28 16:28 UTC (permalink / raw
To: gentoo-dev
I'll try to say this without offending anybody.
Any package that uses DistUtils (ie, you have build or install lines that
use 'setup.py'), *please* understand that the following is *incorrect*:
python setup.py --prefix=${D}/usr build || die
(or install)
That sets the *prefix* to ${D}/usr, which for most things isn't an issue,
but the *prefix* is embedded in some apps.
The *correct* way to build or install is to use the following form:
src_compile() {
python setup.py --prefix=/usr build || die
}
src_install() {
python setup.py --root=${D} --prefix=/usr install || die
# etc...
}
The reason why has to do with the same reasons why doing a ./configure
with a --prefix of ${D}/usr is a *bad* idea -- it is *not* the prefix (the
prefix is /usr).
Additionally, even though DistUtils is nice enough to build during install
if
not already built, it's generally good practice to have a separate build
in
src_compile, but that is less critical than the --prefix issue.
Thanks!
--
Pound for pound, the amoeba is the most vicious animal on earth.
Jon Nelson <jnelson@jamponi.net>
C and Python Code Gardener
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2002-04-28 16:37 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-04-28 16:28 [gentoo-dev] packages using DistUtils Jon Nelson
2002-04-28 16:37 ` Jon Nelson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox