diff --git a/.github/workflows/debian.yml b/.github/workflows/debian.yml index 5fe29d94..817a9ca8 100644 --- a/.github/workflows/debian.yml +++ b/.github/workflows/debian.yml @@ -108,7 +108,7 @@ jobs: - name: Install system dependencies run: | - sudo apt-get install -y python3.13 python3.13-venv python3-pip nodejs npm git wget curl ripgrep + sudo apt-get install -y python3.13 python3.13-venv python3-pip - name: Pre-seed virtualenv with local wheel before dpkg install run: | diff --git a/.github/workflows/homebrew.yml b/.github/workflows/homebrew.yml index dccb6dda..fdceff50 100644 --- a/.github/workflows/homebrew.yml +++ b/.github/workflows/homebrew.yml @@ -87,18 +87,6 @@ class Archivebox < Formula license "MIT" depends_on "python@3.13" - depends_on "node" - depends_on "git" - depends_on "wget" - depends_on "curl" - depends_on "ripgrep" - depends_on "yt-dlp" - - on_linux do - depends_on "pkg-config" => :build - depends_on "openssl@3" - depends_on "libffi" - end ${RESOURCES} @@ -106,21 +94,6 @@ ${RESOURCES} virtualenv_install_with_resources end - def post_install - (var/"archivebox").mkpath - with_env(DATA_DIR: var/"archivebox") do - system bin/"archivebox", "install", "--binproviders", "pip,npm" - end - end - - service do - run [opt_bin/"archivebox", "server", "--quick-init", "0.0.0.0:8000"] - keep_alive crashed: true - working_dir var/"archivebox" - log_path var/"log/archivebox.log" - error_log_path var/"log/archivebox.log" - end - test do assert_match version.to_s, shell_output("#{bin}/archivebox version") end @@ -148,11 +121,7 @@ RUBY echo "$HOMEBREW_PREFIX/sbin" >> "$GITHUB_PATH" - name: Install brew dependencies - run: | - brew install python@3.13 node git wget curl ripgrep yt-dlp - if [ "$RUNNER_OS" = "Linux" ]; then - brew install pkg-config openssl@3 libffi - fi + run: brew install python@3.13 - name: Install archivebox via brew from local formula run: | @@ -256,18 +225,6 @@ class Archivebox < Formula head "https://github.com/ArchiveBox/ArchiveBox.git", branch: "dev" depends_on "python@3.13" - depends_on "node" - depends_on "git" - depends_on "wget" - depends_on "curl" - depends_on "ripgrep" - depends_on "yt-dlp" - - on_linux do - depends_on "pkg-config" => :build - depends_on "openssl@3" - depends_on "libffi" - end ${RESOURCES} @@ -275,21 +232,6 @@ ${RESOURCES} virtualenv_install_with_resources end - def post_install - (var/"archivebox").mkpath - with_env(DATA_DIR: var/"archivebox") do - system bin/"archivebox", "install", "--binproviders", "pip,npm" - end - end - - service do - run [opt_bin/"archivebox", "server", "--quick-init", "0.0.0.0:8000"] - keep_alive crashed: true - working_dir var/"archivebox" - log_path var/"log/archivebox.log" - error_log_path var/"log/archivebox.log" - end - test do assert_match version.to_s, shell_output("#{bin}/archivebox version") end diff --git a/bin/build_brew.sh b/bin/build_brew.sh index b10bad47..e6bf8a45 100755 --- a/bin/build_brew.sh +++ b/bin/build_brew.sh @@ -54,12 +54,8 @@ echo "[+] Updating formula file: $FORMULA_FILE" # Build the formula from the template cat > "$FORMULA_FILE" << RUBY -# This formula is auto-generated by bin/build_brew.sh using homebrew-pypi-poet. -# To update: run bin/build_brew.sh, or trigger the GitHub Actions homebrew workflow. -# -# Users install with: -# brew tap archivebox/archivebox -# brew install archivebox +# Auto-generated by bin/build_brew.sh using homebrew-pypi-poet. +# Users install with: brew tap archivebox/archivebox && brew install archivebox class Archivebox < Formula include Language::Python::Virtualenv @@ -72,18 +68,8 @@ class Archivebox < Formula head "https://github.com/ArchiveBox/ArchiveBox.git", branch: "dev" depends_on "python@3.13" - depends_on "node" - depends_on "git" - depends_on "wget" - depends_on "curl" - depends_on "ripgrep" - depends_on "yt-dlp" - - on_linux do - depends_on "pkg-config" => :build - depends_on "openssl@3" - depends_on "libffi" - end + # All other runtime deps (node, chrome, yt-dlp, etc.) are installed + # on-demand by \`archivebox install\` and should NOT be declared here. # Python dependency resource blocks auto-generated by homebrew-pypi-poet # AUTOGENERATED_RESOURCES_START @@ -94,20 +80,6 @@ ${RESOURCES} virtualenv_install_with_resources end - def post_install - # Install runtime dependencies (plugins, JS extractors, etc.) - (var/"archivebox").mkpath - system({ "DATA_DIR" => var/"archivebox" }, bin/"archivebox", "install", "--binproviders", "pip,npm") - end - - service do - run [opt_bin/"archivebox", "server", "--quick-init", "0.0.0.0:8000"] - keep_alive crashed: true - working_dir var/"archivebox" - log_path var/"log/archivebox.log" - error_log_path var/"log/archivebox.log" - end - test do assert_match version.to_s, shell_output("#{bin}/archivebox version") end diff --git a/brew_dist/archivebox.rb b/brew_dist/archivebox.rb index 6f9d8ada..f25dd8e6 100644 --- a/brew_dist/archivebox.rb +++ b/brew_dist/archivebox.rb @@ -1,9 +1,5 @@ -# This formula is auto-generated by bin/build_brew.sh using homebrew-pypi-poet. -# To update: run bin/build_brew.sh, or trigger the GitHub Actions homebrew workflow. -# -# Users install with: -# brew tap archivebox/archivebox -# brew install archivebox +# Auto-generated by bin/build_brew.sh using homebrew-pypi-poet. +# Users install with: brew tap archivebox/archivebox && brew install archivebox class Archivebox < Formula include Language::Python::Virtualenv @@ -16,21 +12,10 @@ class Archivebox < Formula head "https://github.com/ArchiveBox/ArchiveBox.git", branch: "dev" depends_on "python@3.13" - depends_on "node" - depends_on "git" - depends_on "wget" - depends_on "curl" - depends_on "ripgrep" - depends_on "yt-dlp" + # All other runtime deps (node, chrome, yt-dlp, etc.) are installed + # on-demand by `archivebox install` and should NOT be declared here. - on_linux do - depends_on "pkg-config" => :build - depends_on "openssl@3" - depends_on "libffi" - end - - # Python dependency resource blocks are auto-generated by bin/build_brew.sh - # using homebrew-pypi-poet. Run that script to populate this section. + # Python dependency resource blocks auto-generated by homebrew-pypi-poet # AUTOGENERATED_RESOURCES_START # AUTOGENERATED_RESOURCES_END @@ -38,22 +23,6 @@ class Archivebox < Formula virtualenv_install_with_resources end - def post_install - # Install runtime dependencies (plugins, JS extractors, etc.) - (var/"archivebox").mkpath - with_env(DATA_DIR: var/"archivebox") do - system bin/"archivebox", "install", "--binproviders", "pip,npm" - end - end - - service do - run [opt_bin/"archivebox", "server", "--quick-init", "0.0.0.0:8000"] - keep_alive crashed: true - working_dir var/"archivebox" - log_path var/"log/archivebox.log" - error_log_path var/"log/archivebox.log" - end - test do assert_match version.to_s, shell_output("#{bin}/archivebox version") end diff --git a/pkg/debian/nfpm.yaml b/pkg/debian/nfpm.yaml index 64accf7f..83cb0074 100644 --- a/pkg/debian/nfpm.yaml +++ b/pkg/debian/nfpm.yaml @@ -25,17 +25,8 @@ depends: - python3 (>= 3.11) - python3-pip - python3-venv - - nodejs - - npm - - git - - wget - - curl - - ripgrep - -recommends: - - yt-dlp - - ffmpeg - - chromium | chromium-browser | google-chrome-stable + # All other runtime deps (node, chrome, yt-dlp, etc.) are installed on-demand + # by `archivebox install` and should NOT be declared as package dependencies. contents: # Wrapper script for /usr/bin/archivebox