[Git][NTPsec/ntpsec][master] Ensure that the python scripts actually get compiled

Eric S. Raymond gitlab at mg.gitlab.com
Thu Nov 30 12:39:22 UTC 2017


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


Commits:
41be3c20 by Matt Selsky at 2017-11-28T13:53:23+00:00
Ensure that the python scripts actually get compiled

This ensures that we byte-compile the python scripts (as well as the python
libraries so that we catch syntax errors during the build, instead of at
run-time.

Fixes Gitlab issue #413

- - - - -


12 changed files:

- ntpclients/ntpdig → ntpclients/ntpdig.py
- ntpclients/ntpkeygen → ntpclients/ntpkeygen.py
- ntpclients/ntploggps → ntpclients/ntploggps.py
- ntpclients/ntplogtemp → ntpclients/ntplogtemp.py
- ntpclients/ntpmon → ntpclients/ntpmon.py
- ntpclients/ntpq → ntpclients/ntpq.py
- ntpclients/ntpsnmpd → ntpclients/ntpsnmpd.py
- ntpclients/ntpsweep → ntpclients/ntpsweep.py
- ntpclients/ntptrace → ntpclients/ntptrace.py
- ntpclients/ntpviz → ntpclients/ntpviz.py
- ntpclients/ntpwait → ntpclients/ntpwait.py
- wscript


Changes:

=====================================
ntpclients/ntpdig → ntpclients/ntpdig.py
=====================================


=====================================
ntpclients/ntpkeygen → ntpclients/ntpkeygen.py
=====================================


=====================================
ntpclients/ntploggps → ntpclients/ntploggps.py
=====================================


=====================================
ntpclients/ntplogtemp → ntpclients/ntplogtemp.py
=====================================


=====================================
ntpclients/ntpmon → ntpclients/ntpmon.py
=====================================


=====================================
ntpclients/ntpq → ntpclients/ntpq.py
=====================================


=====================================
ntpclients/ntpsnmpd → ntpclients/ntpsnmpd.py
=====================================


=====================================
ntpclients/ntpsweep → ntpclients/ntpsweep.py
=====================================


=====================================
ntpclients/ntptrace → ntpclients/ntptrace.py
=====================================


=====================================
ntpclients/ntpviz → ntpclients/ntpviz.py
=====================================


=====================================
ntpclients/ntpwait → ntpclients/ntpwait.py
=====================================


=====================================
wscript
=====================================
--- a/wscript
+++ b/wscript
@@ -1039,17 +1039,17 @@ def afterparty(ctx):
 
 
 python_scripts = [
-    "ntpclients/ntploggps",
-    "ntpclients/ntpdig",
-    "ntpclients/ntpkeygen",
-    "ntpclients/ntpmon",
-    "ntpclients/ntpq",
-    "ntpclients/ntpsweep",
-    "ntpclients/ntptrace",
-    "ntpclients/ntpviz",
-    "ntpclients/ntpwait",
-    "ntpclients/ntplogtemp",
-    "ntpclients/ntpsnmpd",
+    "ntpclients/ntploggps.py",
+    "ntpclients/ntpdig.py",
+    "ntpclients/ntpkeygen.py",
+    "ntpclients/ntpmon.py",
+    "ntpclients/ntpq.py",
+    "ntpclients/ntpsweep.py",
+    "ntpclients/ntptrace.py",
+    "ntpclients/ntpviz.py",
+    "ntpclients/ntpwait.py",
+    "ntpclients/ntplogtemp.py",
+    "ntpclients/ntpsnmpd.py",
 ]
 
 
@@ -1087,12 +1087,18 @@ def build(ctx):
     ctx.recurse("attic")
     ctx.recurse("tests")
 
+    # Make sure the python scripts actually get compiled
+    ctx(
+        features="py",
+        source=python_scripts,
+    )
+
     scripts = ["ntpclients/ntpleapfetch"] + python_scripts
 
     ctx(
         features="subst",
         source=scripts,
-        target=scripts,
+        target=[x.rstrip(".py") for x in scripts],
         chmod=Utils.O755,
         install_path='${BINDIR}',
     )



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

---
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/41be3c201be9d6407aee3afa8e602c6c43e737e3
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/20171130/d26bcf54/attachment.html>


More information about the vc mailing list