pkgsrc-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: pkgsrc/lang/python
Module Name: pkgsrc
Committed By: wiz
Date: Wed Oct 25 22:21:04 UTC 2023
Added Files:
pkgsrc/lang/python: bootstrap.mk
Log Message:
python: add bootstrap.mk
This file is intended to collect rules to build the basic packages
that are needed to build other packages.
As of now, the ones recommended by the Python community seem to be
flit_core -> installer -> build
To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 pkgsrc/lang/python/bootstrap.mk
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Added files:
Index: pkgsrc/lang/python/bootstrap.mk
diff -u /dev/null pkgsrc/lang/python/bootstrap.mk:1.1
--- /dev/null Wed Oct 25 22:21:04 2023
+++ pkgsrc/lang/python/bootstrap.mk Wed Oct 25 22:21:04 2023
@@ -0,0 +1,44 @@
+# $NetBSD: bootstrap.mk,v 1.1 2023/10/25 22:21:04 wiz Exp $
+#
+# Initial mk for building and installing Python packages that
+# are on the module install bootstrap path.
+#
+# As of October 2023, this consists of
+# - devel/py-flit_core (has own build rules)
+# - misc/py-installer (has own build rules)
+# - devel/py-build and its dependencies:
+# - devel/py-packaging
+# - devel/py-pyparsing
+# - devel/py-pyproject_hooks
+
+
+WHEELFILE?= ${WRKSRC}/dist/*.whl
+PY_PATCHPLIST?= yes
+
+WHEEL_NAME?= ${DISTNAME:C/-([^0-9])/_\1/g}
+_WHEEL_INFODIR= ${WHEEL_NAME}.dist-info
+PLIST_SUBST+= PYSITELIB=${PYSITELIB}
+PLIST_SUBST+= PYVERSSUFFIX=${PYVERSSUFFIX}
+PLIST_SUBST+= WHEEL_INFODIR=${_WHEEL_INFODIR}
+
+# for ALTERNATIVES files
+FILES_SUBST+= PYVERSSUFFIX=${PYVERSSUFFIX}
+
+PRINT_PLIST_AWK+= { gsub(/${_WHEEL_INFODIR:S,.,\.,g}/, "$${WHEEL_INFODIR}") }
+
+.if !target(do-build)
+TOOL_DEPENDS+= ${PYPKGPREFIX}-flit_core>=3.9.0nb1:../../devel/py-flit_core
+do-build:
+ ${RUN} cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${TOOL_PYTHONBIN} -m flit_core.wheel
+.endif
+
+.if !target(do-install)
+TOOL_DEPENDS+= ${PYPKGPREFIX}-installer>=0.7.0nb1../../misc/py-installer
+do-install:
+ ${RUN} cd ${WRKSRC} && \
+ ${SETENV} ${INSTALL_ENV} \
+ ${TOOL_PYTHONBIN} -m installer --destdir ${DESTDIR:Q} \
+ --prefix ${PREFIX:Q} ${WHEELFILE}
+.endif
+
+.include "../../lang/python/extension.mk"
Home |
Main Index |
Thread Index |
Old Index