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>
diff --git a/setup.py b/setup.py
index 6be01e8..20ebc2f 100755
--- a/setup.py
+++ b/setup.py
@@ -429,6 +429,10 @@
 			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):