aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2021-03-07 08:09:01 -0800
committerZac Medico <zmedico@gentoo.org>2021-03-07 08:14:18 -0800
commit6ca34493df931d858ee1e568d9c7cf3a15ec6ab7 (patch)
treea1b85aef20276e0ddb0e2159c0257d4639356a9b
parentbin_entry_point: fix sys.argv[0] for non-python programs (diff)
downloadportage-6ca34493df931d858ee1e568d9c7cf3a15ec6ab7.tar.gz
portage-6ca34493df931d858ee1e568d9c7cf3a15ec6ab7.tar.bz2
portage-6ca34493df931d858ee1e568d9c7cf3a15ec6ab7.zip
setup.py: prefix paths in repos.conf and make.globals for pip venv install
Prefix paths in repos.conf and make.globals for pip venv install so that that default paths will all be located inside the venv. The EPREFIX value must be symbolic, since it cannot be known until runtime. Fixes: c495b6f67453 ("setup.py: prefix repos.conf paths for venv") Signed-off-by: Zac Medico <zmedico@gentoo.org>
-rwxr-xr-xsetup.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/setup.py b/setup.py
index 6be01e863..20ebc2fce 100755
--- a/setup.py
+++ b/setup.py
@@ -429,6 +429,10 @@ class x_install_data(install_data):
with codecs.open(path, 'w', 'utf-8') as f:
f.write(data)
+ if create_entry_points:
+ re_sub_file('cnf/repos.conf', r'= /', '= %(EPREFIX)s/')
+ re_sub_file('cnf/make.globals', r'DIR="/', 'DIR="${EPREFIX}/')
+
self.run_command('build_man')
def process_data_files(df):