[ocrfeeder/code_dir_changed: 1/2] Move OCRFeeder modules to src/ocrfeeder for a better organization of the source



commit fc6253a20350b83551b2a424eefc078afc6eb6e1
Author: Joaquim Rocha <jrocha igalia com>
Date:   Wed Apr 21 15:45:25 2010 +0200

    Move OCRFeeder modules to src/ocrfeeder for a better organization of the source

 ocrfeeder                                          |    6 +-
 ocrfeeder-cli                                      |   18 ++--
 po/POTFILES.in                                     |   28 +++---
 setup.py                                           |    9 +-
 {feeder => src/ocrfeeder}/__init__.py              |    0
 {odf => src/ocrfeeder/feeder}/__init__.py          |    0
 .../ocrfeeder/feeder}/documentGeneration.py        |   14 ++--
 .../ocrfeeder/feeder}/imageManipulation.py         |    4 +-
 {feeder => src/ocrfeeder/feeder}/layoutAnalysis.py |    8 +-
 {feeder => src/ocrfeeder/feeder}/ocrEngines.py     |    4 +-
 {studio => src/ocrfeeder/odf}/__init__.py          |    0
 {odf => src/ocrfeeder/odf}/anim.py                 |    0
 {odf => src/ocrfeeder/odf}/attrconverters.py       |    0
 {odf => src/ocrfeeder/odf}/chart.py                |    0
 {odf => src/ocrfeeder/odf}/config.py               |    0
 {odf => src/ocrfeeder/odf}/dc.py                   |    0
 {odf => src/ocrfeeder/odf}/dr3d.py                 |    0
 {odf => src/ocrfeeder/odf}/draw.py                 |    0
 {odf => src/ocrfeeder/odf}/element.py              |    0
 {odf => src/ocrfeeder/odf}/form.py                 |    0
 {odf => src/ocrfeeder/odf}/grammar.py              |    0
 {odf => src/ocrfeeder/odf}/load.py                 |    0
 {odf => src/ocrfeeder/odf}/manifest.py             |    0
 {odf => src/ocrfeeder/odf}/math.py                 |    0
 {odf => src/ocrfeeder/odf}/meta.py                 |    0
 {odf => src/ocrfeeder/odf}/namespaces.py           |    0
 {odf => src/ocrfeeder/odf}/number.py               |    0
 {odf => src/ocrfeeder/odf}/odf2xhtml.py            |    0
 {odf => src/ocrfeeder/odf}/odfmanifest.py          |    0
 {odf => src/ocrfeeder/odf}/office.py               |    0
 {odf => src/ocrfeeder/odf}/ooostyles.py            |    0
 {odf => src/ocrfeeder/odf}/opendocument.py         |    0
 {odf => src/ocrfeeder/odf}/presentation.py         |    0
 {odf => src/ocrfeeder/odf}/script.py               |    0
 {odf => src/ocrfeeder/odf}/style.py                |    0
 {odf => src/ocrfeeder/odf}/svg.py                  |    0
 {odf => src/ocrfeeder/odf}/table.py                |    0
 {odf => src/ocrfeeder/odf}/text.py                 |    0
 {odf => src/ocrfeeder/odf}/thumbnail.py            |    0
 {odf => src/ocrfeeder/odf}/userfield.py            |    0
 {odf => src/ocrfeeder/odf}/xforms.py               |    0
 {feeder => src/ocrfeeder/studio}/__init__.py       |    0
 {studio => src/ocrfeeder/studio}/configuration.py  |    6 +-
 {studio => src/ocrfeeder/studio}/customWidgets.py  |    0
 {studio => src/ocrfeeder/studio}/dataHolder.py     |    6 +-
 {studio => src/ocrfeeder/studio}/studioBuilder.py  |   17 ++--
 {studio => src/ocrfeeder/studio}/widgetModeler.py  |   18 ++--
 .../ocrfeeder/studio}/widgetPresenter.py           |    8 +-
 {util => src/ocrfeeder/util}/__init__.py           |    0
 {util => src/ocrfeeder/util}/cliutils.py           |    0
 {util => src/ocrfeeder/util}/constants.py          |    3 +-
 {util => src/ocrfeeder/util}/graphics.py           |    2 +-
 {util => src/ocrfeeder/util}/lib.py                |    2 +-
 util/asyncworker.py                                |   85 --------------------
 54 files changed, 79 insertions(+), 159 deletions(-)
---
diff --git a/ocrfeeder b/ocrfeeder
index 0619fbd..b324098 100755
--- a/ocrfeeder
+++ b/ocrfeeder
@@ -18,10 +18,12 @@
 #    along with this program.  If not, see <http://www.gnu.org/licenses/>.
 ###########################################################################
 
-from studio.studioBuilder import Studio
 import sys
+
+from ocrfeeder.studio.studioBuilder import Studio
+
 sys.path.append('resources/')
 
 if __name__ == '__main__':
     studio = Studio()
-    studio.run()
\ No newline at end of file
+    studio.run()
diff --git a/ocrfeeder-cli b/ocrfeeder-cli
index 8c67dff..9d3f622 100755
--- a/ocrfeeder-cli
+++ b/ocrfeeder-cli
@@ -23,14 +23,14 @@ import sys
 import os
 import gtk
 import math
-from util.cliutils import ArgsRetriever
-from util.graphics import getBoundsFromStartEndPoints, convertPixbufToImage, getTextSizeFromImage
-from feeder.ocrEngines import Engine, OcrEnginesManager
-from studio.configuration import ConfigurationManager
-from studio.dataHolder import DataBox, PageData, TEXT_TYPE, IMAGE_TYPE
-from feeder.imageManipulation import *
-from feeder.layoutAnalysis import *
-from feeder.documentGeneration import OdtGenerator, HtmlGenerator
+from ocrfeeder.util.cliutils import ArgsRetriever
+from ocrfeeder.util.graphics import getBoundsFromStartEndPoints, convertPixbufToImage, getTextSizeFromImage
+from ocrfeeder.feeder.ocrEngines import Engine, OcrEnginesManager
+from ocrfeeder.studio.configuration import ConfigurationManager
+from ocrfeeder.studio.dataHolder import DataBox, PageData, TEXT_TYPE, IMAGE_TYPE
+from ocrfeeder.feeder.imageManipulation import *
+from ocrfeeder.feeder.layoutAnalysis import *
+from ocrfeeder.feeder.documentGeneration import OdtGenerator, HtmlGenerator
 
 def printError(message):
 	print message
@@ -97,4 +97,4 @@ if 'HTML' in export_format:
 	document_generator = HtmlGenerator(file_name)
 for page in pages:
 	document_generator.addPage(page)
-document_generator.save()
\ No newline at end of file
+document_generator.save()
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 9b01577..4d8ae18 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -1,18 +1,18 @@
 [encoding: UTF-8]
-feeder/documentGeneration.py
-feeder/imageManipulation.py
-feeder/layoutAnalysis.py
-feeder/ocrEngines.py
+src/ocrfeeder/feeder/documentGeneration.py
+src/ocrfeeder/feeder/imageManipulation.py
+src/ocrfeeder/feeder/layoutAnalysis.py
+src/ocrfeeder/feeder/ocrEngines.py
 ocrfeeder
 ocrfeeder-cli
 resources/ocrfeeder.desktop.in
-studio/configuration.py
-studio/customWidgets.py
-studio/dataHolder.py
-studio/studioBuilder.py
-studio/widgetModeler.py
-studio/widgetPresenter.py
-util/cliutils.py
-util/constants.py
-util/graphics.py
-util/lib.py
+src/ocrfeeder/studio/configuration.py
+src/ocrfeeder/studio/customWidgets.py
+src/ocrfeeder/studio/dataHolder.py
+src/ocrfeeder/studio/studioBuilder.py
+src/ocrfeeder/studio/widgetModeler.py
+src/ocrfeeder/studio/widgetPresenter.py
+src/ocrfeeder/util/cliutils.py
+src/ocrfeeder/util/constants.py
+src/ocrfeeder/util/graphics.py
+src/ocrfeeder/util/lib.py
diff --git a/setup.py b/setup.py
index 26e1b80..a1967e3 100644
--- a/setup.py
+++ b/setup.py
@@ -1,9 +1,9 @@
 #!/usr/bin/env python
 
+import os
 from distutils.core import setup
-from util import constants
+from ocrfeeder.util import constants
 import glob
-import os
 
 def get_locale_files():
     files = glob.glob('locale/*/*/*.mo')
@@ -21,9 +21,10 @@ setup(name = 'ocrfeeder',
      author_email = 'joaquimrocha1 gmail com',
      url = constants.OCRFEEDER_WEBSITE,
      license = 'GPL v3',
-     packages = ['feeder', 'studio',
-                 'util', 'odf',
+     packages = ['ocrfeeder', 'ocrfeeder.feeder', 'ocrfeeder.studio',
+                 'ocrfeeder.util', 'ocrfeeder.odf',
                  ],
+     package_dir = {'': 'src'},
      scripts = ['ocrfeeder', 'ocrfeeder-cli'],
      data_files = [(constants.DEFAULT_SYSTEM_APP_DIR +
                     '/icons', ['resources/icons/detect_icon.svg',
diff --git a/feeder/__init__.py b/src/ocrfeeder/__init__.py
similarity index 100%
copy from feeder/__init__.py
copy to src/ocrfeeder/__init__.py
diff --git a/odf/__init__.py b/src/ocrfeeder/feeder/__init__.py
similarity index 100%
rename from odf/__init__.py
rename to src/ocrfeeder/feeder/__init__.py
diff --git a/feeder/documentGeneration.py b/src/ocrfeeder/feeder/documentGeneration.py
similarity index 96%
rename from feeder/documentGeneration.py
rename to src/ocrfeeder/feeder/documentGeneration.py
index 3d73d14..7d1530c 100644
--- a/feeder/documentGeneration.py
+++ b/src/ocrfeeder/feeder/documentGeneration.py
@@ -18,17 +18,17 @@
 #    along with this program.  If not, see <http://www.gnu.org/licenses/>.
 ###########################################################################
 
-from odf.draw import Frame, TextBox, Image
-from odf.opendocument import OpenDocumentText
-from odf.style import Style, MasterPage, GraphicProperties, ParagraphProperties, \
+from ocrfeeder.odf.draw import Frame, TextBox, Image
+from ocrfeeder.odf.opendocument import OpenDocumentText
+from ocrfeeder.odf.style import Style, MasterPage, GraphicProperties, ParagraphProperties, \
     TextProperties, PageLayout, PageLayoutProperties
-from odf.text import P, Page, PageSequence
+from ocrfeeder.odf.text import P, Page, PageSequence
 from pango import WEIGHT_BOLD, WEIGHT_NORMAL, STYLE_ITALIC, STYLE_NORMAL, \
     STYLE_OBLIQUE
-from util import TEXT_TYPE, IMAGE_TYPE, ALIGN_LEFT, ALIGN_RIGHT, ALIGN_CENTER, \
+from ocrfeeder.util import TEXT_TYPE, IMAGE_TYPE, ALIGN_LEFT, ALIGN_RIGHT, ALIGN_CENTER, \
     ALIGN_FILL
-from util.graphics import getImagePrintSize
-from util.lib import debug
+from ocrfeeder.util.graphics import getImagePrintSize
+from ocrfeeder.util.lib import debug
 import math
 import os.path
 import shutil
diff --git a/feeder/imageManipulation.py b/src/ocrfeeder/feeder/imageManipulation.py
similarity index 99%
rename from feeder/imageManipulation.py
rename to src/ocrfeeder/feeder/imageManipulation.py
index eb9c730..a131899 100644
--- a/feeder/imageManipulation.py
+++ b/src/ocrfeeder/feeder/imageManipulation.py
@@ -19,12 +19,12 @@
 ###########################################################################
 
 import tempfile
-from util.lib import debug
+from ocrfeeder.util.lib import debug
 
 import gettext
 import Image, ImageDraw
 import os.path
-from util import graphics
+from ocrfeeder.util import graphics
 import sys
 
 _ = gettext.gettext
diff --git a/feeder/layoutAnalysis.py b/src/ocrfeeder/feeder/layoutAnalysis.py
similarity index 99%
rename from feeder/layoutAnalysis.py
rename to src/ocrfeeder/feeder/layoutAnalysis.py
index 3b12171..dfea751 100644
--- a/feeder/layoutAnalysis.py
+++ b/src/ocrfeeder/feeder/layoutAnalysis.py
@@ -18,10 +18,10 @@
 #    along with this program.  If not, see <http://www.gnu.org/licenses/>.
 ###########################################################################
 
-from util.lib import debug
-from util import graphics
-from util.constants import OCRFEEDER_DEBUG, DTP
-from studio.dataHolder import DataBox
+from ocrfeeder.util.lib import debug
+from ocrfeeder.util import graphics
+from ocrfeeder.util.constants import OCRFEEDER_DEBUG, DTP
+from ocrfeeder.studio.dataHolder import DataBox
 from imageManipulation import ImageProcessor
 import Image
 import re
diff --git a/feeder/ocrEngines.py b/src/ocrfeeder/feeder/ocrEngines.py
similarity index 98%
rename from feeder/ocrEngines.py
rename to src/ocrfeeder/feeder/ocrEngines.py
index 43f6390..c6c556f 100644
--- a/feeder/ocrEngines.py
+++ b/src/ocrfeeder/feeder/ocrEngines.py
@@ -24,8 +24,8 @@ import tempfile
 import os
 import xml.etree.ElementTree as ET
 from xml.parsers.expat import ExpatError
-from studio.dataHolder import TEXT_TYPE, IMAGE_TYPE
-from util import lib
+from ocrfeeder.studio.dataHolder import TEXT_TYPE, IMAGE_TYPE
+from ocrfeeder.util import lib
 IMAGE_ARGUMENT = '$IMAGE'
 FILE_ARGUMENT = '$FILE'
 
diff --git a/studio/__init__.py b/src/ocrfeeder/odf/__init__.py
similarity index 100%
rename from studio/__init__.py
rename to src/ocrfeeder/odf/__init__.py
diff --git a/odf/anim.py b/src/ocrfeeder/odf/anim.py
similarity index 100%
rename from odf/anim.py
rename to src/ocrfeeder/odf/anim.py
diff --git a/odf/attrconverters.py b/src/ocrfeeder/odf/attrconverters.py
similarity index 100%
rename from odf/attrconverters.py
rename to src/ocrfeeder/odf/attrconverters.py
diff --git a/odf/chart.py b/src/ocrfeeder/odf/chart.py
similarity index 100%
rename from odf/chart.py
rename to src/ocrfeeder/odf/chart.py
diff --git a/odf/config.py b/src/ocrfeeder/odf/config.py
similarity index 100%
rename from odf/config.py
rename to src/ocrfeeder/odf/config.py
diff --git a/odf/dc.py b/src/ocrfeeder/odf/dc.py
similarity index 100%
rename from odf/dc.py
rename to src/ocrfeeder/odf/dc.py
diff --git a/odf/dr3d.py b/src/ocrfeeder/odf/dr3d.py
similarity index 100%
rename from odf/dr3d.py
rename to src/ocrfeeder/odf/dr3d.py
diff --git a/odf/draw.py b/src/ocrfeeder/odf/draw.py
similarity index 100%
rename from odf/draw.py
rename to src/ocrfeeder/odf/draw.py
diff --git a/odf/element.py b/src/ocrfeeder/odf/element.py
similarity index 100%
rename from odf/element.py
rename to src/ocrfeeder/odf/element.py
diff --git a/odf/form.py b/src/ocrfeeder/odf/form.py
similarity index 100%
rename from odf/form.py
rename to src/ocrfeeder/odf/form.py
diff --git a/odf/grammar.py b/src/ocrfeeder/odf/grammar.py
similarity index 100%
rename from odf/grammar.py
rename to src/ocrfeeder/odf/grammar.py
diff --git a/odf/load.py b/src/ocrfeeder/odf/load.py
similarity index 100%
rename from odf/load.py
rename to src/ocrfeeder/odf/load.py
diff --git a/odf/manifest.py b/src/ocrfeeder/odf/manifest.py
similarity index 100%
rename from odf/manifest.py
rename to src/ocrfeeder/odf/manifest.py
diff --git a/odf/math.py b/src/ocrfeeder/odf/math.py
similarity index 100%
rename from odf/math.py
rename to src/ocrfeeder/odf/math.py
diff --git a/odf/meta.py b/src/ocrfeeder/odf/meta.py
similarity index 100%
rename from odf/meta.py
rename to src/ocrfeeder/odf/meta.py
diff --git a/odf/namespaces.py b/src/ocrfeeder/odf/namespaces.py
similarity index 100%
rename from odf/namespaces.py
rename to src/ocrfeeder/odf/namespaces.py
diff --git a/odf/number.py b/src/ocrfeeder/odf/number.py
similarity index 100%
rename from odf/number.py
rename to src/ocrfeeder/odf/number.py
diff --git a/odf/odf2xhtml.py b/src/ocrfeeder/odf/odf2xhtml.py
similarity index 100%
rename from odf/odf2xhtml.py
rename to src/ocrfeeder/odf/odf2xhtml.py
diff --git a/odf/odfmanifest.py b/src/ocrfeeder/odf/odfmanifest.py
similarity index 100%
rename from odf/odfmanifest.py
rename to src/ocrfeeder/odf/odfmanifest.py
diff --git a/odf/office.py b/src/ocrfeeder/odf/office.py
similarity index 100%
rename from odf/office.py
rename to src/ocrfeeder/odf/office.py
diff --git a/odf/ooostyles.py b/src/ocrfeeder/odf/ooostyles.py
similarity index 100%
rename from odf/ooostyles.py
rename to src/ocrfeeder/odf/ooostyles.py
diff --git a/odf/opendocument.py b/src/ocrfeeder/odf/opendocument.py
similarity index 100%
rename from odf/opendocument.py
rename to src/ocrfeeder/odf/opendocument.py
diff --git a/odf/presentation.py b/src/ocrfeeder/odf/presentation.py
similarity index 100%
rename from odf/presentation.py
rename to src/ocrfeeder/odf/presentation.py
diff --git a/odf/script.py b/src/ocrfeeder/odf/script.py
similarity index 100%
rename from odf/script.py
rename to src/ocrfeeder/odf/script.py
diff --git a/odf/style.py b/src/ocrfeeder/odf/style.py
similarity index 100%
rename from odf/style.py
rename to src/ocrfeeder/odf/style.py
diff --git a/odf/svg.py b/src/ocrfeeder/odf/svg.py
similarity index 100%
rename from odf/svg.py
rename to src/ocrfeeder/odf/svg.py
diff --git a/odf/table.py b/src/ocrfeeder/odf/table.py
similarity index 100%
rename from odf/table.py
rename to src/ocrfeeder/odf/table.py
diff --git a/odf/text.py b/src/ocrfeeder/odf/text.py
similarity index 100%
rename from odf/text.py
rename to src/ocrfeeder/odf/text.py
diff --git a/odf/thumbnail.py b/src/ocrfeeder/odf/thumbnail.py
similarity index 100%
rename from odf/thumbnail.py
rename to src/ocrfeeder/odf/thumbnail.py
diff --git a/odf/userfield.py b/src/ocrfeeder/odf/userfield.py
similarity index 100%
rename from odf/userfield.py
rename to src/ocrfeeder/odf/userfield.py
diff --git a/odf/xforms.py b/src/ocrfeeder/odf/xforms.py
similarity index 100%
rename from odf/xforms.py
rename to src/ocrfeeder/odf/xforms.py
diff --git a/feeder/__init__.py b/src/ocrfeeder/studio/__init__.py
similarity index 100%
rename from feeder/__init__.py
rename to src/ocrfeeder/studio/__init__.py
diff --git a/studio/configuration.py b/src/ocrfeeder/studio/configuration.py
similarity index 99%
rename from studio/configuration.py
rename to src/ocrfeeder/studio/configuration.py
index 45beb42..cbcf737 100644
--- a/studio/configuration.py
+++ b/src/ocrfeeder/studio/configuration.py
@@ -18,9 +18,9 @@
 #    along with this program.  If not, see <http://www.gnu.org/licenses/>.
 ###########################################################################
 
-from studio.dataHolder import PageData, DataBox, TextData
-from feeder.ocrEngines import Engine
-from util.lib import debug, getExecPath
+from dataHolder import PageData, DataBox, TextData
+from ocrfeeder.feeder.ocrEngines import Engine
+from ocrfeeder.util.lib import debug, getExecPath
 from xml.dom import minidom
 import os.path
 import re
diff --git a/studio/customWidgets.py b/src/ocrfeeder/studio/customWidgets.py
similarity index 100%
rename from studio/customWidgets.py
rename to src/ocrfeeder/studio/customWidgets.py
diff --git a/studio/dataHolder.py b/src/ocrfeeder/studio/dataHolder.py
similarity index 97%
rename from studio/dataHolder.py
rename to src/ocrfeeder/studio/dataHolder.py
index 0902b8a..b82bca1 100644
--- a/studio/dataHolder.py
+++ b/src/ocrfeeder/studio/dataHolder.py
@@ -19,11 +19,11 @@
 ###########################################################################
 
 import os.path
-from util import graphics
+from ocrfeeder.util import graphics
 import Image
 import gobject
-from util.graphics import getImagePrintSize, getImageResolution
-from util import TEXT_TYPE, IMAGE_TYPE, ALIGN_LEFT, lib
+from ocrfeeder.util.graphics import getImagePrintSize, getImageResolution
+from ocrfeeder.util import TEXT_TYPE, IMAGE_TYPE, ALIGN_LEFT, lib
 from pango import WEIGHT_NORMAL, STYLE_NORMAL
 
 class TextData:
diff --git a/studio/studioBuilder.py b/src/ocrfeeder/studio/studioBuilder.py
similarity index 97%
rename from studio/studioBuilder.py
rename to src/ocrfeeder/studio/studioBuilder.py
index be51cb5..66f040c 100644
--- a/studio/studioBuilder.py
+++ b/src/ocrfeeder/studio/studioBuilder.py
@@ -18,17 +18,18 @@
 #    along with this program.  If not, see <http://www.gnu.org/licenses/>.
 ###########################################################################
 
-from util import lib
-from util.constants import *
-from util.cliutils import ArgsRetriever
+from ocrfeeder.util import lib
+from ocrfeeder.util.constants import *
+from ocrfeeder.util.cliutils import ArgsRetriever
 import sys
 import os.path
 import urllib
-from studio import widgetPresenter
-from studio.widgetModeler import SourceImagesSelector, SourceImagesSelectorIconView, ImageReviewer_Controler
-from studio.dataHolder import DataBox, TextData
-from studio.customWidgets import SelectableBoxesArea
-from feeder.ocrEngines import Engine, OcrEnginesManager
+import widgetPresenter
+from widgetModeler import SourceImagesSelector, \
+     SourceImagesSelectorIconView, ImageReviewer_Controler
+from dataHolder import DataBox, TextData
+from customWidgets import SelectableBoxesArea
+from ocrfeeder.feeder.ocrEngines import Engine, OcrEnginesManager
 from configuration import ConfigurationManager
 from util.asyncworker import AsyncItem
 import gettext
diff --git a/studio/widgetModeler.py b/src/ocrfeeder/studio/widgetModeler.py
similarity index 98%
rename from studio/widgetModeler.py
rename to src/ocrfeeder/studio/widgetModeler.py
index a314600..88a0c3c 100644
--- a/studio/widgetModeler.py
+++ b/src/ocrfeeder/studio/widgetModeler.py
@@ -20,16 +20,16 @@
 
 from customWidgets import SelectableBoxesArea
 from dataHolder import DataBox, PageData, TEXT_TYPE, IMAGE_TYPE
-from feeder.documentGeneration import OdtGenerator, HtmlGenerator
-from feeder.imageManipulation import *
-from feeder.layoutAnalysis import *
+from ocrfeeder.feeder.documentGeneration import OdtGenerator, HtmlGenerator
+from ocrfeeder.feeder.imageManipulation import *
+from ocrfeeder.feeder.layoutAnalysis import *
 from pango import FontDescription, SCALE
-from studio.configuration import ProjectSaver, ProjectLoader, ConfigurationManager
-from util import graphics, ALIGN_LEFT, ALIGN_RIGHT, ALIGN_CENTER, ALIGN_FILL, \
-    PAPER_SIZES
-from util.lib import debug, getNonExistingFileName, unpaperImage
-from util import constants
-from util.asyncworker import AsyncItem
+from configuration import ProjectSaver, ProjectLoader, ConfigurationManager
+from ocrfeeder.util import graphics, ALIGN_LEFT, ALIGN_RIGHT, ALIGN_CENTER, \
+     ALIGN_FILL, PAPER_SIZES
+from ocrfeeder.util.lib import debug, getNonExistingFileName, unpaperImage
+from ocrfeeder.util import constants
+from ocrfeeder.util.asyncworker import AsyncItem
 from widgetPresenter import BoxEditor, PagesToExportDialog, FileDialog, \
     PageSizeDialog, getPopupMenu, WarningDialog, UnpaperDialog, \
     QueuedEventsProgressDialog, SpellCheckerDialog
diff --git a/studio/widgetPresenter.py b/src/ocrfeeder/studio/widgetPresenter.py
similarity index 99%
rename from studio/widgetPresenter.py
rename to src/ocrfeeder/studio/widgetPresenter.py
index 7becc58..e42c667 100644
--- a/studio/widgetPresenter.py
+++ b/src/ocrfeeder/studio/widgetPresenter.py
@@ -21,10 +21,10 @@
 from customWidgets import PlainFrame, TrippleStatusBar
 from dataHolder import DataBox, TEXT_TYPE, IMAGE_TYPE
 from configuration import ConfigurationManager
-from util import lib, PAPER_SIZES
-from util.asyncworker import AsyncWorker
-from util.constants import *
-from util.graphics import convertPixbufToImage
+from ocrfeeder.util import lib, PAPER_SIZES
+from ocrfeeder.util.asyncworker import AsyncWorker
+from ocrfeeder.util.constants import *
+from ocrfeeder.util.graphics import convertPixbufToImage
 from enchant.checker import SpellChecker
 import Image
 import gettext
diff --git a/util/__init__.py b/src/ocrfeeder/util/__init__.py
similarity index 100%
rename from util/__init__.py
rename to src/ocrfeeder/util/__init__.py
diff --git a/util/cliutils.py b/src/ocrfeeder/util/cliutils.py
similarity index 100%
rename from util/cliutils.py
rename to src/ocrfeeder/util/cliutils.py
diff --git a/util/constants.py b/src/ocrfeeder/util/constants.py
similarity index 96%
rename from util/constants.py
rename to src/ocrfeeder/util/constants.py
index fb74769..71c4944 100644
--- a/util/constants.py
+++ b/src/ocrfeeder/util/constants.py
@@ -55,7 +55,8 @@ RESOURCES_DIR = APP_DIR
 # APP_DIR and RESOURCES_DIR to local paths
 if not os.path.exists(APP_DIR):
     APP_DIR = os.path.dirname(os.path.dirname(__file__))
-    RESOURCES_DIR = os.path.join(APP_DIR, 'resources')
+    RESOURCES_DIR = os.path.join(APP_DIR, '../../resources')
+RESOURCES_DIR = os.path.abspath(RESOURCES_DIR)
 
 # I18N
 DEFAULT_LANGUAGES = os.environ.get('LANGUAGE', '').split(':')
diff --git a/util/graphics.py b/src/ocrfeeder/util/graphics.py
similarity index 99%
rename from util/graphics.py
rename to src/ocrfeeder/util/graphics.py
index f271aff..856492a 100644
--- a/util/graphics.py
+++ b/src/ocrfeeder/util/graphics.py
@@ -19,7 +19,7 @@
 ###########################################################################
 
 from lib import getStandardDeviation
-from util.lib import debug
+from lib import debug
 import Image
 import gtk
 import math
diff --git a/util/lib.py b/src/ocrfeeder/util/lib.py
similarity index 99%
rename from util/lib.py
rename to src/ocrfeeder/util/lib.py
index 9d5dd56..ff7df0c 100644
--- a/util/lib.py
+++ b/src/ocrfeeder/util/lib.py
@@ -24,7 +24,7 @@ import Image
 import tempfile
 import gtk
 import math
-from util.constants import *
+from constants import *
 from gnome import url_show
 import sane
 import tempfile



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]