Skip to content

fix: make the generated Simple Index (see PEP 503) better navigatable#1130

Open
jenstroeger wants to merge 2 commits intomainfrom
fix-makefile-simpleindex
Open

fix: make the generated Simple Index (see PEP 503) better navigatable#1130
jenstroeger wants to merge 2 commits intomainfrom
fix-makefile-simpleindex

Conversation

@jenstroeger
Copy link
Copy Markdown
Owner

No description provided.

@jenstroeger jenstroeger requested a review from behnazh as a code owner April 10, 2026 06:22
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_NAME)-$(PACKAGE_VERSION)-py3-none-any.whl#sha256="$$(python -c "with open('dist/$(PACKAGE_NAME)-$(PACKAGE_VERSION)-py3-none-any.whl', 'rb') as f: import hashlib; print(hashlib.sha256(f.read()).hexdigest());")"'>$(PACKAGE_NAME)-$(PACKAGE_VERSION)-py3-none-any.whl</a> epoch: $(SOURCE_DATE_EPOCH)</li><li><a href='$(PACKAGE_NAME)-$(PACKAGE_VERSION).tar.gz#sha256="$$(python -c "with open('dist/$(PACKAGE_NAME)-$(PACKAGE_VERSION).tar.gz', 'rb') as f: import hashlib; print(hashlib.sha256(f.read()).hexdigest());")"'>$(PACKAGE_NAME)-$(PACKAGE_VERSION).tar.gz</a></li></ul></body></html>" > dist/simple-index/$(PROJECT_NAME)/index.html
cp -f dist/$(PACKAGE_NAME)-$(PACKAGE_VERSION)-py3-none-any.whl dist/simple-index/$(PROJECT_NAME)/
cp -f dist/$(PACKAGE_NAME)-$(PACKAGE_VERSION).tar.gz dist/simple-index/$(PROJECT_NAME)/
python -m zipfile -c dist/$(PACKAGE_NAME)-$(PACKAGE_VERSION)-pep508-simple-index.zip dist/simple-index
Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@behnazh we can zip the entire index for a build artifact: should we attach the zip to the Github Releases as well?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant