public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
From: Jon Nelson <jnelson@jamponi.net>
To: gentoo-dev@gentoo.org
Subject: [gentoo-dev] packages using DistUtils
Date: Sun, 28 Apr 2002 11:28:35 -0500	[thread overview]
Message-ID: <20020428112835.3cbcd741.jnelson@jamponi.net> (raw)

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


             reply	other threads:[~2002-04-28 16:29 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-04-28 16:28 Jon Nelson [this message]
2002-04-28 16:37 ` [gentoo-dev] packages using DistUtils Jon Nelson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20020428112835.3cbcd741.jnelson@jamponi.net \
    --to=jnelson@jamponi.net \
    --cc=gentoo-dev@gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox