setup.py 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  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. 'openstacksdk>=0.12.0,<5.0.0',
  51. 'python-novaclient>=7.0.0,<20.0',
  52. 'python-swiftclient>=3.2.0,<5.0',
  53. 'python-neutronclient>=6.0.0,<13.0',
  54. 'python-keystoneclient>=3.13.0,<7.0'
  55. ]
  56. REQS_FULL = REQS_AWS + REQS_GCP + REQS_OPENSTACK + REQS_AZURE
  57. # httpretty is required with/for moto 1.0.0 or AWS tests fail
  58. REQS_DEV = ([
  59. 'tox>=4.0.0',
  60. 'pytest',
  61. 'moto[ec2,s3]>=5.0.0',
  62. 'sphinx>=1.3.1',
  63. 'pydevd',
  64. 'flake8>=3.3.0',
  65. 'flake8-import-order>=0.12'] + REQS_FULL
  66. )
  67. setup(
  68. name='cloudbridge',
  69. version=version,
  70. description='A simple layer of abstraction over multiple cloud providers.',
  71. long_description=__doc__,
  72. author='Galaxy and GVL Projects',
  73. author_email='help@genome.edu.au',
  74. url='http://cloudbridge.cloudve.org/',
  75. install_requires=REQS_BASE,
  76. extras_require={
  77. ':python_version<"3.3"': ['ipaddress'],
  78. 'azure': REQS_AZURE,
  79. 'gcp': REQS_GCP,
  80. 'aws': REQS_AWS,
  81. 'openstack': REQS_OPENSTACK,
  82. 'full': REQS_FULL,
  83. 'dev': REQS_DEV
  84. },
  85. packages=find_packages(),
  86. license='MIT',
  87. classifiers=[
  88. 'Development Status :: 5 - Production/Stable',
  89. 'Environment :: Console',
  90. 'Intended Audience :: Developers',
  91. 'Intended Audience :: System Administrators',
  92. 'License :: OSI Approved :: MIT License',
  93. 'Operating System :: OS Independent',
  94. 'Programming Language :: Python',
  95. 'Topic :: Software Development :: Libraries :: Python Modules',
  96. 'Programming Language :: Python :: 2.7',
  97. 'Programming Language :: Python :: 3',
  98. 'Programming Language :: Python :: 3.4',
  99. 'Programming Language :: Python :: 3.5',
  100. 'Programming Language :: Python :: 3.6',
  101. 'Programming Language :: Python :: Implementation :: CPython'],
  102. test_suite="tests"
  103. )