Skip to content

Commit

Permalink
Install poetry the recommended way (#113)
Browse files Browse the repository at this point in the history
* Install poetry the recommended way

* Install poetry the recommended way

---------

Co-authored-by: Guido Kosloff Gancedo <[email protected]>
  • Loading branch information
guidok91 and Guido Kosloff Gancedo authored Jan 24, 2025
1 parent e40bd28 commit 15cc225
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
4 changes: 3 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
FROM python:3.13-slim

ENV PATH="/root/.local/bin:$PATH"

RUN apt-get update && \
apt-get install -y default-jre-headless make git && \
apt-get install -y default-jre-headless make git curl && \
rm -rf /var/lib/apt/lists/*

COPY . .
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
POETRY_VERSION=1.8.4
DELTA_VERSION=$(shell poetry run python -c "from importlib.metadata import version; print(version('delta-spark'))")

.PHONY: help
Expand All @@ -7,7 +6,7 @@ help:

.PHONY: setup
setup: # Set up virtual env with the app and its dependencies.
pip install --upgrade pip setuptools wheel poetry==$(POETRY_VERSION)
curl -sSL https://install.python-poetry.org | python3 -
poetry config virtualenvs.in-project true --local
poetry install

Expand All @@ -21,6 +20,7 @@ docker-run: # Spin up a local container in interactive mode.

.PHONY: package
package: # Package the app and its dependencies to be used in spark-submit.
rm -rf deps
mkdir deps
poetry export -f requirements.txt --output deps/requirements.txt
poetry run python -m venv deps/.venv
Expand Down
3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ chispa = "~0.10.1"
black = "~24.10.0"
pre-commit = "~4.1.0"

[tool.poetry.requires-plugins]
poetry-plugin-export = ">=1.8"

[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
Expand Down

0 comments on commit 15cc225

Please sign in to comment.