splunk-soar-sdk 3.2.1__py3-none-any.whl → 3.2.3__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- soar_sdk/cli/manifests/processors.py +23 -2
- soar_sdk/meta/dependencies.py +27 -15
- {splunk_soar_sdk-3.2.1.dist-info → splunk_soar_sdk-3.2.3.dist-info}/METADATA +1 -1
- {splunk_soar_sdk-3.2.1.dist-info → splunk_soar_sdk-3.2.3.dist-info}/RECORD +7 -7
- {splunk_soar_sdk-3.2.1.dist-info → splunk_soar_sdk-3.2.3.dist-info}/WHEEL +0 -0
- {splunk_soar_sdk-3.2.1.dist-info → splunk_soar_sdk-3.2.3.dist-info}/entry_points.txt +0 -0
- {splunk_soar_sdk-3.2.1.dist-info → splunk_soar_sdk-3.2.3.dist-info}/licenses/LICENSE +0 -0
|
@@ -5,9 +5,11 @@ from datetime import datetime, UTC
|
|
|
5
5
|
from pathlib import Path
|
|
6
6
|
from pprint import pprint
|
|
7
7
|
|
|
8
|
+
from packaging.specifiers import SpecifierSet
|
|
9
|
+
|
|
8
10
|
from soar_sdk.app import App
|
|
9
11
|
from soar_sdk.cli.path_utils import context_directory
|
|
10
|
-
from soar_sdk.compat import UPDATE_TIME_FORMAT
|
|
12
|
+
from soar_sdk.compat import UPDATE_TIME_FORMAT, PythonVersion
|
|
11
13
|
from soar_sdk.meta.adapters import TOMLDataAdapter
|
|
12
14
|
from soar_sdk.meta.app import AppMeta
|
|
13
15
|
from soar_sdk.meta.dependencies import UvLock
|
|
@@ -24,6 +26,22 @@ class ManifestProcessor:
|
|
|
24
26
|
self.manifest_path = manifest_path
|
|
25
27
|
self.project_context = Path(project_context)
|
|
26
28
|
|
|
29
|
+
def get_target_python_versions(self) -> list[str]:
|
|
30
|
+
"""Get the intersection of project requires-python and SDK-supported versions."""
|
|
31
|
+
sdk_versions = [str(v) for v in PythonVersion.all()]
|
|
32
|
+
|
|
33
|
+
with open(self.project_context / "pyproject.toml") as f:
|
|
34
|
+
requires_python = toml.load(f).get("project", {}).get("requires-python", "")
|
|
35
|
+
|
|
36
|
+
if not requires_python:
|
|
37
|
+
return sdk_versions
|
|
38
|
+
|
|
39
|
+
# Use packaging.specifiers to check version compatibility
|
|
40
|
+
specifier_set = SpecifierSet(requires_python)
|
|
41
|
+
compatible = [version for version in sdk_versions if version in specifier_set]
|
|
42
|
+
|
|
43
|
+
return compatible
|
|
44
|
+
|
|
27
45
|
def build(self, is_sdk_locally_built: bool = False) -> AppMeta:
|
|
28
46
|
"""Builds full AppMeta information including actions and other extra fields."""
|
|
29
47
|
app_meta: AppMeta = self.load_toml_app_meta()
|
|
@@ -41,8 +59,11 @@ class ManifestProcessor:
|
|
|
41
59
|
dep for dep in dependencies if dep.name != "splunk-soar-sdk"
|
|
42
60
|
]
|
|
43
61
|
|
|
62
|
+
# Get target Python versions from requires-python constraint
|
|
63
|
+
target_python_versions = self.get_target_python_versions()
|
|
64
|
+
|
|
44
65
|
app_meta.pip313_dependencies, app_meta.pip314_dependencies = (
|
|
45
|
-
uv_lock.resolve_dependencies(dependencies)
|
|
66
|
+
uv_lock.resolve_dependencies(dependencies, target_python_versions)
|
|
46
67
|
)
|
|
47
68
|
|
|
48
69
|
if app.webhook_meta is not None:
|
soar_sdk/meta/dependencies.py
CHANGED
|
@@ -496,23 +496,35 @@ class UvLock(BaseModel):
|
|
|
496
496
|
@staticmethod
|
|
497
497
|
def resolve_dependencies(
|
|
498
498
|
packages: list[UvPackage],
|
|
499
|
+
python_versions: list[str] | None = None,
|
|
499
500
|
) -> tuple[DependencyList, DependencyList]:
|
|
500
|
-
"""Resolve the dependencies for the given packages.
|
|
501
|
-
|
|
502
|
-
|
|
501
|
+
"""Resolve the dependencies for the given packages.
|
|
502
|
+
|
|
503
|
+
Args:
|
|
504
|
+
packages: List of packages to resolve dependencies for.
|
|
505
|
+
python_versions: List of Python versions to resolve for (e.g., ["3.13", "3.14"]).
|
|
506
|
+
If None, defaults to ["3.13", "3.14"] for backwards compatibility.
|
|
507
|
+
|
|
508
|
+
Returns:
|
|
509
|
+
Tuple of (py313_dependencies, py314_dependencies).
|
|
510
|
+
"""
|
|
511
|
+
python_versions = python_versions or ["3.13", "3.14"]
|
|
512
|
+
resolve_both = len(python_versions) == 2
|
|
513
|
+
|
|
514
|
+
py313_wheels, py314_wheels = [], []
|
|
503
515
|
|
|
504
516
|
for package in packages:
|
|
505
|
-
wheel_313 = package.resolve_py313()
|
|
506
|
-
wheel_314 = package.resolve_py314()
|
|
507
|
-
|
|
508
|
-
if wheel_313 == wheel_314
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
+
wheel_313 = package.resolve_py313() if "3.13" in python_versions else None
|
|
518
|
+
wheel_314 = package.resolve_py314() if "3.14" in python_versions else None
|
|
519
|
+
|
|
520
|
+
prefix = "shared" if not resolve_both or wheel_313 == wheel_314 else None
|
|
521
|
+
|
|
522
|
+
if wheel_313:
|
|
523
|
+
wheel_313.add_platform_prefix(prefix or "python313")
|
|
524
|
+
py313_wheels.append(wheel_313)
|
|
525
|
+
|
|
526
|
+
if wheel_314:
|
|
527
|
+
wheel_314.add_platform_prefix(prefix or "python314")
|
|
528
|
+
py314_wheels.append(wheel_314)
|
|
517
529
|
|
|
518
530
|
return DependencyList(wheel=py313_wheels), DependencyList(wheel=py314_wheels)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: splunk-soar-sdk
|
|
3
|
-
Version: 3.2.
|
|
3
|
+
Version: 3.2.3
|
|
4
4
|
Summary: The official framework for developing and testing Splunk SOAR Apps
|
|
5
5
|
Project-URL: Homepage, https://github.com/phantomcyber/splunk-soar-sdk
|
|
6
6
|
Project-URL: Documentation, https://github.com/phantomcyber/splunk-soar-sdk
|
|
@@ -38,7 +38,7 @@ soar_sdk/cli/init/cli.py,sha256=LWwGb_N5KPpKjnk8Kn3IppSrGsHQb65CvDn2NXPokAE,1461
|
|
|
38
38
|
soar_sdk/cli/manifests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
39
39
|
soar_sdk/cli/manifests/cli.py,sha256=cly5xVdj4bBIdZVMQPIWTXRgUfd1ON3qKO-76Fwql18,524
|
|
40
40
|
soar_sdk/cli/manifests/deserializers.py,sha256=TjcmPvcfr1auGkf3hBRwjVc0dSuuDNmH5jMOqXHz27s,16515
|
|
41
|
-
soar_sdk/cli/manifests/processors.py,sha256=
|
|
41
|
+
soar_sdk/cli/manifests/processors.py,sha256=PbzARZvMUCkQrrzjRVVOsb0dTV_u5BMXx52e3t0V9-w,4797
|
|
42
42
|
soar_sdk/cli/manifests/serializers.py,sha256=hSfOcBNhv7s437A7t5BM1NXG5dfjKmh_xbHXQTuBklA,3632
|
|
43
43
|
soar_sdk/cli/package/cli.py,sha256=8AWItAAXzfjJMRLwDIRbrN9cQhy7clBX7WrOmdcGClw,9499
|
|
44
44
|
soar_sdk/cli/package/utils.py,sha256=zZmpWg76Vb3rtGn28aPhPHt1JUWR6eIByU6DTTRC3ng,1584
|
|
@@ -62,7 +62,7 @@ soar_sdk/meta/actions.py,sha256=YadG8Zkc0SWmcG5-Dj4NyWlYYAh4CyJksLYp_GmNZNM,1818
|
|
|
62
62
|
soar_sdk/meta/adapters.py,sha256=KjSYIUtkCz2eesA_vhsNCjfi5C-Uz71tbSuDIjhuB8U,1112
|
|
63
63
|
soar_sdk/meta/app.py,sha256=eZlM8GIY1B_o-RzJrRNCNVEQSx0sFupxZqCM7sIWGv4,2777
|
|
64
64
|
soar_sdk/meta/datatypes.py,sha256=piR-oBVAATiRciXSdVE7XaqjUZTgSaOvTEqcOcNvCS0,795
|
|
65
|
-
soar_sdk/meta/dependencies.py,sha256=
|
|
65
|
+
soar_sdk/meta/dependencies.py,sha256=tU-73gXUCCh_vCU8RD5lBDdJV4fXlrFSmtNzw6GXeIE,20446
|
|
66
66
|
soar_sdk/meta/webhooks.py,sha256=E5pdoD9j7FDeM2DBTO2h9Yw6-5flzp-NfhM_M1oPAUU,1216
|
|
67
67
|
soar_sdk/models/__init__.py,sha256=ql7RRFAxmSdzU-IsoU1OFQ53E6WxZJ7YQQAhHl4Ssbk,380
|
|
68
68
|
soar_sdk/models/artifact.py,sha256=OlYp150sf9sYvTz6tC7PaYV1qbBvQYrz1bXmC2xNj8Q,1086
|
|
@@ -100,8 +100,8 @@ soar_sdk/views/components/pie_chart.py,sha256=LVTeHVJN6nf2vjUs9y7PDBhS0U1fKW750l
|
|
|
100
100
|
soar_sdk/webhooks/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
101
101
|
soar_sdk/webhooks/models.py,sha256=PG9SDs5xXqtFndm5C8AsJOTYXU5v_UTY7SpYosWT_CA,4542
|
|
102
102
|
soar_sdk/webhooks/routing.py,sha256=MnzbnIDy2uG_5mJzsTeX-NsE6QYvzyqEGbHmEFj-DG8,6900
|
|
103
|
-
splunk_soar_sdk-3.2.
|
|
104
|
-
splunk_soar_sdk-3.2.
|
|
105
|
-
splunk_soar_sdk-3.2.
|
|
106
|
-
splunk_soar_sdk-3.2.
|
|
107
|
-
splunk_soar_sdk-3.2.
|
|
103
|
+
splunk_soar_sdk-3.2.3.dist-info/METADATA,sha256=Efb648n3bteCzbGGNio5f3hU57YeKqOeGVZgI9dMxSs,7334
|
|
104
|
+
splunk_soar_sdk-3.2.3.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
105
|
+
splunk_soar_sdk-3.2.3.dist-info/entry_points.txt,sha256=CgBjo2ZWpYNkt9TgvToL26h2Tg1yt8FbvYTb5NVgNuc,51
|
|
106
|
+
splunk_soar_sdk-3.2.3.dist-info/licenses/LICENSE,sha256=gNCGrGhrSQb1PUzBOByVUN1tvaliwLZfna-QU2r2hQ8,11345
|
|
107
|
+
splunk_soar_sdk-3.2.3.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|