1
by Siegfried-Angel Gevatter Pujals
Import upstream version 0.3.2 |
1 |
#! /usr/bin/env python
|
2 |
# -.- coding: utf-8 -.-
|
|
3 |
#
|
|
4 |
# GNOME Activity Journal - Installation script
|
|
5 |
#
|
|
6 |
# Copyright © 2009-2010 Siegfried Gevatter <siegfried@gevatter.com>
|
|
7 |
#
|
|
8 |
# This program 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 3 of the License, or
|
|
11 |
# (at your option) any later version.
|
|
12 |
#
|
|
13 |
# This program 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
|
|
1.1.1
by Siegfried-Angel Gevatter Pujals
Import upstream version 0.3.3 |
16 |
# GNU General Public License for more details.
|
1
by Siegfried-Angel Gevatter Pujals
Import upstream version 0.3.2 |
17 |
#
|
1.1.1
by Siegfried-Angel Gevatter Pujals
Import upstream version 0.3.3 |
18 |
# You should have received a copy of the GNU General Public License
|
1
by Siegfried-Angel Gevatter Pujals
Import upstream version 0.3.2 |
19 |
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
20 |
||
21 |
from __future__ import with_statement |
|
22 |
import os |
|
23 |
from glob import glob |
|
24 |
from distutils.core import setup |
|
25 |
from DistUtilsExtra.command import * |
|
26 |
||
1.1.1
by Siegfried-Angel Gevatter Pujals
Import upstream version 0.3.3 |
27 |
class _build_i18n(build_i18n.build_i18n): |
28 |
||
29 |
def run(self): |
|
30 |
# Generate POTFILES.in from POTFILES.in.in
|
|
31 |
if os.path.isfile("po/POTFILES.in.in"): |
|
32 |
lines = [] |
|
33 |
with open("po/POTFILES.in.in") as f: |
|
34 |
for line in f: |
|
35 |
lines.extend(glob(line.strip())) |
|
36 |
with open("po/POTFILES.in", "w") as f: |
|
37 |
f.write("\n".join(lines) + "\n") |
|
38 |
||
39 |
build_i18n.build_i18n.run(self) |
|
40 |
||
1
by Siegfried-Angel Gevatter Pujals
Import upstream version 0.3.2 |
41 |
def recursive_install(dst, directory, prefix=None, ext=None): |
42 |
l = [] |
|
43 |
this = [] |
|
44 |
for name in glob('%s/*' % directory): |
|
45 |
if os.path.isdir(name): |
|
46 |
l.extend(recursive_install(dst, name, os.path.join(prefix, |
|
47 |
os.path.basename(name)) if prefix is not None else None)) |
|
48 |
elif not ext or os.path.splitext(name)[1] in ext: |
|
49 |
this.append(name) |
|
50 |
l.append((os.path.join(dst, |
|
51 |
prefix if prefix is not None else directory), this)) |
|
52 |
return l |
|
53 |
||
54 |
def list_from_lists(*args): |
|
55 |
l = [] |
|
56 |
for arg in args: |
|
57 |
l.extend(arg) |
|
58 |
return l |
|
59 |
||
60 |
try: |
|
61 |
VERSION = [line for line in open('src/config.py') |
|
62 |
if line.startswith('VERSION')][0].split('"')[1] |
|
63 |
except (IOError, IndexError): |
|
64 |
VERSION = 'unknown' |
|
65 |
||
66 |
setup( |
|
67 |
name = 'gnome-activity-journal', |
|
68 |
version = VERSION, |
|
69 |
description = 'GUI to browse and search your Zeitgeist activities', |
|
70 |
long_description = \ |
|
71 |
'GNOME Activity Journal is a tool for easily browsing and finding '\
|
|
72 |
'files on your computer. It shows a chronological journal of all '\
|
|
73 |
'file activity and supports full-text search through Tracker.', |
|
74 |
author = 'GNOME Activity Journal Developers', |
|
75 |
author_email = 'zeitgeist@lists.launchpad.net', |
|
76 |
url = 'https://launchpad.net/gnome-activity-journal', |
|
77 |
license = 'GPLv3+', |
|
78 |
platforms = ['GNU/Linux'], |
|
79 |
data_files = list_from_lists( |
|
1.1.2
by Siegfried-Angel Gevatter Pujals
Import upstream version 0.3.4.1+bzr20100718 |
80 |
[('bin/', ['gnome-activity-journal'])], |
1.1.1
by Siegfried-Angel Gevatter Pujals
Import upstream version 0.3.3 |
81 |
[('share/gnome-activity-journal/data', glob('data/*.svg'))], |
1.1.2
by Siegfried-Angel Gevatter Pujals
Import upstream version 0.3.4.1+bzr20100718 |
82 |
[('share/gnome-activity-journal/data', glob('data/*.png'))], |
3
by Siegfried-Angel Gevatter Pujals
* New upstream release: |
83 |
[('share/gnome-activity-journal/data/zlogo', glob('data/zlogo/*.png'))], |
1.1.1
by Siegfried-Angel Gevatter Pujals
Import upstream version 0.3.3 |
84 |
[('share/pixmaps/', ['data/gnome-activity-journal.xpm'])], |
1
by Siegfried-Angel Gevatter Pujals
Import upstream version 0.3.2 |
85 |
recursive_install('share/icons/hicolor', 'data/icons/hicolor/', '', |
86 |
ext=['.png', '.svg']), |
|
87 |
recursive_install('share/gnome-activity-journal', 'src/', ext=['.py']), |
|
88 |
[('share/man/man1/', ['extra/gnome-activity-journal.1'])], |
|
89 |
[('share/gnome-activity-journal/fungtk', glob('fungtk/*.py'))], |
|
90 |
),
|
|
91 |
cmdclass = { |
|
92 |
'build': build_extra.build_extra, |
|
1.1.1
by Siegfried-Angel Gevatter Pujals
Import upstream version 0.3.3 |
93 |
'build_i18n': _build_i18n, |
1
by Siegfried-Angel Gevatter Pujals
Import upstream version 0.3.2 |
94 |
#'build_help': build_help.build_help,
|
95 |
#'build_icons': build_icons.build_icons,
|
|
96 |
},
|
|
97 |
classifiers = [ |
|
98 |
# http://pypi.python.org/pypi?%3Aaction=list_classifiers
|
|
99 |
'License :: OSI-Approved :: GNU General Public License (GPL)', |
|
100 |
'Intended Audience :: End Users/Desktop', |
|
101 |
'Development Status :: 3 - Alpha', |
|
102 |
'Programming Language :: Python', |
|
103 |
'Environment :: X11 Applications :: GTK', |
|
104 |
]
|
|
105 |
)
|