setup.py 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  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>=6.0',
  21. 'deprecation>=2.0.7',
  22. 'pyeventsystem<2'
  23. ]
  24. REQS_AWS = [
  25. 'boto3>=1.9.86'
  26. ]
  27. # Install azure>=3.0.0 package to find which of the azure libraries listed
  28. # below are compatible with each other. List individual libraries instead
  29. # of using the azure umbrella package to speed up installation.
  30. REQS_AZURE = [
  31. 'msrest>=0.5.4,<0.6',
  32. 'msrestazure==0.5.0',
  33. 'azure-common==1.1.14',
  34. 'azure-mgmt-devtestlabs==2.2.0',
  35. 'azure-mgmt-resource==2.0.0',
  36. 'azure-mgmt-compute==4.0.1',
  37. 'azure-mgmt-network>=2.0.1,<=2.1',
  38. 'azure-mgmt-storage==2.0.0',
  39. 'azure-storage-blob==1.3.1',
  40. 'azure-cosmosdb-table==1.0.4',
  41. 'pysftp==0.2.9'
  42. ]
  43. REQS_GCP = [
  44. 'google-api-python-client>=1.7.8,<1.13',
  45. 'oauth2client<4.2'
  46. ]
  47. REQS_OPENSTACK = [
  48. 'openstacksdk>=0.12.0',
  49. 'python-novaclient>=7.0.0',
  50. 'python-swiftclient>=3.2.0',
  51. 'python-neutronclient>=6.0.0',
  52. 'python-keystoneclient>=3.13.0'
  53. ]
  54. REQS_SIMPLE = REQS_BASE + REQS_AWS + REQS_GCP + REQS_OPENSTACK
  55. REQS_AZURE = REQS_SIMPLE + REQS_AZURE
  56. REQS_FULL = REQS_SIMPLE + REQS_AZURE
  57. # httpretty is required with/for moto 1.0.0 or AWS tests fail
  58. REQS_DEV = ([
  59. 'tox>=2.1.1',
  60. 'nose',
  61. 'moto>=1.3.2',
  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. setup_requires=['nose>=1.0'],
  76. install_requires=REQS_SIMPLE,
  77. extras_require={
  78. ':python_version<"3.3"': ['ipaddress'],
  79. 'azure': REQS_AZURE,
  80. 'full': REQS_FULL,
  81. 'dev': REQS_DEV
  82. },
  83. packages=find_packages(),
  84. license='MIT',
  85. classifiers=[
  86. 'Development Status :: 4 - Beta',
  87. 'Environment :: Console',
  88. 'Intended Audience :: Developers',
  89. 'Intended Audience :: System Administrators',
  90. 'License :: OSI Approved :: MIT License',
  91. 'Operating System :: OS Independent',
  92. 'Programming Language :: Python',
  93. 'Topic :: Software Development :: Libraries :: Python Modules',
  94. 'Programming Language :: Python :: 2.7',
  95. 'Programming Language :: Python :: 3',
  96. 'Programming Language :: Python :: 3.4',
  97. 'Programming Language :: Python :: 3.5',
  98. 'Programming Language :: Python :: 3.6',
  99. 'Programming Language :: Python :: Implementation :: CPython'],
  100. test_suite="tests"
  101. )