Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 35 lines (29 sloc) 1.278 kb
9a538ed centralize sys.path manipulation in syspath_override.py
Alaa Abd el Fattah authored
1 #!/usr/bin/env python
2 # -*- coding: utf-8 -*-
3 #
4 # Copyright 2008 Zuza Software Foundation
5 #
6 # This file is part of translate.
7 #
8 # translate is free software; you can redistribute it and/or modify
9 # it under the terms of the GNU General Public License as published by
10 # the Free Software Foundation; either version 2 of the License, or
11 # (at your option) any later version.
12 #
13 # translate is distributed in the hope that it will be useful,
14 # but WITHOUT ANY WARRANTY; without even the implied warranty of
15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 # GNU General Public License for more details.
17 #
18 # You should have received a copy of the GNU General Public License
19 # along with translate; if not, write to the Free Software
20 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21
22 """ Adds pootle directories to the python import path """
23
24 #FIXME: is this useful on an installed codebase or only when running
25 # from source?
26
27 import os
28 import sys
29
30 ROOT_DIR = os.path.abspath(os.path.dirname(__file__))
31 sys.path.insert(0, ROOT_DIR) # Top level directory
32
b5c08a8 turns out we're dependant on the specific checkouts in external_apps …
Alaa Abd el Fattah authored
33 sys.path.insert(0, os.path.join(ROOT_DIR, 'external_apps')) # external reusable apps
34 sys.path.insert(0, os.path.join(ROOT_DIR, 'local_apps')) # apps developed specifically for Pootle
Something went wrong with that request. Please try again.