setup.py 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. '''
  2. pytz setup script
  3. '''
  4. import pytz, sys, os, os.path
  5. try:
  6. from setuptools import setup
  7. except ImportError:
  8. from distutils.core import setup
  9. me = 'Stuart Bishop'
  10. memail = 'stuart@stuartbishop.net'
  11. packages = ['pytz']
  12. resources = ['zone.tab', 'locales/pytz.pot']
  13. for dirpath, dirnames, filenames in os.walk(os.path.join('pytz', 'zoneinfo')):
  14. # remove the 'pytz' part of the path
  15. basepath = dirpath.split(os.path.sep, 1)[1]
  16. resources.extend([os.path.join(basepath, filename)
  17. for filename in filenames])
  18. package_data = {'pytz': resources}
  19. assert len(resources) > 10, 'zoneinfo files not found!'
  20. setup (
  21. name='pytz',
  22. version=pytz.VERSION,
  23. zip_safe=True,
  24. description='World timezone definitions, modern and historical',
  25. long_description=open('README.txt','r').read(),
  26. author=me,
  27. author_email=memail,
  28. maintainer=me,
  29. maintainer_email=memail,
  30. url='http://pythonhosted.org/pytz',
  31. license='MIT',
  32. keywords=['timezone','tzinfo', 'datetime', 'olson', 'time'],
  33. packages=packages,
  34. package_data=package_data,
  35. download_url='http://pypi.python.org/pypi/pytz',
  36. platforms=['Independant'],
  37. classifiers = [
  38. 'Development Status :: 6 - Mature',
  39. 'Intended Audience :: Developers',
  40. 'License :: OSI Approved :: MIT License',
  41. 'Natural Language :: English',
  42. 'Operating System :: OS Independent',
  43. 'Programming Language :: Python',
  44. 'Programming Language :: Python :: 3',
  45. 'Topic :: Software Development :: Libraries :: Python Modules',
  46. ],
  47. )