Skip to content

Commit

Permalink
chore: lazy pyspark install
Browse files Browse the repository at this point in the history
  • Loading branch information
ion-elgreco committed Dec 15, 2024
1 parent 78393af commit f086412
Show file tree
Hide file tree
Showing 4 changed files with 167 additions and 164 deletions.
7 changes: 3 additions & 4 deletions .github/workflows/python_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@ jobs:

- name: Build and install deltalake
run: |
make setup
# Install minimum PyArrow version
uv pip install -e .[pandas,devel] pyarrow==16.0.0
uv sync --extra devel --extra pandas
uv pip install pyarrow==16.0.0
env:
RUSTFLAGS: "-C debuginfo=line-tables-only"

Expand Down Expand Up @@ -130,8 +130,7 @@ jobs:

- name: Build and install deltalake
run: |
make setup
uvx run maturin develop
uv sync
- name: Run deltalake
run: |
Expand Down
5 changes: 3 additions & 2 deletions python/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ DAT_VERSION := 0.0.2
.PHONY: setup
setup: ## Setup the requirements
$(info --- Setup dependencies ---)
uv sync --all-extras
uv sync --extra devel --extra pandas

.PHONY: setup-dat
setup-dat: ## Download DAT test files
Expand Down Expand Up @@ -39,7 +39,8 @@ install: build ## Install Python binding of delta-rs
uv pip install $(TARGET_WHEEL)[devel,pandas]

.PHONY: develop-pyspark
develop-pyspark: setup
develop-pyspark:
uv sync --all-extras
$(info --- Develop with Python binding ---)
uvx --from 'maturin[zig]' maturin develop --extras=devel,pandas,pyspark $(MATURIN_EXTRA_ARGS)

Expand Down
2 changes: 1 addition & 1 deletion python/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ devel = [
pyspark = [
"pyspark",
"delta-spark",
"numpy==1.22.2", # pyspark is not compatible with latest numpy
"numpy==1.26.4", # pyspark is not compatible with latest numpy
]

[project.urls]
Expand Down
Loading

0 comments on commit f086412

Please sign in to comment.