Annotation of pkgsrc/lang/python/bootstrap.mk, revision 1.1
1.1 ! wiz 1: # $NetBSD$
! 2: #
! 3: # Initial mk for building and installing Python packages that
! 4: # are on the module install bootstrap path.
! 5: #
! 6: # As of October 2023, this consists of
! 7: # - devel/py-flit_core (has own build rules)
! 8: # - misc/py-installer (has own build rules)
! 9: # - devel/py-build and its dependencies:
! 10: # - devel/py-packaging
! 11: # - devel/py-pyparsing
! 12: # - devel/py-pyproject_hooks
! 13:
! 14:
! 15: WHEELFILE?= ${WRKSRC}/dist/*.whl
! 16: PY_PATCHPLIST?= yes
! 17:
! 18: WHEEL_NAME?= ${DISTNAME:C/-([^0-9])/_\1/g}
! 19: _WHEEL_INFODIR= ${WHEEL_NAME}.dist-info
! 20: PLIST_SUBST+= PYSITELIB=${PYSITELIB}
! 21: PLIST_SUBST+= PYVERSSUFFIX=${PYVERSSUFFIX}
! 22: PLIST_SUBST+= WHEEL_INFODIR=${_WHEEL_INFODIR}
! 23:
! 24: # for ALTERNATIVES files
! 25: FILES_SUBST+= PYVERSSUFFIX=${PYVERSSUFFIX}
! 26:
! 27: PRINT_PLIST_AWK+= { gsub(/${_WHEEL_INFODIR:S,.,\.,g}/, "$${WHEEL_INFODIR}") }
! 28:
! 29: .if !target(do-build)
! 30: TOOL_DEPENDS+= ${PYPKGPREFIX}-flit_core>=3.9.0nb1:../../devel/py-flit_core
! 31: do-build:
! 32: ${RUN} cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${TOOL_PYTHONBIN} -m flit_core.wheel
! 33: .endif
! 34:
! 35: .if !target(do-install)
! 36: TOOL_DEPENDS+= ${PYPKGPREFIX}-installer>=0.7.0nb1../../misc/py-installer
! 37: do-install:
! 38: ${RUN} cd ${WRKSRC} && \
! 39: ${SETENV} ${INSTALL_ENV} \
! 40: ${TOOL_PYTHONBIN} -m installer --destdir ${DESTDIR:Q} \
! 41: --prefix ${PREFIX:Q} ${WHEELFILE}
! 42: .endif
! 43:
! 44: .include "../../lang/python/extension.mk"
CVSweb <webmaster@jp.NetBSD.org>