From c2f34ae4a953d630c5fd2a55876033bcd56eb772 Mon Sep 17 00:00:00 2001 From: Jeroen van Zundert Date: Mon, 26 Jun 2023 19:09:17 +0100 Subject: [PATCH] Install maturin with pip --- .github/workflows/benchmark.yml | 13 ++++++++++++- .github/workflows/docs-python.yml | 13 ++++++++++++- .github/workflows/lint-python.yml | 22 +++++++++++++++++++++- .github/workflows/test-python.yml | 8 +++----- py-polars/Makefile | 1 + py-polars/pyproject.toml | 1 - 6 files changed, 49 insertions(+), 9 deletions(-) diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml index e9078aafe3757..64ad2894b06de 100644 --- a/.github/workflows/benchmark.yml +++ b/.github/workflows/benchmark.yml @@ -41,9 +41,20 @@ jobs: python -m venv .venv echo "$GITHUB_WORKSPACE/py-polars/.venv/bin" >> $GITHUB_PATH + - name: Set up Rust + run: rustup show + + - name: Cache Rust + uses: Swatinem/rust-cache@v2 + with: + workspaces: py-polars + save-if: ${{ github.ref_name == 'main' }} + - name: Install Python dependencies working-directory: py-polars - run: maturin develop --extras dev-test,all + run: | + pip install maturin=1.0.1 + maturin develop --extras dev-test,all - name: Load benchmark data from cache id: cache-data diff --git a/.github/workflows/docs-python.yml b/.github/workflows/docs-python.yml index 3dcfe83be67a6..d5853ebc7500f 100644 --- a/.github/workflows/docs-python.yml +++ b/.github/workflows/docs-python.yml @@ -32,9 +32,20 @@ jobs: cache: pip cache-dependency-path: py-polars/pyproject.toml + - name: Set up Rust + run: rustup show + + - name: Cache Rust + uses: Swatinem/rust-cache@v2 + with: + workspaces: py-polars + save-if: ${{ github.ref_name == 'main' }} + - name: Install Python dependencies working-directory: py-polars - run: maturin develop --extras dev-docs + run: | + pip install maturin=1.0.1 + maturin develop --extras dev-docs - name: Build Python documentation working-directory: py-polars/docs diff --git a/.github/workflows/lint-python.yml b/.github/workflows/lint-python.yml index c45043929574d..53f9de79bfcc0 100644 --- a/.github/workflows/lint-python.yml +++ b/.github/workflows/lint-python.yml @@ -24,9 +24,19 @@ jobs: uses: actions/setup-python@v4 with: python-version: '3.11' + - name: Set up Rust + run: rustup show + + - name: Cache Rust + uses: Swatinem/rust-cache@v2 + with: + workspaces: py-polars + save-if: ${{ github.ref_name == 'main' }} - name: Install Python dependencies - run: maturin develop --extras dev-lint + run: | + pip install maturin==1.0.1 + maturin develop --extras dev-lint - name: Lint Python run: | @@ -52,8 +62,18 @@ jobs: with: python-version: ${{ matrix.python-version }} + - name: Set up Rust + run: rustup show + + - name: Cache Rust + uses: Swatinem/rust-cache@v2 + with: + workspaces: py-polars + save-if: ${{ github.ref_name == 'main' }} + - name: Install dependencies run: | + pip install maturin=1.0.1 maturin develop --extras dev-test,all,dev-lint # Allow untyped calls for older Python versions diff --git a/.github/workflows/test-python.yml b/.github/workflows/test-python.yml index e0332bacc20fa..45764cb535d2f 100644 --- a/.github/workflows/test-python.yml +++ b/.github/workflows/test-python.yml @@ -58,6 +58,7 @@ jobs: - name: Install Polars run: | source activate + pip install maturin==1.0.1 maturin develop --extras dev-test,all - name: Run tests and report coverage @@ -102,9 +103,6 @@ jobs: with: python-version: ${{ matrix.python-version }} - - name: Install Python dependencies - run: maturin develop --extras dev-test,all - - name: Set up Rust run: rustup show @@ -117,8 +115,8 @@ jobs: - name: Install Polars shell: bash run: | - maturin build - pip install target/wheels/polars-*.whl + pip install maturin==1.0.1 + maturin develop --extras dev-test,all - name: Run tests if: github.ref_name != 'main' diff --git a/py-polars/Makefile b/py-polars/Makefile index ce5b7e74d94b5..3ac0b459b26fd 100644 --- a/py-polars/Makefile +++ b/py-polars/Makefile @@ -17,6 +17,7 @@ endif .PHONY: requirements requirements: .venv ## Install/refresh all project requirements $(VENV_BIN)/python -m pip install --upgrade pip + $(VENV_BIN)/python -m pip install maturin==1.0.1 maturin develop --extras all,dev-test,dev-lint,dev-docs .PHONY: build diff --git a/py-polars/pyproject.toml b/py-polars/pyproject.toml index b41308c7395f3..9838008e7caed 100644 --- a/py-polars/pyproject.toml +++ b/py-polars/pyproject.toml @@ -66,7 +66,6 @@ dev-hypothesis = [ ] dev-test = [ "polars[dev-hypothesis]", - "maturin==1.0.1", "pytest==7.3.0", "pytest-cov==4.1.0", "pytest-xdist==3.3.1",