-
Notifications
You must be signed in to change notification settings - Fork 3
/
setup.py
65 lines (51 loc) · 1.56 KB
/
setup.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
from distutils.core import setup
long_description = """
ntplib - Python NTP library
===========================
Description
-----------
This module offers a simple interface to query NTP servers from Python.
It also provides utility functions to translate NTP fields values to text (mode,
leap indicator...). Since it's pure Python, and only depends on core modules, it
should work on any platform with a Python implementation.
Example
-------
>>> import ntplib
>>> from time import ctime
>>> c = ntplib.NTPClient()
>>> response = c.request('europe.pool.ntp.org', version=3)
>>> response.offset
-0.143156766891
>>> response.version
3
>>> ctime(response.tx_time)
'Sun May 17 09:32:48 2009'
>>> ntplib.leap_to_text(response.leap)
'no warning'
>>> response.root_delay
0.0046844482421875
>>> ntplib.ref_id_to_text(response.ref_id)
193.190.230.66
Installation
------------
As root::
# python setup.py install
or just copy ntplib.py inside a directory in your sys.path, e.g.
`/usr/lib/python2.5/`.
"""
setup(name='ntplib',
version='0.3.0',
description='Python NTP library',
author='Charles-Francois Natali',
author_email='[email protected]',
url='http://pypi.python.org/pypi/ntplib/',
py_modules=['ntplib'],
license='LGPL',
classifiers=[
'License :: OSI Approved :: GNU Library or Lesser General Public License (LGPL)',
'Programming Language :: Python',
'Operating System :: OS Independent',
'Topic :: System :: Networking :: Time Synchronization'
],
long_description=long_description
)