[Git][NTPsec/ntpsec][master] 2 commits: New pylib directory contains installable Python libraries.

Eric S. Raymond gitlab at mg.gitlab.com
Thu Aug 11 12:15:15 UTC 2016


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


Commits:
4a92119a by Eric S. Raymond at 2016-08-11T07:56:54-04:00
New pylib directory contains installable Python libraries.

- - - - -
aabfd7b1 by Eric S. Raymond at 2016-08-11T08:14:53-04:00
Typo fix.

- - - - -


6 changed files:

- README
- + ntpq/ntp
- ntpq/pyntpq
- + pylib/README
- + pylib/__init__.py
- ntpq/libntpq.py → pylib/packet.py


Changes:

=====================================
README
=====================================
--- a/README
+++ b/README
@@ -72,7 +72,9 @@ ntpq/::		Directory containing sources for a utility program to
 		related timekeeping information. This program conforms
 		to Appendix A of the NTP Version 3 Specification RFC 1305.
 
-ntpstats::	Statistics visualization and analysis tools build around
+pylib/::	Installable Python helper classes.
+
+ntpstats/::	Statistics visualization and analysis tools built around
 		the Python ntpstats.py module. Includes ntpviz.
 
 ntptime/:: 	Directory containing a utility for reading and modifying


=====================================
ntpq/ntp
=====================================
--- /dev/null
+++ b/ntpq/ntp
@@ -0,0 +1 @@
+../pylib
\ No newline at end of file


=====================================
ntpq/pyntpq
=====================================
--- a/ntpq/pyntpq
+++ b/ntpq/pyntpq
@@ -13,7 +13,7 @@ from __future__ import print_function, division
 import os, sys, getopt, cmd, errno, curses, curses.ascii
 import socket, select, struct, shlex
 
-from libntpq import *
+from ntp.packet import *
 
 # This import only works on Unixes.  The intention is to enable
 # Ctrl-P, Ctrl-N, and friends in Cmd.


=====================================
pylib/README
=====================================
--- /dev/null
+++ b/pylib/README
@@ -0,0 +1,6 @@
+= pylib README =
+
+This directory contains helper classes for NTP utilities written in
+Python.  It should be installed under the name 'ntp'. It is locally
+symlinked under that name at other places in the tree so that various
+utilities can be run before the package has been installed.


=====================================
pylib/__init__.py
=====================================
--- /dev/null
+++ b/pylib/__init__.py
@@ -0,0 +1,8 @@
+# SPDX-License-Identifier: BSD-2-clause
+#
+# This code runs compatibly under Python 2 and 3.x for x >= 2.
+# Preserve this property!
+from __future__ import absolute_import  # Ensure Python2 behaves like Python 3
+
+api_major_version = 1   # bumped on incompatible changes
+api_minor_version = 0   # bumped on compatible changes


=====================================
ntpq/libntpq.py → pylib/packet.py
=====================================
--- a/ntpq/libntpq.py
+++ b/pylib/packet.py
@@ -1,5 +1,5 @@
 #
-# libntpq.py - definitions and classes for ntp-style querying of NTP
+# packet.py - definitions and classes for ntp-style querying of NTP
 #
 # This code should be Python2-vs-Python-3 agnostic.  Keep it that way!
 #



View it on GitLab: https://gitlab.com/NTPsec/ntpsec/compare/caa9268daa4144ba258ce989e45265782b01ba1e...aabfd7b1889356baae2df60e9bf8686b91fc5c29
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ntpsec.org/pipermail/vc/attachments/20160811/7c9a515e/attachment.html>


More information about the vc mailing list