[Git][NTPsec/ntpsec][master] Possible, and very hacky, fix for #414

Ian Bruene gitlab at mg.gitlab.com
Wed Dec 6 23:43:27 UTC 2017


Ian Bruene pushed to branch master at NTPsec / ntpsec


Commits:
6fd82812 by Ian Bruene at 2017-12-06T23:43:21+00:00
Possible, and very hacky, fix for #414

- - - - -


1 changed file:

- pylib/wscript


Changes:

=====================================
pylib/wscript
=====================================
--- a/pylib/wscript
+++ b/pylib/wscript
@@ -11,14 +11,17 @@ def configure(conf):
     fixed.load('python')
     fixed.check_python_version((2, 6, 0))
     conf.check_python_headers(features='pyext')  # Extension-only, no embedded
-    # Library directory hack, dist-packages is what python reports.
-    # That is reserved by the FHS, we have to use site-packages for user
-    # installs. Distribution installs can use dist-packages.
-    if "/usr/local/" in conf.env.PYTHONDIR:
-        if "dist-packages" in conf.env.PYTHONDIR:
-            conf.env.PYTHONDIR = conf.env.PYTHONDIR.replace("dist", "site")
-        if "dist-packages" in conf.env.PYTHONARCHDIR:
-            conf.env.PYTHONARCHDIR = conf.env.PYTHONARCHDIR.replace("dist", "site")
+    # Library directory hack
+    # For unknown reasons python libs are getting shunted off where they
+    # should not be on gentoo. I DO NOT KNOW HOW BRITTLE THIS CODE IS.
+    if conf.env.PYTHONDIR.startswith(conf.env.PREFIX) is False:
+        splitPoint = conf.env.PYTHONDIR.find("/python")
+        tail = conf.env.PYTHONDIR[splitPoint:]
+        conf.env.PYTHONDIR = conf.env.PREFIX + "lib" + tail
+    if conf.env.PYTHONARCHDIR.startswith(conf.env.PREFIX) is False:
+        splitPoint = conf.env.PYTHONARCHDIR.find("/python")
+        tail = conf.env.PYTHONARCHDIR[splitPoint:]
+        conf.env.PYTHONARCHDIR = conf.env.PREFIX + "lib" + tail
 
 
 def build(ctx):



View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/6fd82812b8e1cae096a78fde3c857b31b22640cf

---
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/6fd82812b8e1cae096a78fde3c857b31b22640cf
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/20171206/7cd18804/attachment.html>


More information about the vc mailing list