commit:     6ca34493df931d858ee1e568d9c7cf3a15ec6ab7
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Sun Mar  7 16:09:01 2021 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Sun Mar  7 16:14:18 2021 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=6ca34493

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 <AT> gentoo.org>

 setup.py | 4 ++++
 1 file changed, 4 insertions(+)

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):

Reply via email to