Skip to content

Commit d891cb8

Browse files
cmelonepcmoore
authored andcommitted
python: 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> Signed-off-by: Paul Moore <paul@paul-moore.com>
1 parent 8094cf5 commit d891cb8

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

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+
[ -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)