Require python3 for python bindings

This commit is contained in:
Tatsuhiro Tsujikawa 2020-12-29 18:23:54 +09:00
parent c88e910009
commit 22af8e782b
5 changed files with 7 additions and 7 deletions

View File

@ -151,7 +151,7 @@ AC_PROG_MKDIR_P
PKG_PROG_PKG_CONFIG([0.20])
AM_PATH_PYTHON([2.7],, [:])
AM_PATH_PYTHON([3.8],, [:])
if [test "x$request_lib_only" = "xyes"]; then
request_app=no
@ -161,7 +161,7 @@ if [test "x$request_lib_only" = "xyes"]; then
fi
if [test "x$request_python_bindings" != "xno"]; then
AX_PYTHON_DEVEL([>= '2.7'])
AX_PYTHON_DEVEL([>= '3.8'])
fi
if test "x${cython_path}" = "x"; then

View File

@ -44,6 +44,6 @@ clean-local:
-rm -f $(builddir)/nghttp2.c
.pyx.c:
$(CYTHON) -o $@ $<
$(CYTHON) -3 -o $@ $<
endif # ENABLE_PYTHON_BINDINGS

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
#
# This script reads json files given in the command-line (each file
# must be written in the format described in

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
#
# This script reads input headers from json file given in the
# command-line (each file must be written in the format described in

View File

@ -857,7 +857,7 @@ cdef class _HTTP2SessionCore(_HTTP2SessionCoreBase):
rv = cnghttp2.nghttp2_submit_settings(self.session,
cnghttp2.NGHTTP2_FLAG_NONE,
iv, sizeof(iv) / sizeof(iv[0]))
iv, sizeof(iv) // sizeof(iv[0]))
if rv != 0:
raise Exception('nghttp2_submit_settings failed: {}'.format\
@ -971,7 +971,7 @@ cdef class _HTTP2ClientSessionCore(_HTTP2SessionCoreBase):
rv = cnghttp2.nghttp2_submit_settings(self.session,
cnghttp2.NGHTTP2_FLAG_NONE,
iv, sizeof(iv) / sizeof(iv[0]))
iv, sizeof(iv) // sizeof(iv[0]))
if rv != 0:
raise Exception('nghttp2_submit_settings failed: {}'.format\