setup.py 3.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. import sys
  2. import os
  3. from setuptools import setup
  4. from setuptools.command.test import test as TestCommand
  5. def read(fname):
  6. with open(os.path.join(os.path.dirname(__file__), fname)) as buf:
  7. return buf.read()
  8. class PyTest(TestCommand):
  9. user_options = [('pytest-args=', 'a', "Arguments to pass to py.test")]
  10. def initialize_options(self):
  11. TestCommand.initialize_options(self)
  12. self.pytest_args = []
  13. def finalize_options(self):
  14. TestCommand.finalize_options(self)
  15. self.test_args = []
  16. self.test_suite = True
  17. def run_tests(self):
  18. # import here, cause outside the eggs aren't loaded
  19. import pytest
  20. errno = pytest.main(self.pytest_args)
  21. sys.exit(errno)
  22. setup(name='larigira',
  23. version='0.4.2',
  24. description='A radio automation based on MPD',
  25. long_description=read('README.rst'),
  26. author='boyska',
  27. author_email='piuttosto@logorroici.org',
  28. license='AGPL',
  29. packages=['larigira', 'larigira.dbadmin'],
  30. install_requires=[
  31. 'pyxdg',
  32. 'gevent',
  33. 'flask-bootstrap',
  34. 'python-mpd2',
  35. 'wtforms',
  36. 'Flask-WTF',
  37. 'flask==0.11',
  38. 'pytimeparse',
  39. 'tinydb'
  40. ],
  41. tests_require=['pytest', 'pytest-timeout'],
  42. cmdclass={'test': PyTest},
  43. zip_safe=False,
  44. include_package_data=True,
  45. entry_points={
  46. 'console_scripts': ['larigira=larigira.larigira:main',
  47. 'larigira-timegen=larigira.timegen:main',
  48. 'larigira-audiogen=larigira.audiogen:main',
  49. 'larigira-dbmanage=larigira.event_manage:main'],
  50. 'larigira.audiogenerators': [
  51. 'mpd = larigira.audiogen_mpdrandom:generate_by_artist',
  52. 'static = larigira.audiogen_static:generate',
  53. 'randomdir = larigira.audiogen_randomdir:generate',
  54. 'mostrecent = larigira.audiogen_mostrecent:generate',
  55. 'script = larigira.audiogen_script:generate',
  56. ],
  57. 'larigira.timegenerators': [
  58. 'frequency = larigira.timegen_every:FrequencyAlarm',
  59. 'single = larigira.timegen_every:SingleAlarm',
  60. ],
  61. 'larigira.timeform_create': [
  62. 'single = larigira.timeform_single:SingleAlarmForm',
  63. 'frequency = larigira.timeform_frequency:FrequencyAlarmForm',
  64. ],
  65. 'larigira.timeform_receive': [
  66. 'single = larigira.timeform_single:singlealarm_receive',
  67. 'frequency = larigira.timeform_frequency:frequencyalarm_receive',
  68. ],
  69. 'larigira.audioform_create': [
  70. 'static = larigira.audioform_static:StaticAudioForm',
  71. 'script = larigira.audioform_script:ScriptAudioForm',
  72. 'randomdir = larigira.audioform_randomdir:Form',
  73. 'mostrecent = larigira.audioform_mostrecent:AudioForm',
  74. ],
  75. 'larigira.audioform_receive': [
  76. 'static = larigira.audioform_static:staticaudio_receive',
  77. 'script = larigira.audioform_script:scriptaudio_receive',
  78. 'randomdir = larigira.audioform_randomdir:receive',
  79. 'mostrecent = larigira.audioform_mostrecent:audio_receive',
  80. ],
  81. },
  82. classifiers=[
  83. "License :: OSI Approved :: GNU Affero General Public License v3",
  84. "Programming Language :: Python :: 3",
  85. ]
  86. )