setup.py 1012 B

123456789101112131415161718192021222324252627282930313233
  1. #!/usr/bin/python2 -O
  2. # vim: fileencoding=utf-8
  3. import glob
  4. import os
  5. import setuptools
  6. # don't import: import * is unreliable and there is no need, since this is
  7. # compile time and we have source files
  8. def get_console_scripts():
  9. for filename in os.listdir('./qubes/tools'):
  10. basename, ext = os.path.splitext(os.path.basename(filename))
  11. if basename == '__init__' or ext != '.py':
  12. continue
  13. yield '{} = qubes.tools.{}:main'.format(
  14. basename.replace('_', '-'), basename)
  15. if __name__ == '__main__':
  16. setuptools.setup(
  17. name='qubes',
  18. version=open('version').read().strip(),
  19. author='Invisible Things Lab',
  20. author_email='woju@invisiblethingslab.com',
  21. description='Qubes core package',
  22. license='GPL2+',
  23. url='https://www.qubes-os.org/',
  24. packages=setuptools.find_packages(exclude=('core*', 'tests')),
  25. entry_points={
  26. 'console_scripts': list(get_console_scripts()),
  27. }
  28. )