setup.py 2.9 KB

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