bzr branch
http://gegoxaren.bato24.eu/bzr/b-gtk/fix-viz
| 
126.1.31
by Szilveszter Farkas (Phanatic)
 We also support other versions than 2.4.  | 
1  | 
#!/usr/bin/python
 | 
| 
83
by Jelmer Vernooij
 Merge Olive code.  | 
2  | 
"""GTK+ Frontends for various Bazaar commands."""
 | 
| 
0.8.10
by Szilveszter Farkas (Phanatic)
 2006-07-16 Szilveszter Farkas <Szilveszter.Farkas@gmail.com>  | 
3  | 
|
4  | 
from distutils.core import setup  | 
|
| 
0.9.1
by Stéphane Raimbault
 Work on translation.  | 
5  | 
from distutils.command.install_data import install_data  | 
6  | 
from distutils.dep_util import newer  | 
|
7  | 
from distutils.log import info  | 
|
| 
0.8.74
by Szilveszter Farkas (Phanatic)
 Fix the Win32 build/install issue.  | 
8  | 
import glob  | 
| 
0.9.1
by Stéphane Raimbault
 Work on translation.  | 
9  | 
import os  | 
| 
0.8.74
by Szilveszter Farkas (Phanatic)
 Fix the Win32 build/install issue.  | 
10  | 
import sys  | 
| 
0.9.1
by Stéphane Raimbault
 Work on translation.  | 
11  | 
|
12  | 
class InstallData(install_data):  | 
|
| 
126.1.30
by Szilveszter Farkas (Phanatic)
 Added the ability to install the Nautilus plugin (Fixed: #75603)  | 
13  | 
def run(self):  | 
14  | 
self.data_files.extend(self._compile_po_files())  | 
|
15  | 
        # Disable for now - performance issues
 | 
|
16  | 
        #self.data_files.extend(self._nautilus_plugin())
 | 
|
17  | 
install_data.run(self)  | 
|
18  | 
||
19  | 
def _compile_po_files(self):  | 
|
20  | 
data_files = []  | 
|
21  | 
||
22  | 
        # Don't install language files on Win32
 | 
|
23  | 
if sys.platform == 'win32':  | 
|
24  | 
return data_files  | 
|
25  | 
||
26  | 
PO_DIR = 'po'  | 
|
27  | 
for po in glob.glob(os.path.join(PO_DIR,'*.po')):  | 
|
28  | 
lang = os.path.basename(po[:-3])  | 
|
29  | 
            # It's necessary to compile in this directory (not in po_dir)
 | 
|
30  | 
            # because install_data can't rename file
 | 
|
31  | 
mo = os.path.join('build', 'mo', lang, 'olive-gtk.mo')  | 
|
32  | 
||
33  | 
directory = os.path.dirname(mo)  | 
|
34  | 
if not os.path.exists(directory):  | 
|
35  | 
info('creating %s' % directory)  | 
|
36  | 
os.makedirs(directory)  | 
|
37  | 
||
38  | 
if newer(po, mo):  | 
|
39  | 
                # True if mo doesn't exist
 | 
|
40  | 
cmd = 'msgfmt -o %s %s' % (mo, po)  | 
|
41  | 
info('compiling %s -> %s' % (po, mo))  | 
|
42  | 
if os.system(cmd) != 0:  | 
|
43  | 
raise SystemExit('Error while running msgfmt')  | 
|
44  | 
||
45  | 
dest = os.path.dirname(os.path.join('share', 'locale', lang, 'LC_MESSAGES', 'olive-gtk.mo'))  | 
|
46  | 
data_files.append((dest, [mo]))  | 
|
47  | 
||
48  | 
return data_files  | 
|
49  | 
||
50  | 
def _nautilus_plugin(self):  | 
|
51  | 
files = []  | 
|
52  | 
if sys.platform[:5] == 'linux':  | 
|
53  | 
cmd = os.popen('pkg-config --variable=pythondir nautilus-python', 'r')  | 
|
54  | 
res = cmd.readline()  | 
|
55  | 
ret = cmd.close()  | 
|
56  | 
||
57  | 
if ret is None:  | 
|
58  | 
dest = res[5:]  | 
|
59  | 
files.append((dest, ['nautilus-bzr.py']))  | 
|
60  | 
||
61  | 
return files  | 
|
| 
83
by Jelmer Vernooij
 Merge Olive code.  | 
62  | 
|
63  | 
||
64  | 
setup(  | 
|
| 
91.1.10
by Jelmer Vernooij
 Fix name for bzr-gtk (closes: #67933), update version number.  | 
65  | 
name = "bzr-gtk",  | 
| 
272
by Jelmer Vernooij
 Start working on 0.91 version.  | 
66  | 
version = "0.91.0",  | 
| 
83
by Jelmer Vernooij
 Merge Olive code.  | 
67  | 
maintainer = "Jelmer Vernooij",  | 
68  | 
maintainer_email = "jelmer@samba.org",  | 
|
69  | 
description = "GTK+ Frontends for various Bazaar commands",  | 
|
70  | 
license = "GNU GPL v2",  | 
|
71  | 
scripts=['olive-gtk'],  | 
|
72  | 
package_dir = {  | 
|
73  | 
"bzrlib.plugins.gtk": ".",  | 
|
74  | 
"bzrlib.plugins.gtk.viz": "viz",  | 
|
| 
66.2.13
by Jelmer Vernooij
 Install olive.  | 
75  | 
"bzrlib.plugins.gtk.annotate": "annotate",  | 
| 
126.1.34
by Szilveszter Farkas (Phanatic)
 Install test suite.  | 
76  | 
"bzrlib.plugins.gtk.olive": "olive",  | 
77  | 
"bzrlib.plugins.gtk.tests": "tests"  | 
|
| 
83
by Jelmer Vernooij
 Merge Olive code.  | 
78  | 
        },
 | 
79  | 
packages = [  | 
|
| 
195.6.4
by Szilveszter Farkas (Phanatic)
 The Windows drive selector was moved to the location bar.  | 
80  | 
"olive",  | 
| 
83
by Jelmer Vernooij
 Merge Olive code.  | 
81  | 
"bzrlib.plugins.gtk",  | 
82  | 
"bzrlib.plugins.gtk.viz",  | 
|
| 
66.2.13
by Jelmer Vernooij
 Install olive.  | 
83  | 
"bzrlib.plugins.gtk.annotate",  | 
| 
126.1.34
by Szilveszter Farkas (Phanatic)
 Install test suite.  | 
84  | 
"bzrlib.plugins.gtk.olive",  | 
85  | 
        "bzrlib.plugins.gtk.tests"
 | 
|
| 
83
by Jelmer Vernooij
 Merge Olive code.  | 
86  | 
        ],
 | 
| 
195.6.4
by Szilveszter Farkas (Phanatic)
 The Windows drive selector was moved to the location bar.  | 
87  | 
data_files=[('share/olive', ['olive.glade',  | 
88  | 
'cmenu.ui',  | 
|
89  | 
                                ]),
 | 
|
| 
254.2.1
by Gary van der Merwe
 Make icon locations consistant between source and installed version. Let glade nkow where to find the icons with a project file.  | 
90  | 
('share/olive/icons', ['icons/commit.png',  | 
| 
195.6.4
by Szilveszter Farkas (Phanatic)
 The Windows drive selector was moved to the location bar.  | 
91  | 
'icons/commit16.png',  | 
92  | 
'icons/diff.png',  | 
|
93  | 
'icons/diff16.png',  | 
|
94  | 
'icons/log.png',  | 
|
95  | 
'icons/log16.png',  | 
|
96  | 
'icons/pull.png',  | 
|
97  | 
'icons/pull16.png',  | 
|
98  | 
'icons/push.png',  | 
|
99  | 
'icons/push16.png',  | 
|
| 
254.2.1
by Gary van der Merwe
 Make icon locations consistant between source and installed version. Let glade nkow where to find the icons with a project file.  | 
100  | 
'icons/refresh.png',  | 
101  | 
'icons/oliveicon2.png']),  | 
|
| 
224
by Jelmer Vernooij
 Install all desktop files.  | 
102  | 
('share/applications', ['olive-gtk.desktop',  | 
103  | 
'bazaar-properties.desktop',  | 
|
104  | 
'bzr-notify.desktop']),  | 
|
| 
195.6.4
by Szilveszter Farkas (Phanatic)
 The Windows drive selector was moved to the location bar.  | 
105  | 
('share/pixmaps', ['icons/olive-gtk.png'])  | 
106  | 
               ],
 | 
|
107  | 
cmdclass={'install_data': InstallData}  | 
|
| 
83
by Jelmer Vernooij
 Merge Olive code.  | 
108  | 
)
 |