macsetup 0.1.0__tar.gz → 0.1.1__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.
- {macsetup-0.1.0 → macsetup-0.1.1}/.github/workflows/ci.yml +4 -1
- {macsetup-0.1.0 → macsetup-0.1.1}/PKG-INFO +1 -1
- {macsetup-0.1.0 → macsetup-0.1.1}/install.sh +20 -5
- {macsetup-0.1.0 → macsetup-0.1.1}/pyproject.toml +1 -1
- {macsetup-0.1.0 → macsetup-0.1.1}/src/macsetup/cli.py +3 -1
- {macsetup-0.1.0 → macsetup-0.1.1}/uv.lock +2 -2
- {macsetup-0.1.0 → macsetup-0.1.1}/.github/workflows/release.yml +0 -0
- {macsetup-0.1.0 → macsetup-0.1.1}/.gitignore +0 -0
- {macsetup-0.1.0 → macsetup-0.1.1}/LICENSE +0 -0
- {macsetup-0.1.0 → macsetup-0.1.1}/README.md +0 -0
- {macsetup-0.1.0 → macsetup-0.1.1}/files/git/gitconfig.j2 +0 -0
- {macsetup-0.1.0 → macsetup-0.1.1}/files/shell/zshrc-block.zsh +0 -0
- {macsetup-0.1.0 → macsetup-0.1.1}/files/zsh/00-homebrew.zsh +0 -0
- {macsetup-0.1.0 → macsetup-0.1.1}/files/zsh/10-completion.zsh +0 -0
- {macsetup-0.1.0 → macsetup-0.1.1}/files/zsh/cli.zsh +0 -0
- {macsetup-0.1.0 → macsetup-0.1.1}/files/zsh/node.zsh +0 -0
- {macsetup-0.1.0 → macsetup-0.1.1}/files/zsh/python.zsh +0 -0
- {macsetup-0.1.0 → macsetup-0.1.1}/manifests/modules/cli.yaml +0 -0
- {macsetup-0.1.0 → macsetup-0.1.1}/manifests/modules/core.yaml +0 -0
- {macsetup-0.1.0 → macsetup-0.1.1}/manifests/modules/editors.yaml +0 -0
- {macsetup-0.1.0 → macsetup-0.1.1}/manifests/modules/fonts.yaml +0 -0
- {macsetup-0.1.0 → macsetup-0.1.1}/manifests/modules/git-identity.yaml +0 -0
- {macsetup-0.1.0 → macsetup-0.1.1}/manifests/modules/lang-node.yaml +0 -0
- {macsetup-0.1.0 → macsetup-0.1.1}/manifests/modules/lang-python.yaml +0 -0
- {macsetup-0.1.0 → macsetup-0.1.1}/manifests/modules/shell.yaml +0 -0
- {macsetup-0.1.0 → macsetup-0.1.1}/manifests/profiles.yaml +0 -0
- {macsetup-0.1.0 → macsetup-0.1.1}/manifests/vars.yaml +0 -0
- {macsetup-0.1.0 → macsetup-0.1.1}/src/macsetup/__init__.py +0 -0
- {macsetup-0.1.0 → macsetup-0.1.1}/src/macsetup/brewfile.py +0 -0
- {macsetup-0.1.0 → macsetup-0.1.1}/src/macsetup/detect.py +0 -0
- {macsetup-0.1.0 → macsetup-0.1.1}/src/macsetup/files.py +0 -0
- {macsetup-0.1.0 → macsetup-0.1.1}/src/macsetup/manifest.py +0 -0
- {macsetup-0.1.0 → macsetup-0.1.1}/src/macsetup/planner.py +0 -0
- {macsetup-0.1.0 → macsetup-0.1.1}/src/macsetup/runner.py +0 -0
- {macsetup-0.1.0 → macsetup-0.1.1}/src/macsetup/state.py +0 -0
- {macsetup-0.1.0 → macsetup-0.1.1}/src/macsetup/wizard.py +0 -0
- {macsetup-0.1.0 → macsetup-0.1.1}/tests/test_files.py +0 -0
- {macsetup-0.1.0 → macsetup-0.1.1}/tests/test_manifest.py +0 -0
- {macsetup-0.1.0 → macsetup-0.1.1}/tests/test_planner.py +0 -0
- {macsetup-0.1.0 → macsetup-0.1.1}/tests/test_state.py +0 -0
- {macsetup-0.1.0 → macsetup-0.1.1}/tests/test_wizard.py +0 -0
|
@@ -117,9 +117,12 @@ jobs:
|
|
|
117
117
|
run: |
|
|
118
118
|
sb=$(mktemp -d)
|
|
119
119
|
for run in 1 2; do
|
|
120
|
-
HOME="$sb" MACSETUP_SOURCE="$PWD"
|
|
120
|
+
HOME="$sb" SHELL=/bin/zsh MACSETUP_SOURCE="$PWD" \
|
|
121
|
+
bash -s -- plan --profile minimal < install.sh
|
|
121
122
|
done
|
|
122
123
|
test -x "$sb/.local/bin/macsetup"
|
|
124
|
+
# A new terminal has to find it too, not just the installer's shell.
|
|
125
|
+
env -i HOME="$sb" PATH=/usr/bin:/bin zsh -l -c 'command -v macsetup'
|
|
123
126
|
|
|
124
127
|
# Re-applying a converged machine must be a no-op, not a second write.
|
|
125
128
|
- name: applying twice is idempotent
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: macsetup
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.1
|
|
4
4
|
Summary: Declarative provisioning for macOS: packages and dotfiles, with a preview
|
|
5
5
|
Project-URL: Homepage, https://github.com/neosergio/macsetup
|
|
6
6
|
Project-URL: Issues, https://github.com/neosergio/macsetup/issues
|
|
@@ -34,10 +34,23 @@ fi
|
|
|
34
34
|
|
|
35
35
|
# `curl | bash` feeds the script itself on stdin, so anything that prompts has
|
|
36
36
|
# to read the terminal explicitly -- otherwise it would swallow the rest of
|
|
37
|
-
# this file as its answers.
|
|
38
|
-
|
|
37
|
+
# this file as its answers. That means the terminal's real device, not
|
|
38
|
+
# /dev/tty: macOS kqueue rejects /dev/tty with EINVAL, and the wizard's event
|
|
39
|
+
# loop (prompt_toolkit on asyncio) dies on it before asking anything.
|
|
40
|
+
tty_dev=""
|
|
41
|
+
if [[ ! -t 0 ]]; then
|
|
42
|
+
tty_dev="/dev/$(ps -o tty= -p $$ | tr -d ' ')"
|
|
43
|
+
{ : <"$tty_dev"; } 2>/dev/null || tty_dev=""
|
|
44
|
+
fi
|
|
45
|
+
if [[ -t 0 || -n $tty_dev ]]; then have_tty=1; else have_tty=0; fi
|
|
39
46
|
interactive() {
|
|
40
|
-
if
|
|
47
|
+
if [[ -t 0 ]]; then
|
|
48
|
+
"$@"
|
|
49
|
+
elif [[ -n $tty_dev ]]; then
|
|
50
|
+
"$@" <"$tty_dev"
|
|
51
|
+
else
|
|
52
|
+
"$@" </dev/null
|
|
53
|
+
fi
|
|
41
54
|
}
|
|
42
55
|
|
|
43
56
|
find_brew() {
|
|
@@ -88,11 +101,13 @@ main() {
|
|
|
88
101
|
brew install uv
|
|
89
102
|
fi
|
|
90
103
|
|
|
91
|
-
#
|
|
104
|
+
# Persist uv's bin dir for future shells, then add it to this one -- in that
|
|
105
|
+
# order: update-shell does nothing when the dir is already on PATH, which
|
|
106
|
+
# left `macsetup: command not found` in every new terminal.
|
|
107
|
+
uv tool update-shell >/dev/null 2>&1 || true
|
|
92
108
|
PATH="$(uv tool dir --bin):$PATH"
|
|
93
109
|
say "Installing macsetup"
|
|
94
110
|
uv tool install --upgrade "$MACSETUP_SOURCE"
|
|
95
|
-
uv tool update-shell >/dev/null 2>&1 || true
|
|
96
111
|
|
|
97
112
|
if (($#)); then
|
|
98
113
|
say "Running: macsetup $*"
|
|
@@ -244,7 +244,9 @@ def _run_wizard(catalog: Catalog, current: MachineState | None) -> MachineState:
|
|
|
244
244
|
console.print("[yellow]Cancelled.[/] Nothing was saved.")
|
|
245
245
|
raise typer.Exit(130) from None
|
|
246
246
|
except (OSError, EOFError) as exc:
|
|
247
|
-
|
|
247
|
+
# repr, not str: EOFError stringifies to nothing, which leaves the
|
|
248
|
+
# message ending in a bare colon.
|
|
249
|
+
console.print(f"[red]Could not read from the terminal:[/] {exc!r}")
|
|
248
250
|
raise typer.Exit(2) from exc
|
|
249
251
|
|
|
250
252
|
# Enter on an untouched checkbox selects nothing, which is a legitimate
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
version = 1
|
|
2
|
-
revision =
|
|
2
|
+
revision = 3
|
|
3
3
|
requires-python = ">=3.12"
|
|
4
4
|
|
|
5
5
|
[[package]]
|
|
@@ -52,7 +52,7 @@ wheels = [
|
|
|
52
52
|
|
|
53
53
|
[[package]]
|
|
54
54
|
name = "macsetup"
|
|
55
|
-
version = "0.1.
|
|
55
|
+
version = "0.1.1"
|
|
56
56
|
source = { editable = "." }
|
|
57
57
|
dependencies = [
|
|
58
58
|
{ name = "jinja2" },
|
|
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
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|