pyproject.toml 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159
  1. [build-system]
  2. requires = ["setuptools>=77.0", "wheel"]
  3. build-backend = "setuptools.build_meta"
  4. [project]
  5. name = "cloudbridge"
  6. description = "A simple layer of abstraction over multiple cloud providers."
  7. readme = "README.rst"
  8. license = "MIT"
  9. license-files = ["LICENSE"]
  10. requires-python = ">=3.10"
  11. authors = [
  12. { name = "Galaxy and GVL Projects", email = "help@genome.edu.au" },
  13. ]
  14. keywords = ["cloud", "aws", "azure", "gcp", "openstack", "iaas"]
  15. classifiers = [
  16. "Development Status :: 5 - Production/Stable",
  17. "Environment :: Console",
  18. "Intended Audience :: Developers",
  19. "Intended Audience :: System Administrators",
  20. "Operating System :: OS Independent",
  21. "Programming Language :: Python",
  22. "Programming Language :: Python :: 3",
  23. "Programming Language :: Python :: 3.10",
  24. "Programming Language :: Python :: 3.11",
  25. "Programming Language :: Python :: 3.12",
  26. "Programming Language :: Python :: 3.13",
  27. "Programming Language :: Python :: Implementation :: CPython",
  28. "Topic :: Software Development :: Libraries :: Python Modules",
  29. ]
  30. dependencies = [
  31. "tenacity>=6.0",
  32. "pyeventsystem<2",
  33. # Imported at module scope by cloudbridge.base.helpers, which almost
  34. # everything else imports, so it is required for the library to import at
  35. # all - not just for generate_key_pair, which is what actually uses it.
  36. # Kept unpinned above the floor, per the general-purpose library policy.
  37. "cryptography>=3.4",
  38. ]
  39. dynamic = ["version"]
  40. [project.urls]
  41. Homepage = "http://cloudbridge.cloudve.org/"
  42. Source = "https://github.com/CloudVE/cloudbridge"
  43. Issues = "https://github.com/CloudVE/cloudbridge/issues"
  44. [project.optional-dependencies]
  45. aws = [
  46. "boto3>=1.9.86,<2.0.0",
  47. ]
  48. # Install azure>=3.0.0 package to find which of the azure libraries listed
  49. # below are compatible with each other. List individual libraries instead
  50. # of using the azure umbrella package to speed up installation.
  51. # Minimums match SDK generation tested against the model-class
  52. # serialization fixes in cloudbridge/providers/azure/. Older SDKs may
  53. # work but are not covered by integration tests.
  54. azure = [
  55. "azure-identity>=1.20.0,<2.0.0",
  56. "azure-common>=1.1.28,<2.0.0",
  57. "azure-core>=1.30.0,<2.0.0",
  58. "azure-mgmt-devtestlabs>=9.0.0,<10.0.0",
  59. "azure-mgmt-resource>=23.0.0,<26.0.0",
  60. "azure-mgmt-subscription>=3.0.0,<4.0.0",
  61. "azure-mgmt-compute>=34.0.0,<39.0.0",
  62. "azure-mgmt-dns>=9.0.0,<10.0.0",
  63. "azure-mgmt-network>=28.0.0,<31.0.0",
  64. "azure-mgmt-storage>=22.0.0,<25.0.0",
  65. "azure-storage-blob>=12.20.0,<13.0.0",
  66. "azure-data-tables>=12.4.0,<13.0.0",
  67. "paramiko<6.0.0",
  68. ]
  69. gcp = [
  70. "google-api-python-client>=2.0,<3.0.0",
  71. ]
  72. # Minimums match SDK generation tested against the OpenStack
  73. # provider fixes in cloudbridge/providers/openstack/. The previous
  74. # floors were circa-2018 and exposed Nova/Neutron APIs (e.g. the
  75. # add_floating_ip_to_server action) that are gone from any modern
  76. # OpenStack deployment.
  77. openstack = [
  78. "openstacksdk>=3.0.0,<5.0.0",
  79. "python-novaclient>=17.0.0,<20.0",
  80. "python-swiftclient>=4.0.0,<5.0",
  81. "python-neutronclient>=11.0.0,<13.0",
  82. "python-keystoneclient>=4.0.0,<7.0",
  83. ]
  84. full = [
  85. "cloudbridge[aws,azure,gcp,openstack]",
  86. ]
  87. # httpretty is required with/for moto 1.0.0 or AWS tests fail
  88. dev = [
  89. "cloudbridge[full]",
  90. "tox>=4.0.0",
  91. "pytest",
  92. "moto[ec2,s3]>=5.0.0",
  93. "packaging",
  94. "sphinx>=1.3.1",
  95. "pydevd",
  96. "flake8>=3.3.0",
  97. "flake8-import-order>=0.12",
  98. "mypy>=2.1,<3",
  99. ]
  100. [tool.setuptools.dynamic]
  101. version = { attr = "cloudbridge.__version__" }
  102. [tool.setuptools.packages.find]
  103. include = ["cloudbridge*"]
  104. exclude = ["tests*"]
  105. [tool.setuptools.package-data]
  106. # Ship the PEP 561 marker so downstream consumers pick up our type hints.
  107. cloudbridge = ["py.typed"]
  108. [tool.coverage.run]
  109. branch = true
  110. source = ["cloudbridge"]
  111. omit = [
  112. "cloudbridge/interfaces/*",
  113. "cloudbridge/__init__.py",
  114. ]
  115. parallel = true
  116. [tool.mypy]
  117. # CloudBridge is typed gradually. The public API (the interface layer and the
  118. # factory) is held to a strict baseline so downstream users get a fully-typed
  119. # API; the base implementations and providers (which wrap untyped cloud SDKs)
  120. # are temporarily exempted below and ratcheted to strict module-by-module.
  121. # Type-check against the LOWEST supported version so use of newer-stdlib
  122. # APIs is caught at lint time.
  123. python_version = "3.10"
  124. files = ["cloudbridge"]
  125. ignore_missing_imports = true # untyped cloud SDKs (boto3, azure-*, ...) -> Any
  126. namespace_packages = true
  127. warn_unused_configs = true
  128. # Full strict baseline (applies to every module NOT exempted below), with two
  129. # documented exceptions that don't fit this codebase:
  130. strict = true
  131. # interfaces/__init__.py re-exports the public names without an __all__; keep
  132. # implicit re-export so `from cloudbridge.interfaces import CloudProvider`
  133. # keeps working for factory.py and downstream consumers.
  134. implicit_reexport = true
  135. # Cross-class property setters (@LabeledCloudResource.label.setter) are untyped;
  136. # don't fail the build on them.
  137. disallow_untyped_decorators = false
  138. # Providers (all typed) wrap untyped cloud SDKs, so they get a pragmatic tier:
  139. # complete annotations are required (disallow_untyped_defs etc. from the strict
  140. # baseline), but warn_return_any and disallow_untyped_calls are off -- every
  141. # getter reads an attribute off an Any-typed SDK object, and forcing those
  142. # through cast()/ignore adds noise without value.
  143. [[tool.mypy.overrides]]
  144. module = ["cloudbridge.providers.*"]
  145. warn_return_any = false
  146. disallow_untyped_calls = false
  147. # base/ is held to the FULL strict bar (it orchestrates through the typed
  148. # interface layer and never touches the cloud SDKs directly), so it falls under
  149. # the global strict baseline with no override.