setup.py 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. """
  2. CloudBridge provides a uniform interface to multiple IaaS cloud providers.
  3. """
  4. import ast
  5. import os
  6. import re
  7. from setuptools import find_packages, setup
  8. # Cannot use "from cloudbridge import get_version" because that would try to
  9. # import the six package which may not be installed yet.
  10. reg = re.compile(r'__version__\s*=\s*(.+)')
  11. with open(os.path.join('cloudbridge', '__init__.py')) as f:
  12. for line in f:
  13. m = reg.match(line)
  14. if m:
  15. version = ast.literal_eval(m.group(1))
  16. break
  17. REQS_BASE = [
  18. 'six>=1.11',
  19. 'tenacity>=6.0',
  20. 'deprecation>=2.0.7',
  21. 'pyeventsystem<2'
  22. ]
  23. REQS_AWS = [
  24. 'boto3>=1.9.86,<2.0.0'
  25. ]
  26. # Install azure>=3.0.0 package to find which of the azure libraries listed
  27. # below are compatible with each other. List individual libraries instead
  28. # of using the azure umbrella package to speed up installation.
  29. REQS_AZURE = [
  30. # Minimums match SDK generation tested against the model-class
  31. # serialization fixes in cloudbridge/providers/azure/. Older SDKs may
  32. # work but are not covered by integration tests.
  33. 'azure-identity>=1.20.0,<2.0.0',
  34. 'azure-common>=1.1.28,<2.0.0',
  35. 'azure-core>=1.30.0,<2.0.0',
  36. 'azure-mgmt-devtestlabs>=9.0.0,<10.0.0',
  37. 'azure-mgmt-resource>=23.0.0,<26.0.0',
  38. 'azure-mgmt-subscription>=3.0.0,<4.0.0',
  39. 'azure-mgmt-compute>=34.0.0,<39.0.0',
  40. 'azure-mgmt-network>=28.0.0,<31.0.0',
  41. 'azure-mgmt-storage>=22.0.0,<25.0.0',
  42. 'azure-storage-blob>=12.20.0,<13.0.0',
  43. 'azure-data-tables>=12.4.0,<13.0.0',
  44. 'paramiko<6.0.0'
  45. ]
  46. REQS_GCP = [
  47. 'google-api-python-client>=2.0,<3.0.0'
  48. ]
  49. REQS_OPENSTACK = [
  50. # Minimums match SDK generation tested against the OpenStack
  51. # provider fixes in cloudbridge/providers/openstack/. The previous
  52. # floors were circa-2018 and exposed Nova/Neutron APIs (e.g. the
  53. # add_floating_ip_to_server action) that are gone from any modern
  54. # OpenStack deployment.
  55. 'openstacksdk>=3.0.0,<5.0.0',
  56. 'python-novaclient>=17.0.0,<20.0',
  57. 'python-swiftclient>=4.0.0,<5.0',
  58. 'python-neutronclient>=11.0.0,<13.0',
  59. 'python-keystoneclient>=4.0.0,<7.0'
  60. ]
  61. REQS_FULL = REQS_AWS + REQS_GCP + REQS_OPENSTACK + REQS_AZURE
  62. # httpretty is required with/for moto 1.0.0 or AWS tests fail
  63. REQS_DEV = ([
  64. 'tox>=4.0.0',
  65. 'pytest',
  66. 'moto[ec2,s3]>=5.0.0',
  67. 'packaging',
  68. 'sphinx>=1.3.1',
  69. 'pydevd',
  70. 'flake8>=3.3.0',
  71. 'flake8-import-order>=0.12'] + REQS_FULL
  72. )
  73. setup(
  74. name='cloudbridge',
  75. version=version,
  76. description='A simple layer of abstraction over multiple cloud providers.',
  77. long_description=__doc__,
  78. author='Galaxy and GVL Projects',
  79. author_email='help@genome.edu.au',
  80. url='http://cloudbridge.cloudve.org/',
  81. install_requires=REQS_BASE,
  82. extras_require={
  83. ':python_version<"3.3"': ['ipaddress'],
  84. 'azure': REQS_AZURE,
  85. 'gcp': REQS_GCP,
  86. 'aws': REQS_AWS,
  87. 'openstack': REQS_OPENSTACK,
  88. 'full': REQS_FULL,
  89. 'dev': REQS_DEV
  90. },
  91. packages=find_packages(),
  92. license='MIT',
  93. classifiers=[
  94. 'Development Status :: 5 - Production/Stable',
  95. 'Environment :: Console',
  96. 'Intended Audience :: Developers',
  97. 'Intended Audience :: System Administrators',
  98. 'License :: OSI Approved :: MIT License',
  99. 'Operating System :: OS Independent',
  100. 'Programming Language :: Python',
  101. 'Topic :: Software Development :: Libraries :: Python Modules',
  102. 'Programming Language :: Python :: 2.7',
  103. 'Programming Language :: Python :: 3',
  104. 'Programming Language :: Python :: 3.4',
  105. 'Programming Language :: Python :: 3.5',
  106. 'Programming Language :: Python :: 3.6',
  107. 'Programming Language :: Python :: Implementation :: CPython'],
  108. test_suite="tests"
  109. )