[ocrfeeder/code_dir_changed: 2/2] Add local source path for when in development environment
- From: Joaquim Manuel Pereira Rocha <jrocha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [ocrfeeder/code_dir_changed: 2/2] Add local source path for when in development environment
- Date: Fri, 22 Oct 2010 19:14:56 +0000 (UTC)
commit 8ab0fac3d35931cb27e57a2526e843b543080712
Author: Joaquim Rocha <jrocha igalia com>
Date: Wed Apr 21 16:27:47 2010 +0200
Add local source path for when in development environment
ocrfeeder | 4 ++++
ocrfeeder-cli | 4 ++++
setup.py | 5 +++++
3 files changed, 13 insertions(+), 0 deletions(-)
---
diff --git a/ocrfeeder b/ocrfeeder
index b324098..90a8868 100755
--- a/ocrfeeder
+++ b/ocrfeeder
@@ -19,6 +19,10 @@
###########################################################################
import sys
+import os
+local_src = os.path.dirname(os.path.abspath(__file__)) + '/src'
+if os.path.exists(local_src):
+ sys.path = [local_src] + sys.path
from ocrfeeder.studio.studioBuilder import Studio
diff --git a/ocrfeeder-cli b/ocrfeeder-cli
index 9d3f622..fe79c38 100755
--- a/ocrfeeder-cli
+++ b/ocrfeeder-cli
@@ -21,6 +21,10 @@
import sys
import os
+local_src = os.path.dirname(os.path.abspath(__file__)) + '/src'
+if os.path.exists(local_src):
+ sys.path = [local_src] + sys.path
+
import gtk
import math
from ocrfeeder.util.cliutils import ArgsRetriever
diff --git a/setup.py b/setup.py
index a1967e3..4fdc0f2 100644
--- a/setup.py
+++ b/setup.py
@@ -1,6 +1,11 @@
#!/usr/bin/env python
+import sys
import os
+local_src = os.path.dirname(os.path.abspath(__file__)) + '/src'
+if os.path.exists(local_src):
+ sys.path = [local_src] + sys.path
+
from distutils.core import setup
from ocrfeeder.util import constants
import glob
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]