Skip to content

Commit

Permalink
Support Python 2 and 3.
Browse files Browse the repository at this point in the history
Pass PYTHON=/path/to/desired/pythonVERSION to select.
  • Loading branch information
rescrv committed Jun 15, 2015
1 parent 0eaac45 commit f79e9a8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -728,7 +728,7 @@ bindings_python_hyperdex_client_la_CFLAGS += $(CFLAGS)
bindings_python_hyperdex_client_la_LIBADD =
bindings_python_hyperdex_client_la_LIBADD += libhyperdex-client.la
bindings_python_hyperdex_client_la_LIBADD += $(PYTHON_LDFLAGS)
bindings_python_hyperdex_client_la_LDFLAGS = -module -avoid-version -export-symbols-regex initclient $(AM_LDFLAGS) $(LDFLAGS)
bindings_python_hyperdex_client_la_LDFLAGS = -module -avoid-version -export-symbols-regex $(PYTHON_SYMBOL)client $(AM_LDFLAGS) $(LDFLAGS)
bindings/python/hyperdex/client.c: bindings/python/hyperdex/client.pyx
$(pyx_verbose)cython bindings/python/hyperdex/client.pyx

Expand All @@ -747,7 +747,7 @@ bindings_python_hyperdex_admin_la_CFLAGS += $(CFLAGS)
bindings_python_hyperdex_admin_la_LIBADD =
bindings_python_hyperdex_admin_la_LIBADD += libhyperdex-admin.la
bindings_python_hyperdex_admin_la_LIBADD += $(PYTHON_LDFLAGS)
bindings_python_hyperdex_admin_la_LDFLAGS = -module -avoid-version -export-symbols-regex initadmin $(AM_LDFLAGS) $(LDFLAGS)
bindings_python_hyperdex_admin_la_LDFLAGS = -module -avoid-version -export-symbols-regex $(PYTHON_SYMBOL)admin $(AM_LDFLAGS) $(LDFLAGS)
bindings/python/hyperdex/admin.c: bindings/python/hyperdex/admin.pyx
$(pyx_verbose)cython bindings/python/hyperdex/admin.pyx

Expand Down
2 changes: 2 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,8 @@ AC_ARG_ENABLE([python_bindings], [AS_HELP_STRING([--enable-python-bindings],
[python_bindings=${enableval}], [python_bindings=no])
if test x"${python_bindings}" = xyes; then
AC_PYTHON_DEVEL([>= '2.6'])
AS_CASE([$PYTHON_VERSION], [3*], [pythonsym=PyInit_], [2*], [pythonsym=init], [])
AC_SUBST([PYTHON_SYMBOL], [${pythonsym}])
fi

AC_ARG_ENABLE([ruby_bindings], [AS_HELP_STRING([--enable-ruby-bindings],
Expand Down

0 comments on commit f79e9a8

Please sign in to comment.