setup.py 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. #!/usr/bin/env python
  2. """Setup script for packaging openpyxl.
  3. To build a package for distribution:
  4. python setup.py sdist
  5. and upload it to the PyPI with:
  6. python setup.py upload
  7. Install a link for development work:
  8. pip install -e .
  9. Thee manifest.in file is used for data files.
  10. """
  11. import os
  12. from setuptools import setup, find_packages
  13. here = os.path.abspath(os.path.dirname(__file__))
  14. try:
  15. with open(os.path.join(here, 'README.rst')) as f:
  16. README = f.read()
  17. except IOError:
  18. README = ''
  19. import json
  20. src_file = os.path.join(here, "openpyxl", ".constants.json")
  21. with open(src_file) as src:
  22. constants = json.load(src)
  23. __author__ = constants['__author__']
  24. __author_email__ = constants["__author_email__"]
  25. __license__ = constants["__license__"]
  26. __maintainer_email__ = constants["__maintainer_email__"]
  27. __url__ = constants["__url__"]
  28. __version__ = constants["__version__"]
  29. setup(name='openpyxl',
  30. packages=find_packages(),
  31. # metadata
  32. version=__version__,
  33. description="A Python library to read/write Excel 2010 xlsx/xlsm files",
  34. long_description=README,
  35. author=__author__,
  36. author_email=__author_email__,
  37. url=__url__,
  38. license=__license__,
  39. python_requires=">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*",
  40. install_requires=[
  41. 'jdcal', 'et_xmlfile',
  42. ],
  43. package_data={
  44. 'openpyxl': ['.constants.json']
  45. },
  46. classifiers=[
  47. 'Development Status :: 5 - Production/Stable',
  48. 'Operating System :: MacOS :: MacOS X',
  49. 'Operating System :: Microsoft :: Windows',
  50. 'Operating System :: POSIX',
  51. 'License :: OSI Approved :: MIT License',
  52. 'Programming Language :: Python',
  53. 'Programming Language :: Python :: 2.7',
  54. 'Programming Language :: Python :: 3.4',
  55. 'Programming Language :: Python :: 3.5',
  56. 'Programming Language :: Python :: 3.6',
  57. ],
  58. )