setup.py 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. #!/usr/bin/python3 -O
  2. # vim: fileencoding=utf-8
  3. import os
  4. import setuptools
  5. # don't import: import * is unreliable and there is no need, since this is
  6. # compile time and we have source files
  7. def get_console_scripts():
  8. for filename in os.listdir('./qubes/tools'):
  9. basename, ext = os.path.splitext(os.path.basename(filename))
  10. if basename == '__init__' or ext != '.py':
  11. continue
  12. yield '{} = qubes.tools.{}:main'.format(
  13. basename.replace('_', '-'), basename)
  14. if __name__ == '__main__':
  15. setuptools.setup(
  16. name='qubes',
  17. version=open('version').read().strip(),
  18. author='Invisible Things Lab',
  19. author_email='woju@invisiblethingslab.com',
  20. description='Qubes core package',
  21. license='GPL2+',
  22. url='https://www.qubes-os.org/',
  23. packages=setuptools.find_packages(exclude=('core*', 'tests')),
  24. package_data = {
  25. 'qubespolicy': ['glade/*.glade'],
  26. },
  27. entry_points={
  28. 'console_scripts': list(get_console_scripts()) + [
  29. 'qrexec-policy = qubespolicy.cli:main',
  30. 'qrexec-policy-agent = qubespolicy.agent:main',
  31. ],
  32. 'qubes.vm': [
  33. 'AppVM = qubes.vm.appvm:AppVM',
  34. 'TemplateVM = qubes.vm.templatevm:TemplateVM',
  35. 'StandaloneVM = qubes.vm.standalonevm:StandaloneVM',
  36. 'AdminVM = qubes.vm.adminvm:AdminVM',
  37. 'DispVM = qubes.vm.dispvm:DispVM',
  38. ],
  39. 'qubes.ext': [
  40. 'qubes.ext.qubesmanager = qubes.ext.qubesmanager:QubesManager',
  41. 'qubes.ext.gui = qubes.ext.gui:GUI',
  42. 'qubes.ext.r3compatibility = qubes.ext.r3compatibility:R3Compatibility',
  43. 'qubes.ext.pci = qubes.ext.pci:PCIDeviceExtension',
  44. ],
  45. 'qubes.devices': [
  46. 'pci = qubes.ext.pci:PCIDevice',
  47. 'testclass = qubes.tests.devices:TestDevice',
  48. ],
  49. 'qubes.storage': [
  50. 'file = qubes.storage.file:FilePool',
  51. 'linux-kernel = qubes.storage.kernels:LinuxKernel',
  52. 'lvm_thin = qubes.storage.lvm:ThinPool',
  53. ]
  54. })