[Git][NTPsec/ntpsec][master] Build script switches to site-packages on user install if necessary

Ian Bruene gitlab at mg.gitlab.com
Tue Dec 5 16:38:50 UTC 2017


Ian Bruene pushed to branch master at NTPsec / ntpsec


Commits:
f1f98aaa by Ian Bruene at 2017-12-05T10:21:00-06:00
Build script switches to site-packages on user install if necessary

This fixes the FHS violation in bug #414

- - - - -


1 changed file:

- pylib/wscript


Changes:

=====================================
pylib/wscript
=====================================
--- a/pylib/wscript
+++ b/pylib/wscript
@@ -11,6 +11,14 @@ 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")
 
 
 def build(ctx):



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

---
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/f1f98aaab30bc6d6846d993aeaa4533e7fe63036
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/20171205/3408512d/attachment.html>


More information about the vc mailing list