Andreas Wacknitz
2024-04-05 ac4c8f5b8ab57563cc350482b75a32a55871d58c
make-rules/setup.py-defaults.mk
@@ -16,26 +16,9 @@
#
# Component defaults
#
# To support Post-releases (see PEP 440) we need to convert the 'post' part of
# the (human) version number to some numbers.  According to PEP 440 we need to
# make sure that Post-release always immediately follows the corresponding
# release and is ahead of any subsequent release.  We do so by converting word
# 'post' to sequence of zeros.
#
# Unfortunately it is not possible to create solution that would work in all
# cases, so we arbitrarily chose to use 'three dotted zeros'.
#
# Example when the 'three dotted zeros' solution won't work properly:
#
#   HUMAN_VERSION      COMPONENT_VERSION
#   1.1         1.1
#   1.2         1.2
#   1.2.post1      1.2.0.0.0.1
#   1.2.post2      1.2.0.0.0.2
#   1.2.0.0.0.0.1      1.2.0.0.0.0.1
#   1.2.0.0.0.1      1.2.0.0.0.1
#
COMPONENT_VERSION ?=      $(shell echo $(HUMAN_VERSION) | $(GSED) -e 's/post/0.0.0./')
# Support for Post-releases (see PEP 440).
COMPONENT_VERSION ?=      $(shell echo $(HUMAN_VERSION) | $(GSED) -e 's/\.post.*//')
COMPONENT_CLASSIFICATION ?=   Development/Python
COMPONENT_SRC ?=      $(COMPONENT_NAME)-$(HUMAN_VERSION)
COMPONENT_ARCHIVE ?=      $(COMPONENT_SRC).tar.gz
@@ -43,7 +26,8 @@
# PyPA Core metadata specifications and PEP 503.
COMPONENT_FMRI ?=      library/python/$(shell echo $(COMPONENT_NAME) | tr [A-Z] [a-z] | $(GSED) -e 's/[._-]\{1,\}/-/g')
COMPONENT_PROJECT_URL ?=   https://pypi.org/project/$(COMPONENT_NAME)/
COMPONENT_ARCHIVE_URL ?=   $(call pypi_url)
# https://warehouse.pypa.io/api-reference/integration-guide.html#predictable-urls
COMPONENT_ARCHIVE_URL ?=   https://files.pythonhosted.org/packages/source/$(shell echo $(COMPONENT_NAME) | cut -c 1)/$(COMPONENT_NAME)/$(COMPONENT_ARCHIVE)
COMPONENT_PYPI ?=      $(COMPONENT_NAME)
# Enable ASLR by default.  Component could disable ASLR by setting
# COMPONENT_ASLR to 'no'.