diff --git a/.gitmodules b/.gitmodules index 1fd1db9b..a086fcb3 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,10 +1,6 @@ [submodule "docs"] path = docs url = https://github.com/ArchiveBox/ArchiveBox.wiki.git - -[submodule "brew_dist"] - path = brew_dist - url = https://github.com/ArchiveBox/homebrew-archivebox.git [submodule "pip_dist"] path = pip_dist url = https://github.com/ArchiveBox/pip-archivebox.git diff --git a/bin/build.sh b/bin/build.sh index b5d48115..b3271873 100755 --- a/bin/build.sh +++ b/bin/build.sh @@ -19,8 +19,6 @@ cd "$REPO_DIR" # the order matters ./bin/build_docs.sh ./bin/build_pip.sh -./bin/build_deb.sh -./bin/build_brew.sh ./bin/build_docker.sh echo "[√] Done. Install the built package by running:" diff --git a/bin/build_brew.sh b/bin/build_brew.sh deleted file mode 100755 index d73d92c4..00000000 --- a/bin/build_brew.sh +++ /dev/null @@ -1,54 +0,0 @@ -#!/usr/bin/env bash - -### Bash Environment Setup -# http://redsymbol.net/articles/unofficial-bash-strict-mode/ -# https://www.gnu.org/software/bash/manual/html_node/The-Set-Builtin.html -# set -o xtrace -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -IFS=$'\n' - -REPO_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" > /dev/null 2>&1 && cd .. && pwd )" - - -CURRENT_PLAFORM="$(uname)" -REQUIRED_PLATFORM="Darwin" -if [[ "$CURRENT_PLAFORM" != "$REQUIRED_PLATFORM" ]]; then - echo "[!] Skipping the Homebrew package build on $CURRENT_PLAFORM (it can only be run on $REQUIRED_PLATFORM)." - exit 0 -fi - - -cd "$REPO_DIR/brew_dist" -# make sure archivebox.rb is up-to-date with the dependencies -git pull -git status | grep 'up to date' - -echo -echo "[+] Uninstalling any exisitng archivebox versions..." -brew uninstall archivebox || true -brew untap archivebox/archivebox || true -brew uninstall --ignore-dependencies yt-dlp || true -brew uninstall python-mutagen || true -brew uninstall python-brotli || true - -pip3 uninstall archivebox || true -pip3 uninstall mutagen || true -pip3 uninstall brotli || true -pip3 uninstall yt-dlp || true - -# echo "[*] Running Formula linters and test build..." -# brew test-bot --tap=ArchiveBox/homebrew-archivebox archivebox/archivebox/archivebox || true -# brew uninstall archivebox || true -# brew untap archivebox/archivebox || true - -echo -echo "[+] Installing and building hombrew bottle from https://github.com/ArchiveBox/homebrew-archivebox#main" -brew tap archivebox/archivebox -brew install --build-bottle archivebox -brew bottle archivebox - -echo -echo "[√] Finished. Make sure to commit the outputted .tar.gz and bottle files!" \ No newline at end of file diff --git a/bin/build_deb.sh b/bin/build_deb.sh deleted file mode 100755 index 4061e3ae..00000000 --- a/bin/build_deb.sh +++ /dev/null @@ -1,58 +0,0 @@ -#!/usr/bin/env bash - -### Bash Environment Setup -# http://redsymbol.net/articles/unofficial-bash-strict-mode/ -# https://www.gnu.org/software/bash/manual/html_node/The-Set-Builtin.html -# set -o xtrace -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -IFS=$'\n' - - -CURRENT_PLAFORM="$(uname)" -REQUIRED_PLATFORM="Linux" -if [[ "$CURRENT_PLAFORM" != "$REQUIRED_PLATFORM" ]]; then - echo "[!] Skipping the Debian package build on $CURRENT_PLAFORM (it can only be run on $REQUIRED_PLATFORM)." - exit 0 -fi - - -REPO_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && cd .. && pwd )" -VERSION="$(jq -r '.version' < "$REPO_DIR/package.json")" -DEBIAN_VERSION="${DEBIAN_VERSION:-1}" -cd "$REPO_DIR" - - -if [[ -f "$REPO_DIR/.venv/bin/activate" ]]; then - source "$REPO_DIR/.venv/bin/activate" -else - echo "[!] Warning: No virtualenv presesnt in $REPO_DIR.venv" -fi - - -# Build python package lists -# https://pdm-project.org/latest/usage/lockfile/ -echo "[+] Generating requirements.txt and pdm.lock from pyproject.toml..." -pdm lock --group=':all' --production --lockfile pdm.lock --strategy="cross_platform" -pdm sync --group=':all' --production --lockfile pdm.lock --clean || pdm sync --group=':all' --production --lockfile pdm.lock --clean -pdm export --group=':all' --production --lockfile pdm.lock --without-hashes -o requirements.txt - -pdm lock --group=':all' --dev --lockfile pdm.dev.lock --strategy="cross_platform" -pdm sync --group=':all' --dev --lockfile pdm.dev.lock --clean || pdm sync --group=':all' --dev --lockfile pdm.dev.lock --clean -pdm export --group=':all' --dev --lockfile pdm.dev.lock --without-hashes -o requirements-dev.txt - - - -# cleanup build artifacts -rm -Rf build deb_dist dist archivebox-*.tar.gz - - -# build source and binary packages -# make sure the stdeb.cfg file is up-to-date with all the dependencies -python3 setup.py --command-packages=stdeb.command \ - sdist_dsc --debian-version=$DEBIAN_VERSION \ - bdist_deb - -# should output deb_dist/archivebox_0.5.4-1.{deb,changes,buildinfo,tar.gz} diff --git a/bin/release.sh b/bin/release.sh index 34256fad..491cadae 100755 --- a/bin/release.sh +++ b/bin/release.sh @@ -18,20 +18,16 @@ cd "$REPO_DIR" # ./bin/lint.sh # ./bin/test.sh -# Run all the build scripts -./bin/build_git.sh -./bin/build_docs.sh -./bin/build_pip.sh -./bin/build_deb.sh -./bin/build_brew.sh -./bin/build_docker.sh +# # Run all the build scripts +# ./bin/build_git.sh +# ./bin/build_docs.sh +# ./bin/build_pip.sh +# ./bin/build_docker.sh # Push relase to public repositories ./bin/release_git.sh ./bin/release_docs.sh ./bin/release_pip.sh -./bin/release_deb.sh -./bin/release_brew.sh ./bin/release_docker.sh VERSION="$(jq -r '.version' < "$REPO_DIR/package.json")" diff --git a/bin/release_brew.sh b/bin/release_brew.sh deleted file mode 100755 index 47b3bdca..00000000 --- a/bin/release_brew.sh +++ /dev/null @@ -1,30 +0,0 @@ -#!/usr/bin/env bash - -### Bash Environment Setup -# http://redsymbol.net/articles/unofficial-bash-strict-mode/ -# https://www.gnu.org/software/bash/manual/html_node/The-Set-Builtin.html -# set -o xtrace -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -IFS=$'\n' - -REPO_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && cd .. && pwd )" - - -CURRENT_PLAFORM="$(uname)" -REQUIRED_PLATFORM="Darwin" -if [[ "$CURRENT_PLAFORM" != "$REQUIRED_PLATFORM" ]]; then - echo "[!] Skipping the Homebrew package build on $CURRENT_PLAFORM (it can only be run on $REQUIRED_PLATFORM)." - exit 0 -fi - -cd "$REPO_DIR" - -./bin/build_brew.sh - -git add '*.bottle.tar.gz' -git commit -m "add new release bottle" -git pull -git push \ No newline at end of file diff --git a/bin/release_deb.sh b/bin/release_deb.sh deleted file mode 100755 index a470c4f3..00000000 --- a/bin/release_deb.sh +++ /dev/null @@ -1,50 +0,0 @@ -#!/usr/bin/env bash - -### Bash Environment Setup -# http://redsymbol.net/articles/unofficial-bash-strict-mode/ -# https://www.gnu.org/software/bash/manual/html_node/The-Set-Builtin.html -# set -o xtrace -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail -IFS=$'\n' - - -CURRENT_PLAFORM="$(uname)" -REQUIRED_PLATFORM="Linux" -if [[ "$CURRENT_PLAFORM" != "$REQUIRED_PLATFORM" ]]; then - echo "[!] Skipping the Debian package build on $CURRENT_PLAFORM (it can only be run on $REQUIRED_PLATFORM)." - exit 0 -fi - - -REPO_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && cd .. && pwd )" -VERSION="$(jq -r '.version' < "$REPO_DIR/package.json")" -DEBIAN_VERSION="${DEBIAN_VERSION:-1}" -cd "$REPO_DIR" - - -echo "[+] Loading PGP keys from env vars and filesystem..." -# https://github.com/ArchiveBox/debian-archivebox/settings/secrets/actions -PGP_KEY_ID="${PGP_KEY_ID:-BC2D21B0D84E16C437300B8652423FBED1586F45}" -[[ "${PGP_PUBLIC_KEY:-}" ]] && echo "$PGP_PUBLIC_KEY" > /tmp/archivebox_gpg.key.pub -[[ "${PGP_PRIVATE_KEY:-}" ]] && echo "$PGP_PRIVATE_KEY" > /tmp/archivebox_gpg.key -gpg --import /tmp/archivebox_gpg.key.pub || true -gpg --import --allow-secret-key-import /tmp/archivebox_gpg.key || true -echo "$PGP_KEY_ID:6:" | gpg --import-ownertrust || true - -echo "[*] Signing build and changelog with PGP..." -debsign --re-sign -k "$PGP_KEY_ID" "deb_dist/archivebox_${VERSION}-${DEBIAN_VERSION}_source.changes" - -# make sure you have this in ~/.dput.cf: -# [archivebox-ppa] -# fqdn: ppa.launchpad.net -# method: ftp -# incoming: ~archivebox/ubuntu/archivebox/ -# login: anonymous -# allow_unsigned_uploads: 0 - - -echo "[^] Uploading to launchpad.net" -dput -f archivebox "deb_dist/archivebox_${VERSION}-${DEBIAN_VERSION}_source.changes" diff --git a/brew_dist b/brew_dist deleted file mode 160000 index ec649467..00000000 --- a/brew_dist +++ /dev/null @@ -1 +0,0 @@ -Subproject commit ec64946796d46a31e5a4d6449908b4060edb3079 diff --git a/pyproject.toml b/pyproject.toml index 640e0f79..1d6608bb 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -36,13 +36,8 @@ classifiers = [ "Topic :: Utilities", "Typing :: Typed", ] -# platform = "py3-none-any" -# package = "archivebox" -# pdm install -# pdm update --unconstrained -# Last Bumped: 2024-09-18 dependencies = [ ############# Django / Core Libraries ############# "setuptools>=74.1.0", @@ -91,9 +86,6 @@ dependencies = [ ################################################# ] -# pdm lock --group=':all' -# pdm install -G:all -# pdm update --group=':all' --unconstrained [project.optional-dependencies] sonic = [ # echo "deb [signed-by=/usr/share/keyrings/valeriansaliou_sonic.gpg] https://packagecloud.io/valeriansaliou/sonic/debian/ bookworm main" > /etc/apt/sources.list.d/valeriansaliou_sonic.list @@ -113,7 +105,7 @@ all = [ [tool.uv] dev-dependencies = [ ### BUILD - # "pdm", # usually installed by apt/brew, dont double-install with pip + "uv", "pip>=24.2", "setuptools>=75.1.0", "wheel>=0.44.0", @@ -146,6 +138,7 @@ dev-dependencies = [ [build-system] requires = ["pdm-backend"] build-backend = "pdm.backend" +# https://github.com/astral-sh/uv/issues/3957 [tool.setuptools] packages = ["archivebox"] @@ -173,7 +166,7 @@ explicit_package_bases = true # disallow_incomplete_defs = true # disallow_untyped_defs = true # disallow_untyped_decorators = true -# exclude = "pdm/(pep582/|models/in_process/.+\\.py)" +# exclude = "tests/.*" plugins = ["mypy_django_plugin.main"] [tool.django-stubs] @@ -203,12 +196,6 @@ pythonVersion = "3.10" pythonPlatform = "Linux" -[tool.pdm.scripts] -lint = "./bin/lint.sh" -test = "./bin/test.sh" -# all = {composite = ["lint mypackage/", "test -v tests/"]} - - [project.scripts] archivebox = "archivebox.cli:main"