setup.py 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  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. 'qubes.ext.block = qubes.ext.block:BlockDeviceExtension',
  45. ],
  46. 'qubes.devices': [
  47. 'pci = qubes.ext.pci:PCIDevice',
  48. 'block = qubes.ext.block:BlockDevice',
  49. 'testclass = qubes.tests.devices:TestDevice',
  50. ],
  51. 'qubes.storage': [
  52. 'file = qubes.storage.file:FilePool',
  53. 'linux-kernel = qubes.storage.kernels:LinuxKernel',
  54. 'lvm_thin = qubes.storage.lvm:ThinPool',
  55. ],
  56. 'qubes.tests.storage': [
  57. 'test = qubes.tests.storage:TestPool',
  58. 'file = qubes.storage.file:FilePool',
  59. 'linux-kernel = qubes.storage.kernels:LinuxKernel',
  60. 'lvm_thin = qubes.storage.lvm:ThinPool',
  61. ],
  62. })