Commit 4f77d7b2 authored by Jerome Flesch's avatar Jerome Flesch

Move files from src/*.py --> src/pyocr/*.py + use relative imports instead of absolute

(avoid issues with python 2/3 imports)
Signed-off-by: Jerome Flesch's avatarJerome Flesch <jflesch@gmail.com>
parent b809a144
......@@ -4,9 +4,9 @@ import sys
sys.path = [ "src" ] + sys.path
import unittest
import cuneiform
import pyocr
import tesseract
from pyocr import cuneiform
from pyocr import pyocr
from pyocr import tesseract
from tests import tests_cuneiform
from tests import tests_tesseract
......
......@@ -26,7 +26,7 @@ setup(name="pyocr",
author="Jerome Flesch",
author_email="jflesch@gmail.com",
packages=['pyocr'],
package_dir={ 'pyocr': 'src' },
package_dir={ 'pyocr': 'src/pyocr' },
data_files=[],
scripts=[],
install_requires=[
......
......@@ -14,7 +14,7 @@ except ImportError:
import re
import xml
from util import to_unicode
from .util import to_unicode
__all__ = [
'Box',
......
......@@ -23,8 +23,8 @@ import subprocess
import sys
import tempfile
import builders
import util
from . import builders
from . import util
# CHANGE THIS IF CUNEIFORM IS NOT IN YOUR PATH, OR IS NAMED DIFFERENTLY
......
......@@ -45,8 +45,8 @@ WEBSITE:
https://github.com/jflesch/python-tesseract#readme
"""
import cuneiform
import tesseract
from . import cuneiform
from . import tesseract
__all__ = [
'get_available_tools',
......
......@@ -23,8 +23,8 @@ import sys
import tempfile
import xml.dom.minidom
import builders
import util
from . import builders
from . import util
# CHANGE THIS IF TESSERACT IS NOT IN YOUR PATH, OR IS NAMED DIFFERENTLY
......
......@@ -7,8 +7,8 @@ import tempfile
import unittest
import builders
import cuneiform
from pyocr import builders
from pyocr import cuneiform
class TestContext(unittest.TestCase):
......
......@@ -7,8 +7,8 @@ import tempfile
import unittest
import builders
import tesseract
from pyocr import builders
from pyocr import tesseract
class TestContext(unittest.TestCase):
......
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