File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed
Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -187,6 +187,18 @@ dist/$(PACKAGE_NAME)-$(PACKAGE_VERSION)-docs-md.zip: docs-md
187187dist/$(PACKAGE_NAME ) -$(PACKAGE_VERSION ) -build-epoch.txt :
188188 echo $(SOURCE_DATE_EPOCH ) > dist/$(PACKAGE_NAME ) -$(PACKAGE_VERSION ) -build-epoch.txt
189189
190+ # Build a PEP-503 compatible Simple Repository compatible directory inside of dist/.
191+ # For details on the layout of that directory, see: https://peps.python.org/pep-0503/
192+ # This directory can then be used to install (hashed) artifacts from using `pip` and
193+ # its `--extra-index-url` argument: https://pip.pypa.io/en/stable/cli/pip_install/#cmdoption-extra-index-url
194+ .PHONY : simple-index
195+ simple-index : dist/$(PACKAGE_NAME ) -$(PACKAGE_VERSION ) -py3-none-any.whl dist/$(PACKAGE_NAME ) -$(PACKAGE_VERSION ) .tar.gz
196+ mkdir -p dist/simple-index/$(PACKAGE_NAME )
197+ 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
198+ 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
199+ cp -f dist/$(PACKAGE_NAME ) -$(PACKAGE_VERSION ) -py3-none-any.whl dist/simple-index/$(PACKAGE_NAME ) /
200+ cp -f dist/$(PACKAGE_NAME ) -$(PACKAGE_VERSION ) .tar.gz dist/simple-index/$(PACKAGE_NAME ) /
201+
190202# Build the HTML and Markdown documentation from the package's source.
191203DOCS_SOURCE := $(shell git ls-files docs/source)
192204.PHONY : docs docs-html docs-md
You can’t perform that action at this time.
0 commit comments