Marcel Telka
2022-11-06 85992347ea07379134ed1e3e1f842415f248cdcc
make-rules: normalize Python package names

2 files modified
6 ■■■■■ changed files
make-rules/pyproject.mk 2 ●●● patch | view | raw | blame | history
make-rules/setup.py-defaults.mk 4 ●●● patch | view | raw | blame | history
make-rules/pyproject.mk
@@ -119,5 +119,5 @@
ifneq ($(strip $(COMPONENT_NAME)),pyproject_installer)
# Once we obsolete Python 3.7 this should be changed to
# PYTHON_USERLAND_REQUIRED_PACKAGES and '-39' suffix should be removed
USERLAND_REQUIRED_PACKAGES += library/python/pyproject_installer-39
USERLAND_REQUIRED_PACKAGES += library/python/pyproject-installer-39
endif
make-rules/setup.py-defaults.mk
@@ -17,7 +17,9 @@
COMPONENT_CLASSIFICATION ?=    Development/Python
COMPONENT_SRC ?=        $(COMPONENT_NAME)-$(COMPONENT_VERSION)
COMPONENT_ARCHIVE ?=        $(COMPONENT_SRC).tar.gz
COMPONENT_FMRI ?=        library/python/$(shell echo $(COMPONENT_NAME) | tr [A-Z] [a-z])
# To make the package name comparable we normalize it here by following the
# 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)
COMPONENT_PYPI ?=        $(COMPONENT_NAME)