setup.py 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. import sys
  2. from setuptools import setup
  3. from setuptools.command.test import test as TestCommand
  4. class PyTest(TestCommand):
  5. user_options = [('pytest-args=', 'a', "Arguments to pass to py.test")]
  6. def initialize_options(self):
  7. TestCommand.initialize_options(self)
  8. self.pytest_args = []
  9. def finalize_options(self):
  10. TestCommand.finalize_options(self)
  11. self.test_args = []
  12. self.test_suite = True
  13. def run_tests(self):
  14. # import here, cause outside the eggs aren't loaded
  15. import pytest
  16. errno = pytest.main(self.pytest_args)
  17. sys.exit(errno)
  18. setup(name='larigira',
  19. version='0.1',
  20. description='A radio automation based on MPD',
  21. author='boyska',
  22. author_email='piuttosto@logorroici.org',
  23. license='AGPL',
  24. packages=['larigira'],
  25. install_requires=[
  26. 'gevent',
  27. 'flask',
  28. 'python-mpd2',
  29. 'redis',
  30. 'celery'
  31. ],
  32. tests_require=['pytest'],
  33. cmdclass={'test': PyTest},
  34. zip_safe=False,
  35. entry_points={
  36. 'console_scripts': ['larigira=larigira.mpc:main']
  37. }
  38. )