Commit 6a598d8f authored by Tatsuhiro Tsujikawa's avatar Tatsuhiro Tsujikawa

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.
parent 1d5a1b89
......@@ -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 $@ $<
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment