Skip to content

Commit 7877f1d

Browse files
committed
feat: release_service_utils as python package
scripts/python/* is now shipped as python package which can be imported as release_service_utils Assisted-By: claude Signed-off-by: Jindrich Luza <jluza@redhat.com>
1 parent 0f2e5b4 commit 7877f1d

21 files changed

Lines changed: 41 additions & 208 deletions

pyproject.toml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,21 @@ dependencies = [
2323
"confluent-kafka",
2424
]
2525

26+
[build-system]
27+
requires = ["setuptools>=61.0.0", "wheel"]
28+
build-backend = "setuptools.build_meta"
29+
30+
[tool.setuptools]
31+
packages = [
32+
"release_service_utils",
33+
"release_service_utils.helpers",
34+
"release_service_utils.tasks",
35+
"release_service_utils.tasks.internal",
36+
]
37+
38+
[tool.setuptools.package-dir]
39+
"release_service_utils" = "scripts/python"
40+
2641
[tool.black]
2742
line-length = 95
2843

scripts/python/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
"""Release Service Utils Python Package."""

scripts/python/helpers/__init__.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,11 @@
11
"""Reusable Python helpers for release task scripts."""
2+
__all__ = [
3+
"authentication",
4+
"file",
5+
"http_client",
6+
"image_ref",
7+
"logger",
8+
"osidb",
9+
"retry",
10+
"tekton"
11+
]

scripts/python/helpers/authentication.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
from collections.abc import Sequence
1414
from pathlib import Path
1515

16-
import retry
16+
from release_service_utils.helpers import retry
1717

1818

1919
def read_mounted_text(mount: Path, filename: str) -> str:

scripts/python/helpers/osidb.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
import json
1717
from typing import Any
1818

19-
import http_client
19+
from release_service_utils.helpers import http_client
2020
from requests_kerberos import HTTPKerberosAuth, OPTIONAL
2121

2222

scripts/python/helpers/tests/__init__.py

Whitespace-only changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)