From: Paul Varner Date: Mon, 19 Dec 2011 19:38:40 +0000 (-0600) Subject: Fix setup.py to work with EPREFIX changes in Portage (Bug 394909). X-Git-Tag: gentoolkit-0.3.0.5~9 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=10aaed2b07c11065418d0e9e2c7aa52ae0837300;p=gentoolkit.git Fix setup.py to work with EPREFIX changes in Portage (Bug 394909). --- diff --git a/setup.py b/setup.py index f65a933..1efba94 100755 --- 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(),