setup.py 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  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. ],
  31. 'qubes.vm': [
  32. 'AppVM = qubes.vm.appvm:AppVM',
  33. 'TemplateVM = qubes.vm.templatevm:TemplateVM',
  34. 'StandaloneVM = qubes.vm.standalonevm:StandaloneVM',
  35. 'AdminVM = qubes.vm.adminvm:AdminVM',
  36. 'DispVM = qubes.vm.dispvm:DispVM',
  37. ],
  38. 'qubes.ext': [
  39. 'qubes.ext.qubesmanager = qubes.ext.qubesmanager:QubesManager',
  40. 'qubes.ext.gui = qubes.ext.gui:GUI',
  41. 'qubes.ext.r3compatibility = qubes.ext.r3compatibility:R3Compatibility',
  42. 'qubes.ext.pci = qubes.ext.pci:PCIDeviceExtension',
  43. ],
  44. 'qubes.devices': [
  45. 'pci = qubes.ext.pci:PCIDevice',
  46. 'testclass = qubes.tests.devices:TestDevice',
  47. ],
  48. 'qubes.storage': [
  49. 'file = qubes.storage.file:FilePool',
  50. 'linux-kernel = qubes.storage.kernels:LinuxKernel',
  51. 'lvm_thin = qubes.storage.lvm:ThinPool',
  52. ]
  53. })