From f218134e6c3792d05c0212deff8c737ed5bb0e71 Mon Sep 17 00:00:00 2001 From: Tpt Date: Mon, 1 Aug 2022 09:05:17 +0200 Subject: [PATCH] Fixes ReadTheDocs build Adds a shared requirements.txt file for the dev dependencies --- .devcontainer/Dockerfile | 6 +----- .github/workflows/artifacts.yml | 6 ++++-- .github/workflows/release.yml | 6 ++++-- .github/workflows/tests.yml | 2 +- .readthedocs.yaml | 1 + python/requirements.dev.txt | 4 ++++ 6 files changed, 15 insertions(+), 10 deletions(-) create mode 100644 python/requirements.dev.txt diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index 4f73f4b2..a7a58796 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -15,11 +15,7 @@ RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \ ENV VIRTUAL_ENV=/opt/venv RUN python -m venv $VIRTUAL_ENV ENV PATH="$VIRTUAL_ENV/bin:$PATH" -RUN pip install --no-cache-dir \ - maturin \ - sphinx \ - sphinx-autobuild \ - furo +RUN pip install --no-cache-dir -r python/requirements.dev.txt # Change owner to the devcontainer user RUN chown -R 1000:1000 $VIRTUAL_ENV diff --git a/.github/workflows/artifacts.yml b/.github/workflows/artifacts.yml index 1d1952c8..fe7b6f04 100644 --- a/.github/workflows/artifacts.yml +++ b/.github/workflows/artifacts.yml @@ -16,8 +16,10 @@ jobs: - uses: actions/setup-python@v2 with: python-version: 3.8 - - run: python -m venv python/venv - - run: source python/venv/bin/activate && pip install --upgrade maturin sphinx furo + - run: python -m venv venv + working-directory: ./python + - run: source venv/bin/activate && pip install --upgrade -r requirements.dev.txt + working-directory: ./python - run: source venv/bin/activate && maturin develop working-directory: ./python - run: source ../venv/bin/activate && sphinx-build -M doctest . build diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d0a7a3a7..4b111df2 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -183,8 +183,10 @@ jobs: - uses: actions/setup-python@v2 with: python-version: 3.8 - - run: python -m venv python/venv - - run: source python/venv/bin/activate && pip install --upgrade maturin sphinx furo + - run: python -m venv venv + working-directory: ./python + - run: source venv/bin/activate && pip install --upgrade -r requirements.dev.txt + working-directory: ./python - run: source venv/bin/activate && maturin develop working-directory: ./python - run: source ../venv/bin/activate && sphinx-build -M doctest . build diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 657b5b61..3ab86245 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -89,7 +89,7 @@ jobs: - uses: actions/setup-python@v2 with: python-version: "3.10" - - run: pip install --upgrade maturin sphinx furo + - run: pip install --upgrade -r python/requirements.dev.txt - run: maturin sdist -m python/Cargo.toml - run: pip install target/wheels/*.tar.gz - run: python -m unittest diff --git a/.readthedocs.yaml b/.readthedocs.yaml index faeaca6c..726725eb 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -13,6 +13,7 @@ build: python: install: + - requirements: python/requirements.dev.txt - method: pip path: python diff --git a/python/requirements.dev.txt b/python/requirements.dev.txt new file mode 100644 index 00000000..a22a21c0 --- /dev/null +++ b/python/requirements.dev.txt @@ -0,0 +1,4 @@ +furo +maturin +sphinx +sphinx-autobuild