setup.py 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  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.tools',
  20. 'odml.scripts'
  21. ]
  22. with open('README.rst') as f:
  23. description_text = f.read()
  24. install_req = ["lxml", "pyyaml==3.13", "rdflib", "docopt", "pathlib"]
  25. if sys.version_info < (3, 4):
  26. install_req += ["enum34"]
  27. setup(
  28. name='odML',
  29. version=VERSION,
  30. description='open metadata Markup Language',
  31. author=AUTHOR,
  32. author_email=CONTACT,
  33. url=HOMEPAGE,
  34. packages=packages,
  35. test_suite='test',
  36. install_requires=install_req,
  37. include_package_data=True,
  38. long_description=description_text,
  39. classifiers=CLASSIFIERS,
  40. license="BSD",
  41. entry_points={'console_scripts': ['odmltordf=odml.scripts.odml_to_rdf:main',
  42. 'odmlconversion=odml.scripts.odml_conversion:main']}
  43. )