Skip to content

Commit 093ab78

Browse files
committed
Merge branch 'release-candidate' into release
2 parents c898427 + 8573d02 commit 093ab78

File tree

4 files changed

+24
-16
lines changed

4 files changed

+24
-16
lines changed

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88
runs-on: ubuntu-latest
99
strategy:
1010
matrix:
11-
python-version: [3.8, 3.11]
11+
python-version: [3.8, 3.11, 3.12]
1212

1313
steps:
1414
- uses: actions/checkout@v2

VERSION.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.2.5
1+
0.2.6

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ authors = [{ name = "Flipper Devices Inc.", email = "pypi@flipperdevices.com" }]
99
description = "uFBT - micro Flipper Build Tool. Tool for building and developing applications (.fap) for Flipper Zero and its device family."
1010
readme = "README.md"
1111
requires-python = ">=3.8"
12+
dependencies = ["oslex>=0.1.3"]
1213
keywords = ["ufbt", "flipperzero", "fbt", "stm32", "fap"]
1314
license = { text = "GPL-3.0" }
1415
classifiers = [
@@ -26,7 +27,6 @@ classifiers = [
2627
"Operating System :: POSIX :: Linux",
2728
]
2829

29-
3030
[project.urls]
3131
homepage = "https://github.com/flipperdevices/flipperzero-ufbt"
3232
documentation = "https://github.com/flipperdevices/flipperzero-ufbt"

ufbt/__init__.py

Lines changed: 21 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
import pathlib
2222
import platform
2323
import sys
24+
import oslex
2425

2526
from .bootstrap import (
2627
DEFAULT_UFBT_HOME,
@@ -83,30 +84,37 @@ def ufbt_cli():
8384
if not os.path.exists(ufbt_state_dir / "current"):
8485
bootstrap_cli(["update"])
8586

86-
if not (ufbt_state_dir / "current" / "scripts" / "ufbt").exists():
87+
if not (
88+
ufbt_script_root := ufbt_state_dir / "current" / "scripts" / "ufbt"
89+
).exists():
8790
print("SDK is missing scripts distribution!")
8891
print("You might be trying to use an SDK in an outdated format.")
89-
print("Run `ufbt update -h` for more information on how to update.")
92+
print("You can clean up current state with `ufbt clean --purge`.")
93+
print("Run `ufbt update -h` for more information on SDK installation.")
9094
return 1
9195

9296
UFBT_APP_DIR = os.getcwd()
9397

9498
if platform.system() == "Windows":
95-
commandline = (
96-
r'call "%UFBT_STATE_DIR%/current/scripts/toolchain/fbtenv.cmd" env & '
97-
"python -m SCons -Q --warn=target-not-built "
98-
r'-C "%UFBT_STATE_DIR%/current/scripts/ufbt" '
99-
f'"UFBT_APP_DIR={UFBT_APP_DIR}" ' + " ".join(sys.argv[1:])
100-
)
101-
99+
commandline = r'call "%UFBT_STATE_DIR%/current/scripts/toolchain/fbtenv.cmd" env & python '
102100
else:
103101
commandline = (
104-
'. "$UFBT_STATE_DIR/current/scripts/toolchain/fbtenv.sh" && '
105-
"python3 -m SCons -Q --warn=target-not-built "
106-
'-C "$UFBT_STATE_DIR/current/scripts/ufbt" '
107-
f'"UFBT_APP_DIR={UFBT_APP_DIR}" ' + " ".join(sys.argv[1:])
102+
'. "$UFBT_STATE_DIR/current/scripts/toolchain/fbtenv.sh" && python3 '
108103
)
109104

105+
commandline += oslex.join(
106+
[
107+
"-m",
108+
"SCons",
109+
"-Q",
110+
"--warn=target-not-built",
111+
"-C",
112+
str(ufbt_script_root),
113+
f"UFBT_APP_DIR={UFBT_APP_DIR}",
114+
*sys.argv[1:],
115+
]
116+
)
117+
110118
# print(commandline)
111119
retcode = os.system(commandline)
112120
if platform.system() != "Windows":

0 commit comments

Comments
 (0)