setup.py 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  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-filters',
  23. version='1.1.0',
  24. description='some filters for larigira',
  25. long_description=read('README.rst'),
  26. author='boyska',
  27. author_email='piuttosto@logorroici.org',
  28. license='AGPL',
  29. packages=['larigira.filters'],
  30. install_requires=['mutagen'],
  31. tests_require=['pytest-timeout==1.0', 'py>=1.4.29', 'pytest==3.0', ],
  32. cmdclass={'test': PyTest},
  33. zip_safe=False,
  34. include_package_data=True,
  35. entry_points={
  36. 'larigira.eventfilter': [
  37. 'maxwait = larigira.filters.base:maxwait',
  38. 'percentwait = larigira.filters.base:percentwait',
  39. ],
  40. },
  41. classifiers=[
  42. "License :: OSI Approved :: GNU Affero General Public License v3",
  43. "Programming Language :: Python :: 3",
  44. ]
  45. )