[Git][NTPsec/ntpsec][master] Modify FixConfig to apply PREFIX to Python library paths.

Eric S. Raymond gitlab at mg.gitlab.com
Wed Sep 27 14:23:28 UTC 2017


Eric S. Raymond pushed to branch master at NTPsec / ntpsec


Commits:
99307837 by Eric S. Raymond at 2017-09-27T10:22:14-04:00
Modify FixConfig to apply PREFIX to Python library paths.

- - - - -


1 changed file:

- wafhelpers/fix_python_config.py


Changes:

=====================================
wafhelpers/fix_python_config.py
=====================================
--- a/wafhelpers/fix_python_config.py
+++ b/wafhelpers/fix_python_config.py
@@ -53,6 +53,10 @@ class FixConfig(object):
         """Capture values after option processing."""
         self.opts = self.conf.env.derive().detach()
 
+    def massage(self, path):
+        "Massage Python library path to get around upstream bug."
+        return path.replace('/usr', self.conf.env.PREFIX)
+
     def fix_python_libs(self):
         """Fix up library install paths."""
         # Remember original setting for "compatibility cleanup".
@@ -63,13 +67,13 @@ class FixConfig(object):
             (pydir,) = self.conf.get_python_variables(
                 ["get_python_lib(plat_specific=0)"]
                 )
-            self.conf.env.PYTHONDIR = pydir
+            self.conf.env.PYTHONDIR = self.massage(pydir)
         if not ('PYTHONARCHDIR' in self.opts
                 or 'PYTHONARCHDIR' in self.conf.environ):
             (pyarchdir,) = self.conf.get_python_variables(
                 ["get_python_lib(plat_specific=1)"]
                 )
-            self.conf.env.PYTHONARCHDIR = pyarchdir or pydir
+            self.conf.env.PYTHONARCHDIR = self.massage(pyarchdir or pydir)
 
     def load(self, *args, **kwargs):
         """Do the load and capture the options."""



View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/993078379661418a893ed218a76c813ec45de6cb

---
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/993078379661418a893ed218a76c813ec45de6cb
You're receiving this email because of your account on gitlab.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ntpsec.org/pipermail/vc/attachments/20170927/404038c4/attachment.html>


More information about the vc mailing list