Fix setup.py to work with EPREFIX changes in Portage (Bug 394909).
authorPaul Varner <fuzzyray@gentoo.org>
Mon, 19 Dec 2011 19:38:40 +0000 (13:38 -0600)
committerPaul Varner <fuzzyray@gentoo.org>
Mon, 19 Dec 2011 19:38:40 +0000 (13:38 -0600)
setup.py

index f65a9336cd0335cc7c2906fa1085c646f518ab55..1efba94d8d0b76b212bd4e6f427a5e06281056bc 100755 (executable)
--- a/setup.py
+++ b/setup.py
@@ -22,7 +22,7 @@ cwd = os.getcwd()
 try: 
        from portage.const import EPREFIX 
 except ImportError: 
-       EPREFIX='/
+       EPREFIX='' 
 
 
 # Bash files that need `VERSION=""` subbed, relative to this dir:
@@ -127,10 +127,10 @@ core.setup(
        package_data = test_data,
        scripts=(glob('bin/*')),
        data_files=(
-               (os.path.join(EPREFIX, 'etc/env.d'), ['data/99gentoolkit-env']),
-               (os.path.join(EPREFIX, 'etc/revdep-rebuild'), ['data/revdep-rebuild/99revdep-rebuild']),
-               (os.path.join(EPREFIX, 'etc/eclean'), glob('data/eclean/*')),
-               (os.path.join(EPREFIX, 'usr/share/man/man1'), glob('man/*')),
+               (os.path.join(os.sep, EPREFIX.lstrip(os.sep), 'etc/env.d'), ['data/99gentoolkit-env']),
+               (os.path.join(os.sep, EPREFIX.lstrip(os.sep), 'etc/revdep-rebuild'), ['data/revdep-rebuild/99revdep-rebuild']),
+               (os.path.join(os.sep, EPREFIX.lstrip(os.sep), 'etc/eclean'), glob('data/eclean/*')),
+               (os.path.join(os.sep, EPREFIX.lstrip(os.sep), 'usr/share/man/man1'), glob('man/*')),
        ),
        cmdclass={
                'test': load_test(),