setup.py 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. __author__ = 'marcos.medeiros'
  2. """
  3. Officedocs installation script.
  4. """
  5. # Always prefer setuptools over distutils
  6. from setuptools import setup, find_packages
  7. # To use a consistent encoding
  8. from codecs import open
  9. import os
  10. from os import path
  11. def _recursive_find(root, p):
  12. full_p = path.join(root, p)
  13. for f in os.listdir(full_p):
  14. full_f = path.join(full_p, f)
  15. val_f = path.join(p, f)
  16. if path.isdir(full_f):
  17. for ff in _recursive_find(root, val_f):
  18. yield ff
  19. else:
  20. yield val_f
  21. here = path.abspath(path.dirname(__file__))
  22. docs = path.join('src', 'officedocs')
  23. docs_files = list(_recursive_find(os.path.join(here, docs), ''))
  24. # Get the long description from the relevant file
  25. with open(path.join(here, 'README.rst'), encoding='utf-8') as f:
  26. long_description = f.read()
  27. setup(
  28. name='officedocs',
  29. version='0.0.1.dev1',
  30. description='Quick creation of MS Office documents',
  31. long_description=long_description,
  32. # The project's main homepage.
  33. url='https://marcosdumay.com/officedocs',
  34. # Author details
  35. author='Marcos Dumay de Medeiros',
  36. author_email='marcos@marcosdumay.com',
  37. # Choose your license
  38. license='MIT',
  39. # See https://pypi.python.org/pypi?%3Aaction=list_classifiers
  40. classifiers=[
  41. 'Development Status :: 2 - Pre-Alpha',
  42. 'Intended Audience :: Developers',
  43. 'License :: OSI Approved :: MIT License',
  44. 'Natural Language :: English',
  45. 'Operating System :: OS Independent',
  46. 'Topic :: Office/Business :: Office Suites',
  47. 'Programming Language :: Python :: 2',
  48. 'Programming Language :: Python :: 2.6',
  49. 'Programming Language :: Python :: 2.7',
  50. 'Programming Language :: Python :: 3',
  51. 'Programming Language :: Python :: 3.2',
  52. 'Programming Language :: Python :: 3.3',
  53. 'Programming Language :: Python :: 3.4',
  54. ],
  55. # What does your project relate to?
  56. keywords=('Microsoft Office Documents', 'RTF'),
  57. # You can just specify the packages manually here if your project is
  58. # simple. Or you can use find_packages().
  59. packages=['officedocs'],
  60. package_dir = {'': 'src'},
  61. zip_safe = True,
  62. # List run-time dependencies here. These will be installed by pip when
  63. # your project is installed. For an analysis of "install_requires" vs pip's
  64. # requirements files see:
  65. # https://packaging.python.org/en/latest/requirements.html
  66. install_requires=[],
  67. # List additional groups of dependencies here (e.g. development
  68. # dependencies). You can install these using the following syntax,
  69. # for example:
  70. # $ pip install -e .[dev,test]
  71. extras_require={},
  72. # If there are data files included in your packages that need to be
  73. # installed, specify them here. If using Python 2.6 or less, then these
  74. # have to be included in MANIFEST.in as well.
  75. #include_package_data=True,
  76. package_data={
  77. 'officedocs': docs_files,
  78. },
  79. # Although 'package_data' is the preferred approach, in some case you may
  80. # need to place data files outside of your packages. See:
  81. # http://docs.python.org/3.4/distutils/setupscript.html#installing-additional-files # noqa
  82. # In this case, 'data_file' will be installed into '<sys.prefix>/my_data'
  83. data_files=[],
  84. # To provide executable scripts, use entry points in preference to the
  85. # "scripts" keyword. Entry points provide cross-platform support and allow
  86. # pip to create the appropriate form of executable for the target platform.
  87. entry_points={
  88. # 'console_scripts': [
  89. # 'sample=sample:main',
  90. # ],
  91. },
  92. )