~zeitgeist/zeitgeist/cleanup

« back to all changes in this revision

Viewing changes to zeitgeist/__init__.py

  • Committer: Siegfried-Angel Gevatter Pujals
  • Date: 2009-07-11 23:20:37 UTC
  • mto: This revision was merged to the branch mainline in revision 1018.
  • Revision ID: rainct@ubuntu.com-20090711232037-hed743pyaqn07uj1
Separate source into a public and a private module.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
try:
2
 
    import config
 
2
    import _config
3
3
 
4
4
except ImportError:
5
5
    # No config module, this is straight from the repository
6
6
    
7
7
    import os
 
8
    import sys
8
9
    
9
10
    class MockConfig:
10
11
        __file__ = __file__
13
14
        bindir = os.path.join(os.path.dirname(__file__), "..")
14
15
        localedir = "/usr/share/locale"
15
16
        pkgdatadir = os.path.join(bindir, "data")
 
17
        datasourcedir = os.path.join(bindir, "_zeitgeist/loggers/datasources")
16
18
        libdir = ""
17
19
        libexecdir = ""
18
20
        PACKAGE = "gnome-zeitgeist"  # TODO: change this
19
21
        VERSION = "bzr"
 
22
        
 
23
        def setup_path(self):
 
24
            sys.path.insert(0, self.bindir)
20
25
    
21
 
    config = MockConfig()
 
26
    _config = MockConfig()