Some code to run macros based on LIRC, from the Web.

setup.py 1.1KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. #!/usr/bin/env python
  2. try:
  3. from setuptools import setup
  4. except ImportError:
  5. print('[lircweb] setuptools not found.')
  6. raise
  7. with open('lircweb/__init__.py') as fh:
  8. for line in fh:
  9. line = line.strip()
  10. if line.startswith('__VERSION__'):
  11. version = line.split()[-1][1:-1]
  12. break
  13. try:
  14. from pip.req import parse_requirements
  15. from pip.download import PipSession
  16. except ImportError:
  17. print('[lircweb] pip not found.')
  18. raise
  19. # parse_requirements() returns generator of pip.req.InstallRequirement objects
  20. parsed_requirements = parse_requirements("requirements.txt",
  21. session=PipSession())
  22. # reqs is a list of requirement
  23. # e.g. ['django==1.5.1', 'mezzanine==1.4.6']
  24. install_requires = [str(ir.req) for ir in parsed_requirements]
  25. setup(
  26. name='lircweb',
  27. version=version,
  28. url='https://git.phyks.me/Phyks/lircweb',
  29. author='Phyks (Lucas Verney)',
  30. author_email='phyks@phyks.me',
  31. license='MIT License',
  32. description='Some code to run macros based on LIRC, from the Web.',
  33. packages=['lircweb'],
  34. install_requires=install_requires
  35. )