setup.py 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. import os
  2. import re
  3. from setuptools import setup, find_packages
  4. import sys
  5. here = os.path.abspath(os.path.dirname(__file__))
  6. with open(os.path.join(here, 'README.md')) as f:
  7. README = f.read()
  8. with open(os.path.join(here, 'CHANGES.md')) as f:
  9. CHANGES = f.read()
  10. version = ''
  11. with open(os.path.join(here, 'kazoo', 'version.py')) as f:
  12. version = re.search(r'^__version__\s*=\s*[\'"]([^\'"]*)[\'"]',
  13. f.read(), re.MULTILINE).group(1)
  14. PYPY = getattr(sys, 'pypy_version_info', False) and True or False
  15. install_requires = ['six']
  16. tests_require = install_requires + [
  17. 'mock',
  18. 'pytest',
  19. 'pytest-cov',
  20. 'flake8',
  21. 'objgraph',
  22. ]
  23. if not PYPY:
  24. tests_require += [
  25. 'gevent>=1.2',
  26. 'eventlet>=0.17.1',
  27. ]
  28. on_rtd = os.environ.get('READTHEDOCS', None) == 'True'
  29. if on_rtd:
  30. install_requires += [
  31. 'gevent>=1.2',
  32. 'eventlet>=0.17.1',
  33. 'pure-sasl',
  34. ]
  35. setup(
  36. name='kazoo',
  37. version=version,
  38. description='Higher Level Zookeeper Client',
  39. long_description=README + '\n\n' + CHANGES,
  40. classifiers=[
  41. "Development Status :: 5 - Production/Stable",
  42. "License :: OSI Approved :: Apache Software License",
  43. "Intended Audience :: Developers",
  44. "Operating System :: OS Independent",
  45. "Programming Language :: Python",
  46. "Programming Language :: Python :: 2",
  47. "Programming Language :: Python :: 2.7",
  48. "Programming Language :: Python :: 3",
  49. "Programming Language :: Python :: 3.4",
  50. "Programming Language :: Python :: 3.5",
  51. "Programming Language :: Python :: 3.6",
  52. "Programming Language :: Python :: 3.7",
  53. "Programming Language :: Python :: Implementation :: CPython",
  54. "Programming Language :: Python :: Implementation :: PyPy",
  55. "Topic :: Communications",
  56. "Topic :: System :: Distributed Computing",
  57. "Topic :: System :: Networking",
  58. ],
  59. keywords='zookeeper lock leader configuration',
  60. author="Kazoo team",
  61. author_email="python-zk@googlegroups.com",
  62. url="https://kazoo.readthedocs.io",
  63. license="Apache 2.0",
  64. packages=find_packages(),
  65. test_suite="kazoo.tests",
  66. include_package_data=True,
  67. zip_safe=False,
  68. install_requires=install_requires,
  69. tests_require=tests_require,
  70. extras_require={
  71. 'test': tests_require,
  72. 'sasl': ['pure-sasl==0.5.1'],
  73. },
  74. long_description_content_type="text/markdown",
  75. )