From 6a598d8fb8bb33f17b4d0d7dd8c5ac4d7a1940af Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Mon, 21 Apr 2014 00:33:38 +0900 Subject: [PATCH] python: Fix parellel `make distcheck` and not distribute nghttp2.c It seems that setup.py gets deleted before python executes it in clean-local. To prevent this situation, we just use .NOTPARALLEL. Previously we distribute nghttp2.c in python, which is cythonized C source code from nghttp2.pyx. Since it is distributed in archive it exists in source directory. But we use python distutils which operates in build directory and does not support C source files in out of tree directory (i.e., not under the build directory). Copying C source file to build directory is a bit dirty, so we just decided not to ship nghttp2.c. --- python/Makefile.am | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/python/Makefile.am b/python/Makefile.am index b2364c37..911888fd 100644 --- a/python/Makefile.am +++ b/python/Makefile.am @@ -21,19 +21,16 @@ # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -EXTRA_DIST = cnghttp2.pxd nghttp2.pyx setup.py +# This will avoid that setup.py gets deleted before it is executed in +# clean-local in parallel build. +.NOTPARALLEL: -# Generate nghttp2.c only if we have cython installed -if HAVE_CYTHON - -EXTRA_DIST += nghttp2.c - -endif # HAVE_CYTHON +EXTRA_DIST = cnghttp2.pxd nghttp2.pyx if ENABLE_PYTHON_BINDINGS all-local: nghttp2.c - $(PYTHON) setup.py build + $(PYTHON) setup.py build install-exec-local: $(PYTHON) setup.py install --prefix=$(DESTDIR)$(prefix) @@ -43,6 +40,7 @@ uninstall-local: clean-local: $(PYTHON) setup.py clean --all + -rm -f $(builddir)/nghttp2.c .pyx.c: $(CYTHON) -o $@ $<