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

Ian Bruene gitlab at mg.gitlab.com
Tue Dec 5 16:09:33 UTC 2017


Ian Bruene pushed to branch fixinstall at NTPsec / ntpsec


Commits:
5a5fedca by Ian Bruene at 2017-12-05T10:08:42-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 for pip by the FHS, we have to use site-packages
+	# WARNING: this is wrong if - say - the pip devs built a NTPsec package
+    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/5a5fedcafb84d85bdd0b2af29737f95a1e9cca2c

---
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/5a5fedcafb84d85bdd0b2af29737f95a1e9cca2c
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/1d173640/attachment.html>


More information about the vc mailing list