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.
This commit is contained in:
Tatsuhiro Tsujikawa 2014-04-21 00:33:38 +09:00
parent 1d5a1b895b
commit 6a598d8fb8
1 changed files with 6 additions and 8 deletions

View File

@ -21,19 +21,16 @@
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # 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 EXTRA_DIST = cnghttp2.pxd nghttp2.pyx
if HAVE_CYTHON
EXTRA_DIST += nghttp2.c
endif # HAVE_CYTHON
if ENABLE_PYTHON_BINDINGS if ENABLE_PYTHON_BINDINGS
all-local: nghttp2.c all-local: nghttp2.c
$(PYTHON) setup.py build $(PYTHON) setup.py build
install-exec-local: install-exec-local:
$(PYTHON) setup.py install --prefix=$(DESTDIR)$(prefix) $(PYTHON) setup.py install --prefix=$(DESTDIR)$(prefix)
@ -43,6 +40,7 @@ uninstall-local:
clean-local: clean-local:
$(PYTHON) setup.py clean --all $(PYTHON) setup.py clean --all
-rm -f $(builddir)/nghttp2.c
.pyx.c: .pyx.c:
$(CYTHON) -o $@ $< $(CYTHON) -o $@ $<