Skip to content

Commit

Permalink
Require python3 for python bindings
Browse files Browse the repository at this point in the history
  • Loading branch information
tatsuhiro-t committed Dec 29, 2020
1 parent c88e910 commit 22af8e7
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion python/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,6 @@ clean-local:
-rm -f $(builddir)/nghttp2.c

.pyx.c:
$(CYTHON) -o $@ $<
$(CYTHON) -3 -o $@ $<

endif # ENABLE_PYTHON_BINDINGS
2 changes: 1 addition & 1 deletion python/hpackcheck.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion python/hpackmake.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down
4 changes: 2 additions & 2 deletions python/nghttp2.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -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\
Expand Down Expand Up @@ -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\
Expand Down

0 comments on commit 22af8e7

Please sign in to comment.