diff --git a/Makefile b/Makefile index 061534ff..581903e6 100644 --- a/Makefile +++ b/Makefile @@ -187,6 +187,19 @@ dist/$(PACKAGE_NAME)-$(PACKAGE_VERSION)-docs-md.zip: docs-md dist/$(PACKAGE_NAME)-$(PACKAGE_VERSION)-build-epoch.txt: echo $(SOURCE_DATE_EPOCH) > dist/$(PACKAGE_NAME)-$(PACKAGE_VERSION)-build-epoch.txt +# Build a PEP-503 compatible Simple Repository directory inside of dist/. For details on +# the layout of that directory and the normalized project name, see: https://peps.python.org/pep-0503/ +# The directory can then be used to install (hashed) artifacts by using `pip` and +# its `--extra-index-url` argument: https://pip.pypa.io/en/stable/cli/pip_install/#cmdoption-extra-index-url +PROJECT_NAME := $(shell python -c $$'import re; print(re.sub(r"[-_.]+", "-", "$(PACKAGE_NAME)").lower());') +.PHONY: simple-index +simple-index: dist/$(PACKAGE_NAME)-$(PACKAGE_VERSION)-py3-none-any.whl dist/$(PACKAGE_NAME)-$(PACKAGE_VERSION).tar.gz + mkdir -p dist/simple-index/$(PROJECT_NAME) + echo -e "\n