setup.py 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  1. import os
  2. import sys
  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(
  23. name="larigira",
  24. version="1.3.3",
  25. description="A radio automation based on MPD",
  26. long_description=read("README.rst"),
  27. long_description_content_type="text/x-rst",
  28. author="boyska",
  29. author_email="piuttosto@logorroici.org",
  30. license="AGPL",
  31. packages=["larigira", "larigira.dbadmin", "larigira.filters"],
  32. install_requires=[
  33. "Babel==2.6.0",
  34. "Flask-Babel==1.0.0",
  35. "pyxdg==0.26",
  36. "gevent==20.9.0",
  37. "flask-bootstrap",
  38. "python-mpd2",
  39. "wtforms==2.2.1",
  40. "Flask-WTF==0.14.2",
  41. "flask==0.11",
  42. "pytimeparse==1.1.8",
  43. "croniter==0.3.29",
  44. "werkzeug==0.14.1",
  45. "Jinja2==3.0.1",
  46. "itsdangerous==2.0.1",
  47. "cachelib==0.1",
  48. "tinydb==3.12.2",
  49. "lxml==4.5.1",
  50. "requests==2.23.0",
  51. ],
  52. tests_require=["pytest-timeout==1.0", "py>=1.4.29", "pytest==3.0"],
  53. python_requires=">=3.5",
  54. extras_require={"percentwait": ["mutagen"]},
  55. cmdclass={"test": PyTest},
  56. zip_safe=False,
  57. include_package_data=True,
  58. entry_points={
  59. "console_scripts": [
  60. "larigira=larigira.main:main",
  61. "larigira-timegen=larigira.timegen:main",
  62. "larigira-audiogen=larigira.audiogen:main",
  63. "larigira-dbmanage=larigira.event_manage:main",
  64. ],
  65. "larigira.audiogenerators": [
  66. "mpd = larigira.audiogen_mpdrandom:generate_by_artist",
  67. "static = larigira.audiogen_static:generate",
  68. "http = larigira.audiogen_http:generate",
  69. "podcast = larigira.audiogen_podcast:generate",
  70. "randomdir = larigira.audiogen_randomdir:generate",
  71. "mostrecent = larigira.audiogen_mostrecent:generate",
  72. "script = larigira.audiogen_script:generate",
  73. ],
  74. "larigira.timegenerators": [
  75. "frequency = larigira.timegen_every:FrequencyAlarm",
  76. "single = larigira.timegen_every:SingleAlarm",
  77. "cron = larigira.timegen_cron:CronAlarm",
  78. ],
  79. "larigira.timeform_create": [
  80. "single = larigira.timeform_base:SingleAlarmForm",
  81. "frequency = larigira.timeform_base:FrequencyAlarmForm",
  82. "cron = larigira.timeform_cron:CronAlarmForm",
  83. ],
  84. "larigira.timeform_receive": [
  85. "single = larigira.timeform_base:singlealarm_receive",
  86. "frequency = larigira.timeform_base:frequencyalarm_receive",
  87. "cron = larigira.timeform_cron:cronalarm_receive",
  88. ],
  89. "larigira.audioform_create": [
  90. "static = larigira.audioform_static:StaticAudioForm",
  91. "http = larigira.audioform_http:AudioForm",
  92. "podcast = larigira.audioform_podcast:AudioForm",
  93. "script = larigira.audioform_script:ScriptAudioForm",
  94. "randomdir = larigira.audioform_randomdir:Form",
  95. "mostrecent = larigira.audioform_mostrecent:AudioForm",
  96. ],
  97. "larigira.audioform_receive": [
  98. "static = larigira.audioform_static:staticaudio_receive",
  99. "http = larigira.audioform_http:audio_receive",
  100. "podcast = larigira.audioform_podcast:audio_receive",
  101. "script = larigira.audioform_script:scriptaudio_receive",
  102. "randomdir = larigira.audioform_randomdir:receive",
  103. "mostrecent = larigira.audioform_mostrecent:audio_receive",
  104. ],
  105. "larigira.eventfilter": [
  106. "maxwait = larigira.filters:maxwait",
  107. "percentwait = larigira.filters:percentwait",
  108. ],
  109. },
  110. classifiers=[
  111. "License :: OSI Approved :: GNU Affero General Public License v3",
  112. "Development Status :: 5 - Production/Stable",
  113. "Programming Language :: Python :: 3.4",
  114. "Programming Language :: Python :: 3.5",
  115. "Programming Language :: Python :: 3.6",
  116. "Programming Language :: Python :: 3.7",
  117. "Topic :: Multimedia :: Sound/Audio",
  118. ],
  119. )