Skip to content

Add installer and clean up repo hygiene - #11

Merged
barkz merged 2 commits into
mainfrom
chore/remove-tracked-pycache
Aug 16, 2026
Merged

Add installer and clean up repo hygiene#11
barkz merged 2 commits into
mainfrom
chore/remove-tracked-pycache

Conversation

@barkz

Copy link
Copy Markdown
Owner

What

Adds install.py, a stdlib-only installer, and cleans up repo hygiene.

Installer

python3 install.py builds a single-file zipapp (~84 KB, no dependencies) and
installs it as glean in ~/.local/bin. On macOS it also creates
~/Applications/Glean.app and registers it with LaunchServices.

That last part fixes a real problem: Spotlight was matching .pyc and .pyz
files for "glean" and failing with "There is no application set to open the
document"
, because those file types have no registered handler. Application
bundles always outrank documents in Spotlight, so Cmd+Space → "Glean" now
launches the REPL in a Terminal window.

Flags: --cli-only, --dev (launch from the working tree, no rebuild after
edits), --prefix DIR, --verify, --uninstall.

The bundle is self-contained — the launch script and zipapp live in
Contents/Resources/. Uninstall leaves ~/.gleancode/ alone.

Repo hygiene

  • Removes 35 tracked __pycache__/*.pyc artifacts. They were committed before
    __pycache__/ was added to .gitignore, and .gitignore never applies
    retroactively to already-tracked files.
  • Adds .metadata_never_index so Spotlight skips the repo.
  • De-duplicates git/ in .gitignore and drops dead build/ rules — the
    installer stages in a temp directory, so no in-tree build output exists.

Tests

tests/test_install.py adds 22 tests: the zipapp builds and runs, caches and
editor cruft stay out of the archive, bundle layout and exec bits, Info.plist
parses via plistlib and declares APPL, dev vs snapshot launch modes, and arg
dispatch. Each test redirects at a temp directory, so real user paths are never
touched.

Suite: 699 → 721 tests, passing on Python 3.9.6 and 3.12.7.

Verified by installing from a git archive clone containing no ignored files.

Docs

README gains an install section with a flag table; project layout and test
count updated.

barkzand others added 2 commits August 16, 2026 16:46
The .pyc files under glean_code/ and tests/ were committed before the
__pycache__/ ignore rule existed, so .gitignore never applied to them.
Removes all 35 tracked artifacts.
Also adds two ignore rules:
- .metadata_never_index, which stops macOS Spotlight indexing the repo
(the tracked .pyc files were hijacking Cmd+Space searches for "glean")
- build.noindex/, the zipapp build output directory
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@barkz
barkz merged commit e46d517 into mainAug 16, 2026
1 check passed
barkz added a commit that referenced this pull request Aug 16, 2026
* Add a Highlights section to the README
Three bullets under the screenshot covering what landed recently, each
linked to its PR and squashed merge commit:
- installer and macOS Spotlight app (#11, e46d517)
- OpenAPI incompatibility audit (#10, f81902d)
- repo hygiene and stale-doc fixes (#12, 17199b5)
Also adds Highlights to the Contents list.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
* Rename README 'What you get' section to 'Overview'
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
@barkz
barkz deleted the chore/remove-tracked-pycache branch August 20, 2026 03:18
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

@barkz