diff --git a/.dockerignore b/.dockerignore index 7e339e5a..2cd1cfe0 100644 --- a/.dockerignore +++ b/.dockerignore @@ -18,7 +18,6 @@ node_modules/ build/ dist/ deb_dist/ -pip_dist/ assets/ data/ diff --git a/.github/workflows/pip.yml b/.github/workflows/pip.yml deleted file mode 100644 index bfd16bcc..00000000 --- a/.github/workflows/pip.yml +++ /dev/null @@ -1,71 +0,0 @@ -name: Build Pip package - -on: - workflow_dispatch: - push: - - -jobs: - build: - runs-on: ubuntu-22.04 - - permissions: - id-token: write - - steps: - - uses: actions/checkout@v4 - with: - submodules: true - fetch-depth: 1 - - - name: Set up Python - uses: actions/setup-python@v4 - with: - python-version: 3.11 - architecture: x64 - - - uses: pdm-project/setup-pdm@v3 - - - name: Install dependencies - run: pdm install --fail-fast --no-lock --group :all --no-self - - - name: Build package - run: | - rm ./dist/archivebox-*.whl - pdm build - - - name: Install from build - run: pip install ./dist/archivebox-*.whl - - - name: Add some links to test - run: | - mkdir data && cd data - archivebox init - archivebox add 'https://example.com' - archivebox version - archivebox status - - - name: Publish package distributions to PyPI - run: pdm publish --no-build - - # - name: Push build to PyPI - # run: | - # cd pip_dist/ - # python3 -m twine upload --repository testpypi pip_dist/*.{whl,tar.gz} - # python3 -m twine upload --repository pypi pip_dist/*.{whl,tar.gz} - - # - name: Commit built package - # run: | - # cd pip_dist/ - # git config --local user.email "action@github.com" - # git config --local user.name "GitHub Action" - # git commit -m "Pip package autobuild" -a - - # - name: Push build to Github - # uses: ad-m/github-push-action@master - # with: - # github_token: ${{ secrets.GITHUB_TOKEN }} - # repository: ArchiveBox/pip-archivebox - # branch: ${{ github.ref }} - # directory: pip_dist - diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 0e6269aa..b6d4d806 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -55,7 +55,6 @@ jobs: - name: Install pip dependencies run: | python -m pip install --upgrade pip setuptools wheel pytest bottle build - ./bin/build_pip.sh pdm install - name: Get npm cache dir @@ -93,7 +92,7 @@ jobs: # TODO: remove this exception for windows once we get tests passing on that platform if: ${{ !contains(matrix.os, 'windows') }} run: | - python -m pytest -s --basetemp=tests/out --ignore=archivebox/vendor --ignore=deb_dist --ignore=pip_dist + python -m pytest -s --basetemp=tests/out --ignore=archivebox/vendor --ignore=deb_dist docker_tests: runs-on: ubuntu-latest diff --git a/.gitignore b/.gitignore index d3977726..4f88ab61 100644 --- a/.gitignore +++ b/.gitignore @@ -33,4 +33,3 @@ output/ # kotovalexarian /deb_dist/ /docker/ -/pip_dist/ diff --git a/README.md b/README.md index a7d48227..05a94362 100644 --- a/README.md +++ b/README.md @@ -1023,7 +1023,6 @@ Extractors take the URL of a page to archive, write their output to the filesyst ./bin/build.sh # or individually: -./bin/build_pip.sh ./bin/build_deb.sh ./bin/build_docker.sh ``` @@ -1039,7 +1038,6 @@ Extractors take the URL of a page to archive, write their output to the filesyst ./bin/release.sh # or individually: -./bin/release_pip.sh ./bin/release_deb.sh ./bin/release_docker.sh ``` diff --git a/bin/build.sh b/bin/build.sh index af33eb52..7fba4651 100755 --- a/bin/build.sh +++ b/bin/build.sh @@ -17,7 +17,6 @@ cd "$REPO_DIR" # pipenv install --dev # the order matters -./bin/build_pip.sh ./bin/build_deb.sh ./bin/build_docker.sh diff --git a/bin/build_pip.sh b/bin/build_pip.sh deleted file mode 100755 index c3cbd51b..00000000 --- a/bin/build_pip.sh +++ /dev/null @@ -1,39 +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 )" - -if [[ -f "$REPO_DIR/.venv/bin/activate" ]]; then - source "$REPO_DIR/.venv/bin/activate" -else - echo "[!] Warning: No virtualenv presesnt in $REPO_DIR/.venv, creating one now..." - python3 -m venv --system-site-packages --symlinks $REPO_DIR/.venv -fi -cd "$REPO_DIR" - -echo "[*] Cleaning up build dirs" -cd "$REPO_DIR" -rm -Rf build dist - -echo "[+] Building sdist, bdist_wheel, and egg_info" -rm -f archivebox/package.json -cp package.json archivebox/package.json - -pdm self update -pdm install -pdm build -pdm export --without-hashes -o ./pip_dist/requirements.txt - -cp dist/* ./pip_dist/ - -echo -echo "[√] Finished. Don't forget to commit the new sdist and wheel files in ./pip_dist/" \ No newline at end of file diff --git a/bin/release.sh b/bin/release.sh index ca18a96d..7798a112 100755 --- a/bin/release.sh +++ b/bin/release.sh @@ -20,13 +20,11 @@ cd "$REPO_DIR" # Run all the build scripts ./bin/build_git.sh -./bin/build_pip.sh ./bin/build_deb.sh ./bin/build_docker.sh # Push relase to public repositories ./bin/release_git.sh -./bin/release_pip.sh ./bin/release_deb.sh ./bin/release_docker.sh diff --git a/bin/release_pip.sh b/bin/release_pip.sh deleted file mode 100755 index 1b1fbf94..00000000 --- a/bin/release_pip.sh +++ /dev/null @@ -1,21 +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 )" -cd "$REPO_DIR" -source "$REPO_DIR/.venv/bin/activate" - -echo "[^] Publishing to Test PyPI..." -pdm publish --repository testpypi - -echo "[^] Publishing to PyPI..." -pdm publish --no-build \ No newline at end of file diff --git a/bin/test.sh b/bin/test.sh index cce46a50..51b17478 100755 --- a/bin/test.sh +++ b/bin/test.sh @@ -14,4 +14,4 @@ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && cd .. && pwd )" source "$DIR/.venv/bin/activate" -pytest -s --basetemp=tests/out --ignore=archivebox/vendor --ignore=deb_dist --ignore=pip_dist +pytest -s --basetemp=tests/out --ignore=archivebox/vendor --ignore=deb_dist