Commit ff93d999 authored by Jerome Flesch's avatar Jerome Flesch

Tesseract C-API: Remove leptonica_raw: We actually don't need to access libleptonica functions

Signed-off-by: Jerome Flesch's avatarJerome Flesch <jflesch@gmail.com>
parent eae12f25
......@@ -19,7 +19,6 @@ import sys
from .. import builders
from . import tesseract_raw
from . import leptonica_raw
__all__ = [
......@@ -150,7 +149,7 @@ def is_available():
python_ver = (sys.version_info[0], sys.version_info[1])
if python_ver < (3, 0):
return False
return tesseract_raw.is_available() and leptonica_raw.is_available()
return tesseract_raw.is_available()
def get_available_languages():
......
import ctypes
# TODO(Jflesch): win32/win64 ?
libnames = [
"liblept.so.4",
]
g_liblept = None
for libname in libnames:
try:
g_liblept = ctypes.cdll.LoadLibrary(libname)
except OSError:
pass
if g_liblept:
# TODO
pass
def is_available():
global g_liblept
return g_liblept is not None
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