Skip to content

Commit

Permalink
Install maturin with pip
Browse files Browse the repository at this point in the history
  • Loading branch information
zundertj committed Jun 26, 2023
1 parent 50f1593 commit c2f34ae
Show file tree
Hide file tree
Showing 6 changed files with 49 additions and 9 deletions.
13 changes: 12 additions & 1 deletion .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
13 changes: 12 additions & 1 deletion .github/workflows/docs-python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
22 changes: 21 additions & 1 deletion .github/workflows/lint-python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand All @@ -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
Expand Down
8 changes: 3 additions & 5 deletions .github/workflows/test-python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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

Expand All @@ -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'
Expand Down
1 change: 1 addition & 0 deletions py-polars/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion py-polars/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit c2f34ae

Please sign in to comment.