setup.py 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  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. 'qrexec-policy-graph = qubespolicy.graph:main',
  32. ],
  33. 'qubes.vm': [
  34. 'AppVM = qubes.vm.appvm:AppVM',
  35. 'TemplateVM = qubes.vm.templatevm:TemplateVM',
  36. 'StandaloneVM = qubes.vm.standalonevm:StandaloneVM',
  37. 'AdminVM = qubes.vm.adminvm:AdminVM',
  38. 'DispVM = qubes.vm.dispvm:DispVM',
  39. ],
  40. 'qubes.ext': [
  41. 'qubes.ext.admin = qubes.ext.admin:AdminExtension',
  42. 'qubes.ext.core_features = qubes.ext.core_features:CoreFeatures',
  43. 'qubes.ext.qubesmanager = qubes.ext.qubesmanager:QubesManager',
  44. 'qubes.ext.gui = qubes.ext.gui:GUI',
  45. 'qubes.ext.r3compatibility = qubes.ext.r3compatibility:R3Compatibility',
  46. 'qubes.ext.pci = qubes.ext.pci:PCIDeviceExtension',
  47. 'qubes.ext.block = qubes.ext.block:BlockDeviceExtension',
  48. ],
  49. 'qubes.devices': [
  50. 'pci = qubes.ext.pci:PCIDevice',
  51. 'block = qubes.ext.block:BlockDevice',
  52. 'testclass = qubes.tests.devices:TestDevice',
  53. ],
  54. 'qubes.storage': [
  55. 'file = qubes.storage.file:FilePool',
  56. 'linux-kernel = qubes.storage.kernels:LinuxKernel',
  57. 'lvm_thin = qubes.storage.lvm:ThinPool',
  58. ],
  59. 'qubes.tests.storage': [
  60. 'test = qubes.tests.storage:TestPool',
  61. 'file = qubes.storage.file:FilePool',
  62. 'linux-kernel = qubes.storage.kernels:LinuxKernel',
  63. 'lvm_thin = qubes.storage.lvm:ThinPool',
  64. ],
  65. })