tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: python nproc vs MAKE_JOBS issues



On Mon, Nov 11, 2024 at 11:57:11AM +0000, Jonathan Perkin wrote:
> I've seen a few similar things to this recently where python modules are
> being built with complete disregard to MAKE_JOBS, and instead are just
> spawning a thread for each CPU they find.  For example:

This seems to be py-maturin's default, to use one job per CPU.

> Do any python folks know what is causing this and are able to fix it?

Try the attached patch. Similar patches would need to be applied to
all users of py-maturin.
 Thomas
Index: Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/devel/py-ruff/Makefile,v
retrieving revision 1.42
diff -u -r1.42 Makefile
--- Makefile	11 Nov 2024 08:03:47 -0000	1.42
+++ Makefile	11 Nov 2024 12:08:49 -0000
@@ -17,6 +17,9 @@
 # for tikv-jemalloc-sys
 USE_TOOLS+=	gmake
 
+# honor parallel-make-jobs setting
+WHEEL_ARGS+=	-C${_MAKE_JOBS}
+
 # Depends on an unpublished crate. Can't use cargo.mk to fetch it.
 LSP_TYPES_REV=	3512a9f33eadc5402cfab1b8f7340824c8ca1439
 SALSA_REV=	254c749b02cde2fd29852a7463a33e800b771758


Home | Main Index | Thread Index | Old Index