gabriel / musehub public
feat BREAKING install task/install-venv-rewrite #1 / 1
gabriel · 172 days ago · Apr 9, 2026 · Diff

feat(install): rewrite install script to venv+sdist model

Replace the binary tarball approach with a venv-based install: - install.sh checks for Python 3.14+, creates ~/.local/share/muse/venv, downloads muse sdist from {MUSEHUB_URL}/releases/muse-{ver}.tar.gz, pip-installs it, and symlinks ~/.local/bin/muse - uninstall.sh removes the symlink AND the venv - No PyPI dependency — sdist served directly from the MuseHub instance - /releases/ StaticFiles mount added to main.py (must precede wildcard routes) - test_install_script_section43.py rewritten to match new API: build_sdist_url replaces build_archive_url (no platform/arch params); venv/pip/symlink assertions added; uninstall checks venv removal

108 tests pass.

sha256:f28fcfeabc07cb31cb6105700dc1f593330ecedfcb8262bcffcf58fc4de947d1 sha
+19 ~20 −15 symbols
sha256:18567401c4cada02bbb7c82c11ded3b819059d3650cb926e0a601d1475c5ed90 snapshot
+19
symbols added
~20
symbols modified
−15
symbols removed
0
dead code introduced
Semantic Changes 54 symbols
~ musehub/api/routes/musehub/install.py .py 1 symbol added, 1 symbol removed, 4 symbols modified
− build_archive_url function function build_archive_url L117–123
+ build_sdist_url function function build_sdist_url L133–139
~ musehub/main.py .py 1 symbol added
+ _RELEASES_DIR variable variable _RELEASES_DIR L277–277
~ tests/test_install_script_section43.py .py 17 symbols added, 14 symbols removed, 16 symbols modified
− TestBuildArchiveUrlUnit class class TestBuildArchiveUrlUnit L80–105
− test_arch_embedded_in_url method method test_arch_embedded_in_url L103–105
− test_darwin_arm64 method method test_darwin_arm64 L87–89
− test_linux_x86_64 method method test_linux_x86_64 L83–85
− test_platform_embedded_in_url method method test_platform_embedded_in_url L99–101
− test_url_ends_with_tar_gz method method test_url_ends_with_tar_gz L91–93
− test_version_embedded_in_url method method test_version_embedded_in_url L95–97
− test_contains_chmod_plus_x method method test_contains_chmod_plus_x L137–139
− test_removes_only_binary method method test_removes_only_binary L182–185
− test_archive_url_unique_per_platform method method test_archive_url_unique_per_platform L385–388
− test_build_archive_url_matches_all_supported_combinations method method test_build_archive_url_matches_all_supported_combinations L203–215
− test_install_script_archive_url_is_reachable_pattern method method test_install_script_archive_url_is_reachable_pattern L196–201
− test_build_archive_url_1000_times method method test_build_archive_url_1000_times L343–346
− build_archive_url import import build_archive_url L15–15
+ TestBuildSdistUrlUnit class class TestBuildSdistUrlUnit L80–102
+ test_basic_url method method test_basic_url L83–85
+ test_ends_with_tar_gz method method test_ends_with_tar_gz L87–89
+ test_no_platform_in_url method method test_no_platform_in_url L99–102
+ test_under_releases_path method method test_under_releases_path L95–97
+ test_version_embedded method method test_version_embedded L91–93
+ test_creates_symlink method method test_creates_symlink L146–148
+ test_creates_venv method method test_creates_venv L138–140
+ test_requires_python_314 method method test_requires_python_314 L134–136
+ test_uses_pip_install method method test_uses_pip_install L142–144
+ test_removes_symlink_and_venv method method test_removes_symlink_and_venv L188–191
+ test_sdist_url_unique_per_version method method test_sdist_url_unique_per_version L390–392
+ test_get_install_sh_contains_venv method async_method test_get_install_sh_contains_venv L282–284
+ test_build_sdist_url_with_current_version method method test_build_sdist_url_with_current_version L241–246
+ test_install_script_contains_sdist_url_pattern method method test_install_script_contains_sdist_url_pattern L202–209
+ test_build_sdist_url_1000_times method method test_build_sdist_url_1000_times L348–351
+ build_sdist_url import import build_sdist_url L15–15
← Older Oldest on task/install-venv-rewrite
All commits
Newer → Latest on task/install-venv-rewrite

0 comments

No comments yet. Be the first to start the discussion.

To add a comment, use the Muse CLI: muse hub commit comment sha256:f28fcfeabc07cb31cb6105700dc1f593330ecedfcb8262bcffcf58fc4de947d1 --body "your comment"