Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/ccache_get.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
sys.path.append(
(Path(__file__).parent / '..').absolute().as_posix()
)
from scripts import utils as x
from buildx import utils as x
# ----------------------------


Expand Down
2 changes: 1 addition & 1 deletion .github/ccache_put.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
sys.path.append(
(Path(__file__).parent / '..').absolute().as_posix()
)
from scripts import utils as x
from buildx import utils as x
# ----------------------------


Expand Down
2 changes: 1 addition & 1 deletion .github/library_packed.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
sys.path.append(
(Path(__file__).parent / '..').absolute().as_posix()
)
from scripts import utils as x
from buildx import utils as x
# ----------------------------

import os
Expand Down
2 changes: 1 addition & 1 deletion .github/rclone.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
sys.path.append(
(Path(__file__).parent / '..').absolute().as_posix()
)
from scripts import utils as x
from buildx import utils as x
# ----------------------------

import glob
Expand Down
2 changes: 1 addition & 1 deletion .github/setenv_00.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
sys.path.append(
(Path(__file__).parent / '..').absolute().as_posix()
)
from scripts import utils as x
from buildx import utils as x
# ----------------------------

import os
Expand Down
2 changes: 1 addition & 1 deletion .github/setenv_01.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
sys.path.append(
(Path(__file__).parent / '..').absolute().as_posix()
)
from scripts import utils as x
from buildx import utils as x
# ----------------------------

import os
Expand Down
4 changes: 2 additions & 2 deletions build.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import sys
sys.dont_write_bytecode = True

from scripts import utils as x
from buildx import utils as x
# ----------------------------


Expand Down Expand Up @@ -701,6 +701,6 @@ def show_help(exitcode = 1) -> NoReturn:
func()
if not x.ON_CODE_EDIT:
x._util_func__exec_python([
(Path(x.PROJ_ROOT) / 'scripts' / 'tree.py').absolute().as_posix(), _pkg_inst_dir, '3'
(Path(x.PROJ_ROOT) / 'buildx' / 'tree.py').absolute().as_posix(), _pkg_inst_dir, '3'
])
x.print_stderr(f'──── Build Done @{dt.datetime.now(dt.timezone.utc).strftime("%Y-%m-%d %H:%M:%S %Z")} ────')
File renamed without changes.
9 changes: 7 additions & 2 deletions scripts/tree.py → buildx/tree.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@
from pathlib import Path


def _format_size(_path: Path) -> str:
_size = _path.stat().st_size
return f'{_size} bytes (≈ {(_size / 1024.0):.3f} KiB)'

basepath = Path(sys.argv[1])
depth = 0
if len(sys.argv) > 2:
Expand All @@ -27,13 +31,14 @@
_name_with_symlink = _path.as_posix()
if _is_symlink:
_name_with_symlink = f'{_name_with_symlink} -> {_path.readlink().as_posix()}'
_line = f'[{_format_size(_path)}] {_name_with_symlink}'

_child_prefixes: list[str] = []
if _depth == -1:
x.print_stderr(f"{_name_with_symlink}")
x.print_stderr(f"{_line}")
else:
_child_prefixes = _prefixes + [' ' if _connector.startswith('└') else '│ ']
x.print_stderr(f"{''.join(_prefixes)}{_connector}{_name_with_symlink}")
x.print_stderr(f"{''.join(_prefixes)}{_connector}{_line}")

if (not _is_dir) or (depth > 0 and _depth + 1 >= depth):
continue
Expand Down
2 changes: 1 addition & 1 deletion scripts/utils.py → buildx/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ def _util_func__pip_install(packages: list[str]):
_util_func__exec_python(args=args)
def _util_func__dl_3rd_deps(args: list[str]):
_util_func__exec_python(args=[
(Path(PROJ_ROOT) / 'scripts' / 'get_prebuilt.py').absolute().as_posix(), *args
(Path(PROJ_ROOT) / 'buildx' / 'get_prebuilt.py').absolute().as_posix(), *args
])

def _util_put_pkg_version_desc(pkg_name: str, ver: str):
Expand Down
2 changes: 1 addition & 1 deletion modules/dav1d.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# fmt: off

from scripts import utils as x
from buildx import utils as x
# ----------------------------

import os
Expand Down
2 changes: 1 addition & 1 deletion modules/ffmpeg.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# fmt: off

from scripts import utils as x
from buildx import utils as x
# ----------------------------

import os
Expand Down
2 changes: 1 addition & 1 deletion modules/libexpat.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# fmt: off

from scripts import utils as x
from buildx import utils as x
# ----------------------------

import os
Expand Down
2 changes: 1 addition & 1 deletion modules/libjpeg80.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# fmt: off

from scripts import utils as x
from buildx import utils as x
# ----------------------------

import os
Expand Down
2 changes: 1 addition & 1 deletion modules/libpng16.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# fmt: off

from scripts import utils as x
from buildx import utils as x
# ----------------------------

import os
Expand Down
2 changes: 1 addition & 1 deletion modules/llvm.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# fmt: off

from scripts import utils as x
from buildx import utils as x
# ----------------------------

import os
Expand Down
2 changes: 1 addition & 1 deletion modules/mbedtls3.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# fmt: off

from scripts import utils as x
from buildx import utils as x
# ----------------------------

import os
Expand Down
2 changes: 1 addition & 1 deletion modules/mbedtls4.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# fmt: off

from scripts import utils as x
from buildx import utils as x
# ----------------------------

import os
Expand Down
2 changes: 1 addition & 1 deletion modules/sdl2.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# fmt: off

from scripts import utils as x
from buildx import utils as x
# ----------------------------

import os
Expand Down
2 changes: 1 addition & 1 deletion modules/zlib-ng.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# fmt: off

from scripts import utils as x
from buildx import utils as x
# ----------------------------

import os
Expand Down