setup.py 3.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  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
  8. from setuptools import setup
  9. # Cannot use "from cloudbridge import get_version" because that would try to
  10. # import the six package which may not be installed yet.
  11. reg = re.compile(r'__version__\s*=\s*(.+)')
  12. with open(os.path.join('cloudbridge', '__init__.py')) as f:
  13. for line in f:
  14. m = reg.match(line)
  15. if m:
  16. version = ast.literal_eval(m.group(1))
  17. break
  18. REQS_BASE = [
  19. 'six>=1.11',
  20. 'tenacity>=4.12.0,<=5.0',
  21. 'cachetools>=2.1.0',
  22. 'deprecated>=1.2.3'
  23. ]
  24. REQS_AWS = ['boto3>=1.9.86']
  25. # Install azure>=3.0.0 package to find which of the azure libraries listed
  26. # below are compatible with each other. List individual libraries instead
  27. # of using the azure umbrella package to speed up installation.
  28. REQS_AZURE = ['msrest>=0.5.4,<0.6',
  29. 'msrestazure==0.5.0',
  30. 'azure-common==1.1.14',
  31. 'azure-mgmt-devtestlabs==2.2.0',
  32. 'azure-mgmt-resource==2.0.0',
  33. 'azure-mgmt-compute==4.0.1',
  34. 'azure-mgmt-network>=2.0.1,<=2.1',
  35. 'azure-mgmt-storage==2.0.0',
  36. 'azure-storage-blob==1.3.1',
  37. 'azure-cosmosdb-table==1.0.4',
  38. 'pysftp==0.2.9']
  39. REQS_GCP = ['google-api-python-client', 'oauth2client']
  40. REQS_OPENSTACK = [
  41. 'openstacksdk>=0.12.0,<=0.17',
  42. 'python-novaclient>=7.0.0,<=11.0',
  43. 'python-glanceclient>=2.5.0,<=2.12',
  44. 'python-cinderclient>=1.9.0,<=4.0',
  45. 'python-swiftclient>=3.2.0,<=3.6',
  46. 'python-neutronclient>=6.0.0,<=6.9',
  47. 'python-keystoneclient>=3.13.0,<=3.17'
  48. ]
  49. REQS_FULL = REQS_BASE + REQS_AWS + REQS_AZURE + REQS_GCP + REQS_OPENSTACK
  50. # httpretty is required with/for moto 1.0.0 or AWS tests fail
  51. REQS_DEV = ([
  52. 'tox>=2.1.1',
  53. 'nose',
  54. 'moto>=1.3.2',
  55. 'sphinx>=1.3.1',
  56. 'pydevd',
  57. 'flake8>=3.3.0',
  58. 'flake8-import-order>=0.12'] + REQS_FULL
  59. )
  60. setup(
  61. name='cloudbridge',
  62. version=version,
  63. description='A simple layer of abstraction over multiple cloud providers.',
  64. long_description=__doc__,
  65. author='Galaxy and GVL Projects',
  66. author_email='help@genome.edu.au',
  67. url='http://cloudbridge.cloudve.org/',
  68. setup_requires=['nose>=1.0'],
  69. install_requires=REQS_FULL,
  70. extras_require={
  71. ':python_version<"3.3"': ['ipaddress'],
  72. 'full': REQS_FULL,
  73. 'dev': REQS_DEV
  74. },
  75. packages=find_packages(),
  76. license='MIT',
  77. classifiers=[
  78. 'Development Status :: 4 - Beta',
  79. 'Environment :: Console',
  80. 'Intended Audience :: Developers',
  81. 'Intended Audience :: System Administrators',
  82. 'License :: OSI Approved :: MIT License',
  83. 'Operating System :: OS Independent',
  84. 'Programming Language :: Python',
  85. 'Topic :: Software Development :: Libraries :: Python Modules',
  86. 'Programming Language :: Python :: 2.7',
  87. 'Programming Language :: Python :: 3',
  88. 'Programming Language :: Python :: 3.4',
  89. 'Programming Language :: Python :: 3.5',
  90. 'Programming Language :: Python :: 3.6',
  91. 'Programming Language :: Python :: Implementation :: CPython'],
  92. test_suite="test"
  93. )