python/stevedore: update to 5.4.0
[oi-userland.git] / components / python / py3c / Makefile
blobba1a46b71d5bf9e7b78959e11167f11bd8c3f2fb
2 # This file and its contents are supplied under the terms of the
3 # Common Development and Distribution License ("CDDL"), version 1.0.
4 # You may only use this file in accordance with the terms of version
5 # 1.0 of the CDDL.
7 # A full copy of the text of the CDDL should have accompanied this
8 # source. A copy of the CDDL is also available via the Internet at
9 # http://www.illumos.org/license/CDDL.
13 # This file was automatically generated using the following command:
14 # $WS_TOOLS/python-integrate-project py3c
17 BUILD_STYLE = setup.py
19 include ../../../make-rules/shared-macros.mk
21 COMPONENT_NAME = py3c
22 HUMAN_VERSION = 1.4
23 COMPONENT_SUMMARY = py3c - Python compatibility headers
24 COMPONENT_PROJECT_URL = http://py3c.readthedocs.io/
25 COMPONENT_ARCHIVE_HASH = \
26 sha256:abc745079ef906148817f4472c3fb4bc41d62a9ea51a746b53e09819494ac006
27 COMPONENT_LICENSE = MIT
29 # https://github.com/encukou/py3c/issues/56
30 COMPONENT_ARCHIVE_URL = \
31 https://github.com/encukou/py3c/archive/refs/tags/v$(HUMAN_VERSION).tar.gz
33 include $(WS_MAKE_RULES)/common.mk
35 # see $(SOURCE_DIR)/Makefile
36 # and https://github.com/encukou/py3c/issues/24#issuecomment-1447981119
37 COMPONENT_POST_INSTALL_ACTION += \
38 $(MKDIR) $(PROTO_DIR)$(PKG_CONFIG_PATH.$(BITS)) ; \
39 $(GSED) -e 's:@includedir@:$(shell $(PYTHON) -c "from sysconfig import get_paths; print(get_paths()[\"include\"])"):' \
40 -e 's|^Cflags:.*$$|& -I$${includedir}/py3c|' \
41 $(@D)/py3c.pc.in \
42 > $(PROTO_DIR)$(PKG_CONFIG_PATH.$(BITS))/py3c.pc-$(PYTHON_VERSION) ;
44 # Normalize special PYV case
45 COMPONENT_TEST_TRANSFORMS += "-e 's/\(cpython-\)$(shell echo $(PYTHON_VERSION) | tr -d .)/\1\$$(PYV)/'"
47 # Make sure include files are included in right packages
48 GENERATE_EXTRA_CMD += | \
49 $(GSED) -e 's|^.*usr/include/python\(3.[0-9]*\)[^0-9]|$$(PYTHON_\1_ONLY)&|'
50 # Replace Python version in pkgconfig file names
51 GENERATE_EXTRA_CMD += | \
52 $(GSED) -e 's/\(py3c\.pc-\)3\.[0-9]*$$/\1$$(PYVER)/' | uniq
54 # Auto-generated dependencies
55 PYTHON_REQUIRED_PACKAGES += runtime/python