summaryrefslogtreecommitdiff
path: root/setup.py
diff options
context:
space:
mode:
authorfuzzyray <fuzzyray@gentoo.org>2010-04-08 21:13:07 +0000
committerfuzzyray <fuzzyray@gentoo.org>2010-04-08 21:13:07 +0000
commitf146d54860527cf1cfe8010d09730fd0a20fc690 (patch)
treece7a1c3921f2782d6180549c207bde14425f7e8e /setup.py
parentb6b3c64b95be0c45011a06ef9a046a4071862a72 (diff)
downloadgentoolkit-f146d54860527cf1cfe8010d09730fd0a20fc690.tar.gz
Sync with genscripts rev 422, includes fixes to eclean and python additions for prefix
svn path=/trunk/gentoolkit/; revision=768
Diffstat (limited to 'setup.py')
-rwxr-xr-xsetup.py15
1 files changed, 11 insertions, 4 deletions
diff --git a/setup.py b/setup.py
index dc84037..0bd2dd1 100755
--- a/setup.py
+++ b/setup.py
@@ -17,6 +17,13 @@ __version__ = os.getenv('VERSION', default='9999')
cwd = os.getcwd()
+# Load EPREFIX from Portage, fall back to the empty string if it fails
+ try:
+ from portage.const import EPREFIX
+ except AttributeError:
+ EPREFIX=''
+
+
# Bash files that need `VERSION=""` subbed, relative to this dir:
bash_scripts = [os.path.join(cwd, path) for path in (
'bin/euse',
@@ -109,10 +116,10 @@ core.setup(
packages=packages,
scripts=(glob('bin/*')),
data_files=(
- ('/etc/env.d', ['data/99gentoolkit-env']),
- ('/etc/revdep-rebuild', ['data/revdep-rebuild/99revdep-rebuild']),
- ('/etc/eclean', glob('data/eclean/*')),
- ('/usr/share/man/man1', glob('man/*'))
+ (EPREFIX + '/etc/env.d', ['data/99gentoolkit-env']),
+ (EPREFIX + '/etc/revdep-rebuild', ['data/revdep-rebuild/99revdep-rebuild']),
+ (EPREFIX + '/etc/eclean', glob('data/eclean/*')),
+ (EPREFIX + '/usr/share/man/man1', glob('man/*'))
),
cmdclass={
'test': load_test(),