setup.py 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. import json
  2. import os
  3. import sys
  4. try:
  5. from setuptools import setup
  6. except ImportError as ex:
  7. from distutils.core import setup
  8. with open(os.path.join("odml", "info.json")) as infofile:
  9. infodict = json.load(infofile)
  10. VERSION = infodict["VERSION"]
  11. FORMAT_VERSION = infodict["FORMAT_VERSION"]
  12. AUTHOR = infodict["AUTHOR"]
  13. COPYRIGHT = infodict["COPYRIGHT"]
  14. CONTACT = infodict["CONTACT"]
  15. HOMEPAGE = infodict["HOMEPAGE"]
  16. CLASSIFIERS = infodict["CLASSIFIERS"]
  17. packages = [
  18. 'odml',
  19. 'odml.rdf',
  20. 'odml.scripts',
  21. 'odml.tools',
  22. 'odml.tools.converters'
  23. ]
  24. with open('README.md') as f:
  25. description_text = f.read()
  26. install_req = ["lxml", "pyyaml>=5.1", "rdflib", "docopt", "pathlib"]
  27. tests_req = ["owlrl", "requests"]
  28. if sys.version_info < (3, 4):
  29. install_req += ["enum34"]
  30. setup(
  31. name='odML',
  32. version=VERSION,
  33. description='open metadata Markup Language',
  34. author=AUTHOR,
  35. author_email=CONTACT,
  36. url=HOMEPAGE,
  37. packages=packages,
  38. test_suite='test',
  39. install_requires=install_req,
  40. tests_require=tests_req,
  41. include_package_data=True,
  42. long_description=description_text,
  43. long_description_content_type="text/markdown",
  44. classifiers=CLASSIFIERS,
  45. license="BSD",
  46. entry_points={'console_scripts': ['odmltordf=odml.scripts.odml_to_rdf:main',
  47. 'odmlconversion=odml.scripts.odml_convert:dep_note',
  48. 'odmlconvert=odml.scripts.odml_convert:main',
  49. 'odmlview=odml.scripts.odml_view:main']}
  50. )