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

1.11    ! wiz         1: # $NetBSD: wheel.mk,v 1.10 2023/10/28 19:57:10 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.1       nros       13: 
1.10      wiz        14: PY_PATCHPLIST?=        yes
1.1       nros       15: 
1.10      wiz        16: WHEELFILE?=    ${WRKSRC}/dist/*.whl
                     17: WHEEL_NAME?=   ${DISTNAME:C/-([^0-9])/_\1/g}
                     18: _WHEEL_INFODIR=        ${WHEEL_NAME}.dist-info
                     19: PLIST_SUBST+=  WHEEL_INFODIR=${_WHEEL_INFODIR}
1.1       nros       20: 
1.10      wiz        21: PRINT_PLIST_AWK+=      { gsub(/${_WHEEL_INFODIR:S,.,\.,g}/, "$${WHEEL_INFODIR}") }
1.1       nros       22: 
1.10      wiz        23: .if !target(do-build)
1.1       nros       24: TOOL_DEPENDS+= ${PYPKGPREFIX}-build>=0:../../devel/py-build
                     25: do-build:
1.8       riastrad   26:        ${RUN} cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${TOOL_PYTHONBIN} \
                     27:                -m build --wheel --skip-dependency-check --no-isolation
1.1       nros       28: .endif
                     29: 
1.10      wiz        30: .if !target(do-install)
                     31: TOOL_DEPENDS+= ${PYPKGPREFIX}-installer>=0.7.0nb1:../../misc/py-installer
                     32: do-install:
                     33:        ${RUN} cd ${WRKSRC} && \
                     34:        ${SETENV} ${INSTALL_ENV} \
                     35:        ${TOOL_PYTHONBIN} -m installer --destdir ${DESTDIR:Q} \
                     36:                --prefix ${PREFIX:Q} ${WHEELFILE}
1.1       nros       37: .endif
                     38: 
1.11    ! wiz        39: USE_PYTEST?=   yes
        !            40: .if !target(do-test) && ${USE_PYTEST:Myes}
        !            41: TEST_DEPENDS+= ${PYPKGPREFIX}-test-[0-9]*:../../devel/py-test
        !            42: do-test:
        !            43:        ${RUN} cd ${WRKSRC} && ${SETENV} ${TEST_ENV} pytest-${PYVERSSUFFIX}
        !            44: .endif
        !            45: 
1.10      wiz        46: .include "../../lang/python/extension.mk"

CVSweb <webmaster@jp.NetBSD.org>