Skip to content

Commit ea1eeae

Browse files
committed
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 <melone1@llnl.gov>
1 parent 4b0bf50 commit ea1eeae

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/python/Makefile.am

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ EXTRA_DIST = libseccomp.pxd seccomp.pyx setup.py
3636
all-local: build
3737

3838
build: ../libseccomp.la libseccomp.pxd seccomp.pyx setup.py
39-
[ ${srcdir} = ${builddir} ] || cp ${srcdir}/seccomp.pyx ${builddir}
39+
test -f ${builddir}/seccomp.pyx || cp ${srcdir}/seccomp.pyx ${builddir}
4040
${PY_BUILD} && touch build
4141

4242
install-exec-local: build

0 commit comments

Comments
 (0)