File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -197,6 +197,18 @@ dist/$(PACKAGE_NAME)-$(PACKAGE_VERSION)-docs-md.zip: docs-md
197197dist/$(PACKAGE_NAME ) -$(PACKAGE_VERSION ) -build-epoch.txt :
198198 echo $(SOURCE_DATE_EPOCH ) > dist/$(PACKAGE_NAME ) -$(PACKAGE_VERSION ) -build-epoch.txt
199199
200+ # Build a PEP-503 compatible Simple Repository compatible directory inside of dist/.
201+ # For details on the layout of that directory, see: https://peps.python.org/pep-0503/
202+ # This directory can then be used to install (hashed) artifacts from using `pip` and
203+ # its `--extra-index-url` argument: https://pip.pypa.io/en/stable/cli/pip_install/#cmdoption-extra-index-url
204+ .PHONY : simple-index
205+ simple-index : dist/$(PACKAGE_NAME ) -$(PACKAGE_VERSION ) -py3-none-any.whl dist/$(PACKAGE_NAME ) -$(PACKAGE_VERSION ) .tar.gz
206+ mkdir -p dist/simple-index/$(PACKAGE_NAME )
207+ echo -e " <!-- https://peps.python.org/pep-0503/ -->\n<!DOCTYPE html><html><head><meta name='pypi:repository-version' content='1.3'></head><body><a href='/$( PACKAGE_NAME) /'>$( PACKAGE_NAME) </a></body></html>" > dist/simple-index/index.html
208+ echo -e " <!-- https://peps.python.org/pep-0503/ -->\n<!DOCTYPE html><html><head><meta name='pypi:repository-version' content='1.3'></head><body><a href='$( PACKAGE_NAME) -$( PACKAGE_VERSION) -py3-none-any.whl'>$( PACKAGE_NAME) -$( PACKAGE_VERSION) -py3-none-any.whl</a><a href='$( PACKAGE_NAME) -$( PACKAGE_VERSION) .tar.gz'>$( PACKAGE_NAME) -$( PACKAGE_VERSION) .tar.gz</a></body></html>" > dist/simple-index/$(PACKAGE_NAME ) /index.html
209+ cp -f dist/$(PACKAGE_NAME ) -$(PACKAGE_VERSION ) -py3-none-any.whl dist/simple-index/$(PACKAGE_NAME ) /
210+ cp -f dist/$(PACKAGE_NAME ) -$(PACKAGE_VERSION ) .tar.gz dist/simple-index/$(PACKAGE_NAME ) /
211+
200212# Build the HTML and Markdown documentation from the package's source.
201213DOCS_SOURCE := $(shell git ls-files docs/source)
202214.PHONY : docs docs-html docs-md
You can’t perform that action at this time.
0 commit comments