sbo-create 2.3.1__tar.gz → 2.3.2__tar.gz
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.
- {sbo_create-2.3.1 → sbo_create-2.3.2}/PKG-INFO +1 -1
- {sbo_create-2.3.1 → sbo_create-2.3.2}/pyproject.toml +5 -1
- {sbo_create-2.3.1 → sbo_create-2.3.2}/sbo_create/__metadata__.py +1 -1
- {sbo_create-2.3.1 → sbo_create-2.3.2}/sbo_create/handlers/files.py +9 -2
- {sbo_create-2.3.1 → sbo_create-2.3.2}/sbo_create/handlers/fix.py +7 -2
- {sbo_create-2.3.1 → sbo_create-2.3.2}/sbo_create/handlers/misc.py +31 -8
- {sbo_create-2.3.1 → sbo_create-2.3.2}/sbo_create/handlers/validate.py +8 -2
- {sbo_create-2.3.1 → sbo_create-2.3.2}/LICENSE +0 -0
- {sbo_create-2.3.1 → sbo_create-2.3.2}/README.md +0 -0
- {sbo_create-2.3.1 → sbo_create-2.3.2}/sbo_create/__init__.py +0 -0
- {sbo_create-2.3.1 → sbo_create-2.3.2}/sbo_create/cli.py +0 -0
- {sbo_create-2.3.1 → sbo_create-2.3.2}/sbo_create/handlers/__init__.py +0 -0
- {sbo_create-2.3.1 → sbo_create-2.3.2}/sbo_create/handlers/bump.py +0 -0
- {sbo_create-2.3.1 → sbo_create-2.3.2}/sbo_create/handlers/download.py +0 -0
- {sbo_create-2.3.1 → sbo_create-2.3.2}/sbo_create/handlers/fallback.py +0 -0
- {sbo_create-2.3.1 → sbo_create-2.3.2}/sbo_create/handlers/fetch.py +0 -0
- {sbo_create-2.3.1 → sbo_create-2.3.2}/sbo_create/handlers/git.py +0 -0
- {sbo_create-2.3.1 → sbo_create-2.3.2}/sbo_create/handlers/repology.py +0 -0
- {sbo_create-2.3.1 → sbo_create-2.3.2}/sbo_create/handlers/scan.py +0 -0
- {sbo_create-2.3.1 → sbo_create-2.3.2}/sbo_create/main.py +0 -0
- {sbo_create-2.3.1 → sbo_create-2.3.2}/sbo_create/models.py +0 -0
- {sbo_create-2.3.1 → sbo_create-2.3.2}/sbo_create/template_loader.py +0 -0
|
@@ -4,7 +4,7 @@ build-backend = "flit_core.buildapi"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "sbo-create"
|
|
7
|
-
version = "2.3.
|
|
7
|
+
version = "2.3.2"
|
|
8
8
|
authors = [
|
|
9
9
|
{ name = "Dimitris Zlatanidis", email = "dslackw@gmail.com" },
|
|
10
10
|
]
|
|
@@ -35,6 +35,10 @@ dependencies = [
|
|
|
35
35
|
"urllib3>=1.26"
|
|
36
36
|
]
|
|
37
37
|
|
|
38
|
+
[tool.isort]
|
|
39
|
+
profile = "black"
|
|
40
|
+
known_first_party = ["sbo_create"]
|
|
41
|
+
|
|
38
42
|
[tool.mypy]
|
|
39
43
|
strict = true
|
|
40
44
|
warn_return_any = true
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
__prog__: str = 'sbo-create'
|
|
5
5
|
__author__: str = 'dslackw'
|
|
6
6
|
__copyright__: str = '2015-2026'
|
|
7
|
-
__version__: str = '2.3.
|
|
7
|
+
__version__: str = '2.3.2'
|
|
8
8
|
__license__: str = 'GNU General Public License v3 (GPLv3)'
|
|
9
9
|
__email__: str = 'dslackw@gmail.com'
|
|
10
10
|
__website__: str = 'https://gitlab.com/dslackw/sbo-create'
|
|
@@ -9,8 +9,15 @@ import sys
|
|
|
9
9
|
from collections.abc import Callable
|
|
10
10
|
from pathlib import Path
|
|
11
11
|
|
|
12
|
-
from sbo_create.models import (
|
|
13
|
-
|
|
12
|
+
from sbo_create.models import (
|
|
13
|
+
PROG,
|
|
14
|
+
AppContext,
|
|
15
|
+
colorize,
|
|
16
|
+
confirm,
|
|
17
|
+
select_option,
|
|
18
|
+
set_arm_labels,
|
|
19
|
+
set_x86_labels,
|
|
20
|
+
)
|
|
14
21
|
from sbo_create.template_loader import TemplateLoader
|
|
15
22
|
|
|
16
23
|
|
|
@@ -8,8 +8,13 @@ import re
|
|
|
8
8
|
from pathlib import Path
|
|
9
9
|
|
|
10
10
|
from sbo_create.handlers.files import FileHandler
|
|
11
|
-
from sbo_create.models import (
|
|
12
|
-
|
|
11
|
+
from sbo_create.models import (
|
|
12
|
+
SOURCE_EXTENSIONS,
|
|
13
|
+
UNSUPPORTED,
|
|
14
|
+
AppContext,
|
|
15
|
+
colorize,
|
|
16
|
+
confirm,
|
|
17
|
+
)
|
|
13
18
|
|
|
14
19
|
|
|
15
20
|
class FixHandler: # pylint: disable=too-few-public-methods
|
|
@@ -17,8 +17,14 @@ from urllib3.exceptions import HTTPError # pylint: disable=import-error
|
|
|
17
17
|
from sbo_create.handlers.fallback import SboResolver
|
|
18
18
|
from sbo_create.handlers.files import FileHandler
|
|
19
19
|
from sbo_create.handlers.validate import ValidateHandler
|
|
20
|
-
from sbo_create.models import (
|
|
21
|
-
|
|
20
|
+
from sbo_create.models import (
|
|
21
|
+
EMAIL_RE,
|
|
22
|
+
PROG,
|
|
23
|
+
SOURCE_EXTENSIONS,
|
|
24
|
+
AppContext,
|
|
25
|
+
colorize,
|
|
26
|
+
confirm,
|
|
27
|
+
)
|
|
22
28
|
|
|
23
29
|
|
|
24
30
|
def _print_tree_branch( # pylint: disable=too-many-arguments,too-many-positional-arguments
|
|
@@ -433,7 +439,7 @@ class MiscHandler:
|
|
|
433
439
|
raise SystemExit(1) from exc
|
|
434
440
|
raise SystemExit(0)
|
|
435
441
|
|
|
436
|
-
def _diff_files(self, sbo_pkg_path: Path, local_path: Path, context: int) -> bool: # pylint: disable=too-many-locals
|
|
442
|
+
def _diff_files(self, sbo_pkg_path: Path, local_path: Path, context: int) -> bool: # pylint: disable=[too-many-locals, too-many-branches]
|
|
437
443
|
"""Compute and print a unified diff between SBo repo files and local files.
|
|
438
444
|
|
|
439
445
|
Args:
|
|
@@ -444,9 +450,21 @@ class MiscHandler:
|
|
|
444
450
|
Returns:
|
|
445
451
|
True if at least one file had differences, False otherwise.
|
|
446
452
|
"""
|
|
453
|
+
try:
|
|
454
|
+
repo_files: set[str] = {f.name for f in sbo_pkg_path.iterdir() if f.is_file()}
|
|
455
|
+
local_files: set[str] = {f.name for f in local_path.iterdir() if f.is_file()}
|
|
456
|
+
except FileNotFoundError as err:
|
|
457
|
+
if not sbo_pkg_path.is_dir():
|
|
458
|
+
print(colorize(f"Error: SBo repository path not found: '{sbo_pkg_path}'", "red"))
|
|
459
|
+
elif not local_path.is_dir():
|
|
460
|
+
print(colorize(f"Error: Local package path not found: '{local_path}'", "red"))
|
|
461
|
+
else:
|
|
462
|
+
print(colorize(f"Error: Path not found: '{err.filename}'", "red"))
|
|
463
|
+
return False
|
|
464
|
+
|
|
447
465
|
any_diff: bool = False
|
|
448
466
|
skipped: list[str] = []
|
|
449
|
-
for filename in sorted(
|
|
467
|
+
for filename in sorted(repo_files):
|
|
450
468
|
if filename.endswith(SOURCE_EXTENSIONS):
|
|
451
469
|
if (local_path / filename).is_file():
|
|
452
470
|
skipped.append(filename)
|
|
@@ -476,8 +494,9 @@ class MiscHandler:
|
|
|
476
494
|
for src in skipped:
|
|
477
495
|
print(src)
|
|
478
496
|
|
|
479
|
-
repo_files: set[str] = {f.name for f in sbo_pkg_path.iterdir() if f.is_file()}
|
|
480
|
-
local_files: set[str] = {f.name for f in local_path.iterdir() if f.is_file()}
|
|
497
|
+
# repo_files: set[str] = {f.name for f in sbo_pkg_path.iterdir() if f.is_file()}
|
|
498
|
+
# local_files: set[str] = {f.name for f in local_path.iterdir() if f.is_file()}
|
|
499
|
+
|
|
481
500
|
new_files: list[str] = sorted(local_files - repo_files)
|
|
482
501
|
if new_files:
|
|
483
502
|
print("\nNew in local (not in SBo repo):")
|
|
@@ -516,8 +535,12 @@ class MiscHandler:
|
|
|
516
535
|
if not sbo_pkg_path.is_dir():
|
|
517
536
|
print(colorize(f"{PROG}: '{category}/{name}' not found in repo.", 'red'))
|
|
518
537
|
continue
|
|
519
|
-
|
|
520
|
-
|
|
538
|
+
|
|
539
|
+
if from_cwd or self.ctx.current_folder.name == name:
|
|
540
|
+
local_path: Path = self.ctx.current_folder
|
|
541
|
+
else:
|
|
542
|
+
local_path = self.ctx.current_folder / orig_name
|
|
543
|
+
|
|
521
544
|
if sbo_pkg_path.resolve() == local_path.resolve():
|
|
522
545
|
print(colorize(
|
|
523
546
|
f"{PROG}: '{name}' local path and repo path are the same directory.\n"
|
|
@@ -13,8 +13,14 @@ import urllib3 # pylint: disable=import-error
|
|
|
13
13
|
from sbo_create.handlers.fallback import SboResolver
|
|
14
14
|
from sbo_create.handlers.files import FileHandler
|
|
15
15
|
from sbo_create.handlers.fix import FixHandler
|
|
16
|
-
from sbo_create.models import (
|
|
17
|
-
|
|
16
|
+
from sbo_create.models import (
|
|
17
|
+
EMAIL_RE,
|
|
18
|
+
PROG,
|
|
19
|
+
SOURCE_EXTENSIONS,
|
|
20
|
+
UNSUPPORTED,
|
|
21
|
+
AppContext,
|
|
22
|
+
colorize,
|
|
23
|
+
)
|
|
18
24
|
|
|
19
25
|
|
|
20
26
|
class ValidateHandler:
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|