Skip to content

Commit b0855e0

Browse files
committed
[skip ci] update layer scripts
1 parent 65acdaa commit b0855e0

File tree

6 files changed

+23
-17
lines changed

6 files changed

+23
-17
lines changed

building/build-lambda-layers.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/usr/bin/env bash
22
set -ex
33

4-
VERSION=$(poetry version --short)
4+
VERSION=$(uv version --short)
55
DIR_NAME=$(dirname "$PWD")
66

77
PYTHON_VERSION=${1:-ALL}

building/build-wheel.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ set -ex
33

44
pushd ..
55
rm -rf dist/*.whl
6-
poetry build -f wheel
6+
uv build --wheel

building/lambda/Dockerfile

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,17 @@ RUN ln -s /usr/bin/gcc10-mpn /usr/bin/mpn
3232
RUN ln -s /usr/bin/gcc10-ld /usr/bin/ld
3333

3434
FROM ${python_version}
35-
COPY pyproject.toml poetry.lock ./
35+
COPY pyproject.toml uv.lock ./
3636

3737
RUN pip3 install --upgrade pip wheel setuptools>=64 setuptools_scm>=8
3838
RUN pip3 install --upgrade urllib3==1.26.16 # temporary to avoid https://github.com/urllib3/urllib3/issues/2168 (TODO remove when the AL2 image updates to support OpenSSL 1.1.1+)
39-
RUN pip3 install --upgrade six cython cmake hypothesis poetry
40-
ENV PIP_NO_BINARY="numpy,pandas"
41-
RUN poetry config virtualenvs.create false --local && poetry install --no-root --only main
42-
43-
RUN rm -f pyproject.toml poetry.lock
39+
RUN pip3 install --upgrade six cython cmake==3.31.6 hypothesis uv
40+
# ENV PIP_NO_BINARY="numpy,pandas"
41+
# RUN poetry config virtualenvs.create false --local && poetry install --no-root --only main
42+
RUN uv sync --frozen --no-dev --no-install-project \
43+
--no-binary-package numpy \
44+
--no-binary-package pandas
45+
46+
RUN rm -f pyproject.toml uv.lock
4447

4548
ENTRYPOINT ["/bin/sh"]

building/lambda/Dockerfile.al2023

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,16 @@ RUN dnf install -y \
2121
WORKDIR /root
2222

2323
FROM ${python_version}
24-
COPY pyproject.toml poetry.lock ./
24+
COPY pyproject.toml uv.lock ./
2525

2626
RUN pip3 install --upgrade pip wheel setuptools>=64 setuptools_scm>=8
2727
RUN pip3 install --upgrade six cython cmake hypothesis poetry
28-
ENV PIP_NO_BINARY="numpy,pandas"
29-
RUN poetry config virtualenvs.create false --local && poetry install --no-root --only main
28+
# ENV PIP_NO_BINARY="numpy,pandas"
29+
# RUN poetry config virtualenvs.create false --local && poetry install --no-root --only main
30+
RUN uv sync --frozen --no-dev --no-install-project \
31+
--no-binary-package numpy \
32+
--no-binary-package pandas
3033

31-
RUN rm -f pyproject.toml poetry.lock
34+
RUN rm -f pyproject.toml uv.lock
3235

3336
ENTRYPOINT ["/bin/sh"]

building/lambda/build-docker-images.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
set -ex
33

44
cp ../../pyproject.toml .
5-
cp ../../poetry.lock .
5+
cp ../../uv.lock .
66

77
export DOCKER_BUILDKIT=1
88

@@ -60,4 +60,4 @@ then
6060
.
6161
fi
6262

63-
rm -rf pyproject.toml poetry.lock
63+
rm -rf pyproject.toml uv.lock

building/publish.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22
set -ex
33

44
pushd ..
5-
rm -fr dist
6-
poetry publish --build
7-
rm -fr dist
5+
rm -rf dist/*.whl
6+
uv build --wheel
7+
uv publish dist/*.whl

0 commit comments

Comments
 (0)