setup.py 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. import re
  2. from os import path
  3. from setuptools import setup
  4. # read() and find_version() taken from jezdez's python apps, ex:
  5. # https://github.com/jezdez/django_compressor/blob/develop/setup.py
  6. def read(*parts):
  7. return open(path.join(path.dirname(__file__), *parts)).read()
  8. def find_version(*file_paths):
  9. version_file = read(*file_paths)
  10. version_match = re.search(r"^__version__ = ['\"]([^'\"]*)['\"]",
  11. version_file, re.M)
  12. if version_match:
  13. return version_match.group(1)
  14. raise RuntimeError("Unable to find version string.")
  15. setup(
  16. name='django-timezone-field',
  17. version=find_version('timezone_field', '__init__.py'),
  18. author='Mike Fogel',
  19. author_email='mike@fogel.ca',
  20. description=(
  21. 'A Django app providing database and form fields for '
  22. 'pytz timezone objects.'
  23. ),
  24. long_description=read('README.rst'),
  25. url='http://github.com/mfogel/django-timezone-field/',
  26. license='BSD',
  27. packages=[
  28. 'timezone_field',
  29. ],
  30. install_requires=['django>=1.8', 'pytz'],
  31. classifiers=[
  32. 'Development Status :: 4 - Beta',
  33. 'Environment :: Web Environment',
  34. 'Intended Audience :: Developers',
  35. 'License :: OSI Approved :: BSD License',
  36. 'Operating System :: OS Independent',
  37. 'Programming Language :: Python',
  38. 'Programming Language :: Python :: 2',
  39. 'Programming Language :: Python :: 2.7',
  40. 'Programming Language :: Python :: 3',
  41. 'Programming Language :: Python :: 3.4',
  42. 'Programming Language :: Python :: 3.5',
  43. 'Programming Language :: Python :: 3.6',
  44. 'Topic :: Utilities',
  45. 'Framework :: Django',
  46. ],
  47. )