~timo-jyrinki/ubuntu/trusty/pitivi/backport_utopic_fixes

« back to all changes in this revision

Viewing changes to .pc/01_disable-devel-mode.patch/pitivi/configure.py.in

  • Committer: Package Import Robot
  • Author(s): Sebastian Dröge
  • Date: 2014-04-05 15:28:16 UTC
  • mfrom: (6.1.13 sid)
  • Revision ID: package-import@ubuntu.com-20140405152816-6lijoax4cngiz5j5
Tags: 0.93-3
* debian/control:
  + Depend on python-gi (>= 3.10), older versions do not work
    with pitivi (Closes: #732813).
  + Add missing dependency on gir1.2-clutter-gst-2.0 (Closes: #743692).
  + Add suggests on gir1.2-notify-0.7 and gir1.2-gnomedesktop-3.0.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# Pitivi video editor
 
2
#
 
3
#       pitivi/configure.py
 
4
#
 
5
# Copyright (c) 2005, Edward Hervey <bilboed@bilboed.com>
 
6
#
 
7
# This program is free software; you can redistribute it and/or
 
8
# modify it under the terms of the GNU Lesser General Public
 
9
# License as published by the Free Software Foundation; either
 
10
# version 2.1 of the License, or (at your option) any later version.
 
11
#
 
12
# This program is distributed in the hope that it will be useful,
 
13
# but WITHOUT ANY WARRANTY; without even the implied warranty of
 
14
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 
15
# Lesser General Public License for more details.
 
16
#
 
17
# You should have received a copy of the GNU Lesser General Public
 
18
# License along with this program; if not, write to the
 
19
# Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
 
20
# Boston, MA 02110-1301, USA.
 
21
"""
 
22
Utilities for getting the location of various directories.
 
23
Enables identical use for installed and uninstalled versions.
 
24
"""
 
25
 
 
26
import os.path
 
27
 
 
28
 
 
29
# Again, mostly the same thing as in bin/pitivi.in and pitivi/utils/misc.py:
 
30
def _get_root_dir():
 
31
    return '/'.join(os.path.dirname(os.path.abspath(__file__)).split('/')[:-1])
 
32
 
 
33
 
 
34
def in_devel():
 
35
    """
 
36
    Returns whether the app is run from a git checkout.
 
37
    """
 
38
    rd = _get_root_dir()
 
39
    return os.path.exists(os.path.join(rd, '.git'))
 
40
 
 
41
 
 
42
LIBDIR = '@LIBDIR@'
 
43
PKGDATADIR = '@DATADIR@/@PACKAGE@'
 
44
VERSION = '@VERSION@'
 
45
APPNAME = '@PACKAGE_NAME@'
 
46
APPURL = 'http://www.pitivi.org/'
 
47
RELEASES_URL = 'http://pitivi.org/releases.txt'
 
48
APPMANUALURL_ONLINE = 'http://www.pitivi.org/manual'
 
49
 
 
50
 
 
51
if in_devel():
 
52
    APPMANUALURL_OFFLINE = 'ghelp://%s' % os.path.join(_get_root_dir(), 'help/C')
 
53
else:
 
54
    APPMANUALURL_OFFLINE = 'help:pitivi'
 
55
 
 
56
 
 
57
def get_data_dir():
 
58
    if in_devel():
 
59
        datadir = os.path.join(_get_root_dir(), "data")
 
60
    elif os.getenv("PITIVI_TOP_LEVEL_DIR"):
 
61
        top_level = os.getenv("PITIVI_TOP_LEVEL_DIR")
 
62
        datadir = os.path.join(top_level, "data")
 
63
    else:
 
64
        datadir = PKGDATADIR
 
65
    return os.path.abspath(datadir)
 
66
 
 
67
 
 
68
def get_pixmap_dir():
 
69
    """ Returns the directory for program-only pixmaps """
 
70
    return os.path.join(get_data_dir(), 'pixmaps')
 
71
 
 
72
 
 
73
def get_ui_dir():
 
74
    """ Returns the directory for GtkBuilder/Glade files """
 
75
    return os.path.join(get_data_dir(), 'ui')
 
76
 
 
77
 
 
78
def get_renderpresets_dir():
 
79
    """ Returns the directory for Render Presets files """
 
80
    return os.path.join(get_data_dir(), 'renderpresets')
 
81
 
 
82
 
 
83
def get_audiopresets_dir():
 
84
    """ Returns the directory for Audio Presets files """
 
85
    return os.path.join(get_data_dir(), 'audiopresets')
 
86
 
 
87
 
 
88
def get_videopresets_dir():
 
89
    """ Returns the directory for Video Presets files """
 
90
    return os.path.join(get_data_dir(), 'videopresets')