Title: Using happybase (depending on thriftpy) in Jython
Type: behaviour Severity: urgent
Components: Jythonc compiler, Library Versions: Jython 2.7
Milestone: Jython 2.7.0
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: sowmya.rani, stefan.richthofer
Priority: Keywords:

Created on 2017-01-24.05:08:02 by sowmya.rani, last changed 2017-01-31.00:12:49 by stefan.richthofer.

msg11036 (view) Author: sowmya (sowmya.rani) Date: 2017-01-24.05:08:01
We are using Jython To do multiple python processing, These processing was before done with c-python before so most of the third party library was used without any hassle, now i have issue supporting these library with a help of jython

EX: --
import happybase

How can jython import these types of library
msg11037 (view) Author: Stefan Richthofer (stefan.richthofer) Date: 2017-01-26.02:12:05
basically, when filing an issue it would be helpful, to post the actual error message or describe the behavior that occurred. Ideally stripped down to the root cause as far as possible.

That said, happybase depends on thriftpy, which is probably not installed for your Jython.
Looking at thriftpy in turn shows that thriftpy uses native C-extensions and/or Cython. You could probably make that work on posix-systems using JyNI ( You would have to use CPython to process running with --prefix compliant to your Jython-setup. Jython is unfortunately (currently) not capable of cythonizing the sources (not even with JyNI).

However, it appears like thriftpy does not necessarily require the C-extensions. An excerpt from its

# cython detection
    from Cython.Build import cythonize
    CYTHON = True
except ImportError:
    CYTHON = False

cmdclass = {}
ext_modules = []

# pypy detection
PYPY = "__pypy__" in sys.modules
UNIX = platform.system() in ("Linux", "Darwin")

# only build ext in CPython with UNIX platform
if UNIX and not PYPY:
    # rebuild .c files if cython available
    if CYTHON:


This way it would unfortunately fail to detect Jython. You would have to modify such that Cython-stuff is ruled out in Jython case similar to the PyPy-check.

Hope this somewhat helps...
msg11046 (view) Author: Stefan Richthofer (stefan.richthofer) Date: 2017-01-31.00:12:49
Changed the title to describe what module this issue is actually about. Hope you don't mind...
Date User Action Args
2017-01-31 00:12:49stefan.richthofersetmessages: + msg11046
title: Third party python module import in Jython -> Using happybase (depending on thriftpy) in Jython
2017-01-26 02:12:06stefan.richthofersetnosy: + stefan.richthofer
messages: + msg11037
2017-01-24 05:08:02sowmya.ranicreate