Skip to content

Commit a8e59b3

Browse files
committed
chore(ci): use tarred simple index
1 parent 578fd8c commit a8e59b3

2 files changed

Lines changed: 1 addition & 2 deletions

File tree

Makefile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -423,7 +423,6 @@ simple-index: dist/$(PACKAGE_WHEEL_DIST_NAME).whl dist/$(PACKAGE_SDIST_NAME).tar
423423
echo -e "<!-- https://peps.python.org/pep-0503/ -->\n<!DOCTYPE html><html lang='en'><head><meta name='pypi:repository-version' content='1.3'><title>Simple Index: $(PROJECT_NAME)</title></head><body><ul><li><a href='$(PACKAGE_WHEEL_DIST_NAME).whl#sha256="$$(python -c "with open('dist/$(PACKAGE_WHEEL_DIST_NAME).whl', 'rb') as f: import hashlib; print(hashlib.sha256(f.read()).hexdigest());")"'>$(PACKAGE_WHEEL_DIST_NAME).whl</a></li><li><a href='$(PACKAGE_SDIST_NAME).tar.gz#sha256="$$(python -c "with open('dist/$(PACKAGE_SDIST_NAME).tar.gz', 'rb') as f: import hashlib; print(hashlib.sha256(f.read()).hexdigest());")"'>$(PACKAGE_SDIST_NAME).tar.gz</a></li></ul></body></html>" > dist/simple-index/$(PROJECT_NAME)/index.html
424424
cp -f dist/$(PACKAGE_WHEEL_DIST_NAME).whl dist/simple-index/$(PROJECT_NAME)/
425425
cp -f dist/$(PACKAGE_SDIST_NAME).tar.gz dist/simple-index/$(PROJECT_NAME)/
426-
python -m zipfile --create dist/$(PACKAGE_SDIST_NAME)-pep503-simple-index.zip dist/simple-index/
427426
python -m tarfile --create dist/$(PACKAGE_SDIST_NAME)-pep503-simple-index.tar dist/simple-index/
428427

429428
# Build the Docker image. The image name and tag are read from IMAGE_NAME and RELEASE_TAG

docker/Dockerfile.final

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,9 @@ USER macaron:macaron
3737
COPY --chown=macaron:macaron $SIMPLE_INDEX_PATH $HOME/dist/macaron-simple-index.tar
3838
COPY --chown=macaron:macaron $REQUIREMENTS_PATH $HOME/dist/macaron-requirements.txt
3939
RUN : \
40-
&& tar --extract --directory $HOME/ --file $HOME/dist/macaron-simple-index.tar \
4140
&& python3 -m venv $HOME/.venv \
4241
&& . .venv/bin/activate \
42+
&& python3 -m tarfile --extract $HOME/dist/macaron-simple-index.tar $HOME/ \
4343
&& python3 -m pip install --no-compile --no-cache-dir --upgrade pip setuptools \
4444
&& python3 -m pip install --no-compile --no-cache-dir --no-deps --extra-index-url file://$HOME/dist/simple-index/ --requirement $HOME/dist/macaron-requirements.txt \
4545
&& rm -rf $HOME/dist \

0 commit comments

Comments
 (0)