Annotation of pkgsrc/lang/python/wheel.mk, revision 1.12

1.12    ! thor        1: # $NetBSD: wheel.mk,v 1.11 2023/10/29 22:50:35 wiz Exp $
1.1       nros        2: #
1.10      wiz         3: # Build and install Python wheels
1.1       nros        4: #
                      5: # Variables:
1.10      wiz         6: #
1.1       nros        7: # WHEELFILE:           path to the wheelfile to be installed
                      8: #                      only needs to be set if do-build is redefined
                      9: #
1.11      wiz        10: # USE_PYTEST:          If set to yes, depend on py-test and use it for testing.
                     11: #                      Default: yes
                     12: #
1.12    ! thor       13: # WHEEL_ARGS:          additional arguments to pass during build of the wheel
1.1       nros       14: 
1.10      wiz        15: PY_PATCHPLIST?=        yes
1.1       nros       16: 
1.10      wiz        17: WHEELFILE?=    ${WRKSRC}/dist/*.whl
                     18: WHEEL_NAME?=   ${DISTNAME:C/-([^0-9])/_\1/g}
                     19: _WHEEL_INFODIR=        ${WHEEL_NAME}.dist-info
                     20: PLIST_SUBST+=  WHEEL_INFODIR=${_WHEEL_INFODIR}
1.12    ! thor       21: WHEEL_ARGS?=   # empty
1.1       nros       22: 
1.10      wiz        23: PRINT_PLIST_AWK+=      { gsub(/${_WHEEL_INFODIR:S,.,\.,g}/, "$${WHEEL_INFODIR}") }
1.1       nros       24: 
1.10      wiz        25: .if !target(do-build)
1.1       nros       26: TOOL_DEPENDS+= ${PYPKGPREFIX}-build>=0:../../devel/py-build
                     27: do-build:
1.8       riastrad   28:        ${RUN} cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${TOOL_PYTHONBIN} \
1.12    ! thor       29:                -m build --wheel --skip-dependency-check --no-isolation \
        !            30:                ${WHEEL_ARGS}
1.1       nros       31: .endif
                     32: 
1.10      wiz        33: .if !target(do-install)
                     34: TOOL_DEPENDS+= ${PYPKGPREFIX}-installer>=0.7.0nb1:../../misc/py-installer
                     35: do-install:
                     36:        ${RUN} cd ${WRKSRC} && \
                     37:        ${SETENV} ${INSTALL_ENV} \
                     38:        ${TOOL_PYTHONBIN} -m installer --destdir ${DESTDIR:Q} \
                     39:                --prefix ${PREFIX:Q} ${WHEELFILE}
1.1       nros       40: .endif
                     41: 
1.11      wiz        42: USE_PYTEST?=   yes
                     43: .if !target(do-test) && ${USE_PYTEST:Myes}
                     44: TEST_DEPENDS+= ${PYPKGPREFIX}-test-[0-9]*:../../devel/py-test
                     45: do-test:
                     46:        ${RUN} cd ${WRKSRC} && ${SETENV} ${TEST_ENV} pytest-${PYVERSSUFFIX}
                     47: .endif
                     48: 
1.10      wiz        49: .include "../../lang/python/extension.mk"

CVSweb <webmaster@jp.NetBSD.org>