setup.py 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. # -*- coding: utf-8 -*-
  2. """
  3. monotonic
  4. ~~~~~~~~~
  5. This module provides a ``monotonic()`` function which returns the
  6. value (in fractional seconds) of a clock which never goes backwards.
  7. On Python 3.3 or newer, ``monotonic`` will be an alias of
  8. ``time.monotonic`` from the standard library. On older versions,
  9. it will fall back to an equivalent implementation:
  10. +------------------+----------------------------------------+
  11. | Linux, BSD, AIX | ``clock_gettime(3)`` |
  12. +------------------+----------------------------------------+
  13. | Windows | ``GetTickCount`` or ``GetTickCount64`` |
  14. +------------------+----------------------------------------+
  15. | OS X | ``mach_absolute_time`` |
  16. +------------------+----------------------------------------+
  17. If no suitable implementation exists for the current platform,
  18. attempting to import this module (or to import from it) will
  19. cause a ``RuntimeError`` exception to be raised.
  20. """
  21. try:
  22. from setuptools import setup
  23. except ImportError:
  24. from distutils.core import setup
  25. setup(
  26. name='monotonic',
  27. version='1.5',
  28. license='Apache',
  29. author='Ori Livneh',
  30. author_email='ori@wikimedia.org',
  31. url='https://github.com/atdt/monotonic',
  32. description='An implementation of time.monotonic() for Python 2 & < 3.3',
  33. long_description=__doc__,
  34. classifiers=[
  35. 'Development Status :: 5 - Production/Stable',
  36. 'License :: OSI Approved :: Apache Software License',
  37. 'Programming Language :: Python :: 2',
  38. 'Programming Language :: Python :: 3',
  39. 'Topic :: Software Development :: Libraries :: Python Modules',
  40. ],
  41. py_modules=('monotonic',),
  42. )