From ea1eeae0995f8deb76fa85a61d5f07a03ffff299 Mon Sep 17 00:00:00 2001 From: Caetano Melone Date: Thu, 19 Feb 2026 17:03:07 -0800 Subject: [PATCH] fix: in-source python builds the Makefile for the python bindings does a check for out of source builds to see if it should copy the .pyx file. However, if `srcdir` and `builddir` are different strings but point to the same directory, the `cp` command will fail. This patch makes the build step more robust by checking if the .pyx file exists in the `builddir` (will resolve to true if srcdir==builddir). Otherwise, it will copy the file over. Signed-off-by: Caetano Melone --- src/python/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/python/Makefile.am b/src/python/Makefile.am index c858832e..c621a92c 100644 --- a/src/python/Makefile.am +++ b/src/python/Makefile.am @@ -36,7 +36,7 @@ EXTRA_DIST = libseccomp.pxd seccomp.pyx setup.py all-local: build build: ../libseccomp.la libseccomp.pxd seccomp.pyx setup.py - [ ${srcdir} = ${builddir} ] || cp ${srcdir}/seccomp.pyx ${builddir} + test -f ${builddir}/seccomp.pyx || cp ${srcdir}/seccomp.pyx ${builddir} ${PY_BUILD} && touch build install-exec-local: build