setup.py 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*-
  3. # Copyright (C) 2006-2009 Søren Roug, European Environment Agency
  4. #
  5. # This is free software. You may redistribute it under the terms
  6. # of the Apache license and the GNU General Public License Version
  7. # 2 or at your option any later version.
  8. #
  9. # This program is distributed in the hope that it will be useful,
  10. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. # GNU General Public License for more details.
  13. #
  14. # You should have received a copy of the GNU General Public
  15. # License along with this program; if not, write to the Free Software
  16. # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  17. #
  18. # Contributor(s):
  19. #
  20. import platform
  21. from setuptools import setup
  22. version = '1.4.1'
  23. if platform.system() in ('Linux','Unix'):
  24. man1pages = [('share/man/man1', [
  25. 'csv2ods/csv2ods.1',
  26. 'mailodf/mailodf.1',
  27. 'odf2xhtml/odf2xhtml.1',
  28. 'odf2mht/odf2mht.1',
  29. 'odf2xml/odf2xml.1',
  30. 'odfimgimport/odfimgimport.1',
  31. 'odflint/odflint.1',
  32. 'odfmeta/odfmeta.1',
  33. 'odfoutline/odfoutline.1',
  34. 'odfuserfield/odfuserfield.1',
  35. 'xml2odf/xml2odf.1'])]
  36. else:
  37. man1pages = []
  38. # Currently no other data files to add
  39. datafiles = [] + man1pages
  40. setup(name='odfpy',
  41. version=version,
  42. classifiers = [
  43. 'Development Status :: 5 - Production/Stable',
  44. 'Environment :: Console',
  45. 'Intended Audience :: End Users/Desktop',
  46. 'Intended Audience :: Developers',
  47. 'Intended Audience :: System Administrators',
  48. 'License :: OSI Approved :: Apache Software License',
  49. 'License :: OSI Approved :: GNU General Public License (GPL)',
  50. 'License :: OSI Approved :: GNU Library or Lesser General Public License (LGPL)',
  51. 'Operating System :: MacOS :: MacOS X',
  52. 'Operating System :: Microsoft :: Windows',
  53. 'Operating System :: POSIX',
  54. 'Programming Language :: Python :: 2',
  55. 'Programming Language :: Python :: 2.7',
  56. 'Programming Language :: Python :: 3',
  57. 'Programming Language :: Python :: 3.4',
  58. 'Programming Language :: Python :: 3.5',
  59. 'Programming Language :: Python :: 3.6',
  60. 'Programming Language :: Python :: 3.7',
  61. 'Topic :: Office/Business',
  62. 'Topic :: Software Development :: Libraries :: Python Modules',
  63. ],
  64. description='Python API and tools to manipulate OpenDocument files',
  65. long_description = (
  66. """
  67. Odfpy is a library to read and write OpenDocument v. 1.2 files.
  68. The main focus has been to prevent the programmer from creating invalid
  69. documents. It has checks that raise an exception if the programmer adds
  70. an invalid element, adds an attribute unknown to the grammar, forgets to
  71. add a required attribute or adds text to an element that doesn't allow it.
  72. These checks and the API itself were generated from the RelaxNG
  73. schema, and then hand-edited. Therefore the API is complete and can
  74. handle all ODF constructions.
  75. In addition to the API, there are a few scripts:
  76. - csv2odf - Create OpenDocument spreadsheet from comma separated values
  77. - mailodf - Email ODF file as HTML archive
  78. - odf2xhtml - Convert ODF to (X)HTML
  79. - odf2mht - Convert ODF to HTML archive
  80. - odf2xml - Create OpenDocument XML file from OD? package
  81. - odfimgimport - Import external images
  82. - odflint - Check ODF file for problems
  83. - odfmeta - List or change the metadata of an ODF file
  84. - odfoutline - Show outline of OpenDocument
  85. - odfuserfield - List or change the user-field declarations in an ODF file
  86. - xml2odf - Create OD? package from OpenDocument in XML form
  87. The source code is at https://github.com/eea/odfpy
  88. Visit https://github.com/eea/odfpy/wiki for documentation and examples.
  89. The code at https://joinup.ec.europa.eu/software/odfpy/home is obsolete."""
  90. ),
  91. author='Soren Roug',
  92. author_email='soren.roug@eea.europa.eu',
  93. url='https://github.com/eea/odfpy',
  94. packages=['odf'],
  95. scripts=[
  96. 'csv2ods/csv2ods',
  97. 'mailodf/mailodf',
  98. 'odf2xhtml/odf2xhtml',
  99. 'odf2mht/odf2mht',
  100. 'odf2xml/odf2xml',
  101. 'odfimgimport/odfimgimport',
  102. 'odflint/odflint',
  103. 'odfmeta/odfmeta',
  104. 'odfoutline/odfoutline',
  105. 'odfuserfield/odfuserfield',
  106. 'xml2odf/xml2odf'],
  107. data_files=datafiles,
  108. install_requires=['defusedxml', ]
  109. )