basic PEX tooling to build independent binaries

This commit is contained in:
Nick Pegg 2024-08-05 19:29:40 -07:00
parent c08c5609ca
commit c93f1997fc
3 changed files with 23 additions and 8 deletions

View file

@ -33,11 +33,11 @@ test-fast:
test-watch:
find . -name '*py' -or -name '*html' -or -name poetry.lock | entr -r -c make test-fast
run:
podman-compose up
build:
poetry build
docker:
podman build -t nickpegg/photojawn . --build-arg GIT_COMMIT=$(shell git rev-parse --short HEAD)
clean:
podman-compose down --rmi all
pex:
poetry run pex --project . -o dist/photojawn.pex --scie eager -c photojawn

18
poetry.lock generated
View file

@ -290,6 +290,20 @@ files = [
{file = "packaging-24.1.tar.gz", hash = "sha256:026ed72c8ed3fcce5bf8950572258698927fd1dbda10a5e981cdf0ac37f4f002"},
]
[[package]]
name = "pex"
version = "2.14.1"
description = "The PEX packaging toolchain."
optional = false
python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,<3.14,>=2.7"
files = [
{file = "pex-2.14.1-py2.py3-none-any.whl", hash = "sha256:43210f64e5461d91ad6c99d80724e83f5010bfa82a1664bf44ffdb14e2defb58"},
{file = "pex-2.14.1.tar.gz", hash = "sha256:e71296873101732deffa5341d7dc9a9d8ed9e58413acc07579f7b39998c273a2"},
]
[package.extras]
subprocess = ["subprocess32 (>=3.2.7)"]
[[package]]
name = "pillow"
version = "10.4.0"
@ -590,5 +604,5 @@ files = [
[metadata]
lock-version = "2.0"
python-versions = "^3.12"
content-hash = "3f22f947559bd9d54a838d51953828baa88e2485fb90c33931359511805cacc9"
python-versions = "^3.12,<3.14"
content-hash = "9ec27256e1d8988f06634a217388d357a211f6120d6ade104fdd87182b18279c"

View file

@ -12,7 +12,7 @@ photojawn = 'photojawn.cli:main'
[tool.poetry.dependencies]
# TODO: make sure we support >=3.10 via tests
python = "^3.12"
python = "^3.12,<3.14"
jinja2 = "^3.1.4"
pillow = "^10.4.0"
rich = "^13.7.1"
@ -26,6 +26,7 @@ mypy = "*"
pytest-testmon = "*"
types-pyyaml = "^6.0.12.20240724"
types-markdown = "^3.6.0.20240316"
pex = "^2.14.1"
[tool.mypy]