setup.py 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  1. #! /usr/bin/env python
  2. # -*- coding: utf-8 -*-
  3. import re
  4. import sys
  5. from setuptools import setup, find_packages
  6. from codecs import open
  7. from os import path
  8. basedir = path.abspath(path.dirname(__file__))
  9. # Get the long description from the README file
  10. with open(path.join(basedir, 'README.md'), encoding='utf-8') as f:
  11. long_description = f.read()
  12. # locate our version number
  13. def read_version_py(file_name):
  14. try:
  15. version_string_line = open(file_name, "rt").read()
  16. except EnvironmentError:
  17. return None
  18. else:
  19. version_regex = r"^version_str = ['\"]([^'\"]*)['\"]"
  20. mo = re.search(version_regex, version_string_line, re.M)
  21. if mo:
  22. return mo.group(1)
  23. VERSION_PY_FILENAME = 'kalliope/_version.py'
  24. version = read_version_py(VERSION_PY_FILENAME)
  25. py2_prefix = ''
  26. if sys.version_info[0] < 3:
  27. py2_prefix = 'python2-'
  28. setup(
  29. name='kalliope',
  30. version=version,
  31. description='Kalliope is a modular always-on voice controlled personal assistant designed for home automation.',
  32. long_description=long_description,
  33. url='https://github.com/kalliope-project/kalliope',
  34. author='The dream team of Kalliope-project',
  35. author_email='kalliope-project@googlegroups.com',
  36. license='MIT',
  37. # See https://pypi.python.org/pypi?%3Aaction=list_classifiers
  38. classifiers=[
  39. 'Development Status :: 3 - Alpha',
  40. 'Environment :: Console',
  41. 'Intended Audience :: Developers',
  42. 'License :: OSI Approved :: MIT License',
  43. 'Operating System :: POSIX :: Linux',
  44. 'Programming Language :: Python :: 2',
  45. 'Programming Language :: Python :: 2.7',
  46. 'Programming Language :: Python :: 3.4',
  47. 'Programming Language :: Python :: 3.5',
  48. 'Programming Language :: Python :: 3.6',
  49. 'Topic :: Home Automation',
  50. 'Topic :: Multimedia :: Sound/Audio :: Speech',
  51. 'Topic :: Multimedia :: Sound/Audio :: Sound Synthesis',
  52. 'Topic :: Scientific/Engineering :: Artificial Intelligence'
  53. ],
  54. keywords='assistant bot TTS STT jarvis',
  55. # included packages
  56. packages=find_packages(exclude=['contrib', 'docs', 'tests']),
  57. # required libs
  58. install_requires=[
  59. 'pyyaml>=3.12',
  60. 'six>=1.10.0',
  61. 'SpeechRecognition>=3.7.1',
  62. 'markupsafe>=1.0',
  63. 'pyaudio>=0.2.11',
  64. 'pyasn1>=0.2.3',
  65. 'ansible>=2.3,<2.4',
  66. py2_prefix + 'pythondialog>=3.4.0',
  67. 'jinja2>=2.8,<=2.9.6',
  68. 'cffi>=1.9.1',
  69. 'ipaddress>=1.0.17',
  70. 'flask>=0.12',
  71. 'Flask-Restful>=0.3.5',
  72. 'flask_cors==3.0.2',
  73. 'requests>=2.13',
  74. 'httpretty>=0.8.14',
  75. 'mock>=2.0.0',
  76. 'Flask-Testing>=0.6.2',
  77. 'apscheduler>=3.3.1',
  78. 'GitPython>=2.1.3',
  79. 'packaging>=16.8',
  80. 'transitions>=0.4.3',
  81. 'sounddevice>=0.3.7',
  82. 'SoundFile>=0.9.0',
  83. 'pyalsaaudio>=0.8.4',
  84. 'sox>=1.3.0',
  85. 'paho-mqtt>=1.3.0',
  86. 'voicerss_tts>=1.0.3'
  87. ],
  88. # additional files
  89. package_data={
  90. 'kalliope': [
  91. 'brain.yml',
  92. 'settings.yml',
  93. 'trigger/snowboy/armv7l/python27/_snowboydetect.so',
  94. 'trigger/snowboy/x86_64/python27/_snowboydetect.so',
  95. 'trigger/snowboy/x86_64/python34/_snowboydetect.so',
  96. 'trigger/snowboy/x86_64/python35/_snowboydetect.so',
  97. 'trigger/snowboy/x86_64/python36/_snowboydetect.so',
  98. 'trigger/snowboy/resources/*',
  99. 'sounds/*'
  100. ],
  101. },
  102. # entry point script
  103. entry_points={
  104. 'console_scripts': [
  105. 'kalliope=kalliope:main',
  106. ],
  107. },
  108. )