python-devkit 0.1.0__py3-none-any.whl → 0.1.2__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.
@@ -1,51 +0,0 @@
1
- from __future__ import annotations
2
-
3
- import os
4
- import platform
5
- import shlex
6
- import shutil
7
- from pathlib import Path
8
-
9
- from bashrun import bash
10
- from pydantic_settings import BaseSettings
11
-
12
-
13
- class Settings(BaseSettings):
14
- github_token: str
15
- github_actor: str = ""
16
- github_path: str | None = None
17
- runner_temp: str = "."
18
-
19
-
20
- def install_oras(version: str = "1.2.2") -> None:
21
- settings = Settings.model_validate({})
22
- system = platform.system()
23
- sudo = system == "Linux" and os.geteuid() != 0
24
- prefix = "sudo " if sudo else ""
25
-
26
- if system == "Linux":
27
- bash(f"{prefix}apt-get update -qq")
28
- bash(f"{prefix}apt-get install -y -qq zstd")
29
- elif system == "Windows":
30
- bash("choco install zstandard -y --no-progress")
31
-
32
- if system == "Linux":
33
- archive = f"oras_{version}_linux_amd64.tar.gz"
34
- bash(f"curl -fsSLO https://github.com/oras-project/oras/releases/download/v{version}/{archive}")
35
- bash(f"{prefix}tar -xzf {archive} -C /usr/local/bin/ oras")
36
- Path(archive).unlink()
37
- elif system == "Windows":
38
- archive = f"oras_{version}_windows_amd64.zip"
39
- oras_directory = Path(settings.runner_temp) / "oras"
40
- bash(f"curl -fsSLO https://github.com/oras-project/oras/releases/download/v{version}/{archive}")
41
- shutil.unpack_archive(archive, oras_directory)
42
- Path(archive).unlink()
43
- os.environ["PATH"] = f"{oras_directory}{os.pathsep}{os.environ['PATH']}"
44
- if settings.github_path:
45
- with open(settings.github_path, "a") as file:
46
- file.write(f"{oras_directory}\n")
47
-
48
- bash(
49
- f"oras login ghcr.io --username {shlex.quote(settings.github_actor)} --password-stdin",
50
- stdin_text=settings.github_token,
51
- )
@@ -1,9 +0,0 @@
1
- # Third-party vendored files
2
-
3
- ## dotnet-install.sh
4
-
5
- - **Source**: https://dot.net/v1/dotnet-install.sh
6
- - **Upstream repo**: https://github.com/dotnet/install-scripts
7
- - **License**: MIT (see header in script)
8
- - **Vendored**: 2026-03-16
9
- - **Why**: The `actions/setup-dotnet` GitHub Action bundles this script locally to avoid downloading it at runtime. We vendor it for the same reason — downloading it via curl inside CI containers is unreliable (timeouts).