Mercurial > libervia-backend
annotate setup.py @ 237:aae816738314
distutils: added urwid-satext dependency, and gobject in preinstall_check
author | Goffi <goffi@goffi.org> |
---|---|
date | Tue, 11 Jan 2011 19:15:23 +0100 |
parents | 7a2ef5fe4e8d |
children | 83d2bc0abf2a |
rev | line source |
---|---|
225 | 1 #!/usr/bin/env python |
2 # -*- coding: utf-8 -*- | |
3 | |
230
b25cbec73c1e
distutils: removes build and dist from manifest's prune
Goffi <goffi@goffi.org>
parents:
227
diff
changeset
|
4 from distribute_setup import use_setuptools |
b25cbec73c1e
distutils: removes build and dist from manifest's prune
Goffi <goffi@goffi.org>
parents:
227
diff
changeset
|
5 use_setuptools() |
b25cbec73c1e
distutils: removes build and dist from manifest's prune
Goffi <goffi@goffi.org>
parents:
227
diff
changeset
|
6 from setuptools.command.install import install |
b25cbec73c1e
distutils: removes build and dist from manifest's prune
Goffi <goffi@goffi.org>
parents:
227
diff
changeset
|
7 from setuptools import setup |
225 | 8 from distutils.file_util import copy_file |
9 import os,sys,subprocess | |
10 from stat import ST_MODE | |
11 from glob import glob | |
12 | |
13 NAME = 'sat' | |
14 LAUNCH_DAEMON_COMMAND = 'sat' | |
15 | |
232
0cd5b3c4513f
Distutils: added custom wokkel checking/building
Goffi <goffi@goffi.org>
parents:
230
diff
changeset
|
16 class MercurialException(Exception): |
0cd5b3c4513f
Distutils: added custom wokkel checking/building
Goffi <goffi@goffi.org>
parents:
230
diff
changeset
|
17 pass |
225 | 18 |
235
7a2ef5fe4e8d
distutils: added preinstall_check hack + some tuning while testing
Goffi <goffi@goffi.org>
parents:
233
diff
changeset
|
19 def module_installed(module_name): |
7a2ef5fe4e8d
distutils: added preinstall_check hack + some tuning while testing
Goffi <goffi@goffi.org>
parents:
233
diff
changeset
|
20 """Try to import muc from custom wokkel build |
7a2ef5fe4e8d
distutils: added preinstall_check hack + some tuning while testing
Goffi <goffi@goffi.org>
parents:
233
diff
changeset
|
21 @param module_name: name of the module to test |
7a2ef5fe4e8d
distutils: added preinstall_check hack + some tuning while testing
Goffi <goffi@goffi.org>
parents:
233
diff
changeset
|
22 @return: True if successful""" |
7a2ef5fe4e8d
distutils: added preinstall_check hack + some tuning while testing
Goffi <goffi@goffi.org>
parents:
233
diff
changeset
|
23 try: |
7a2ef5fe4e8d
distutils: added preinstall_check hack + some tuning while testing
Goffi <goffi@goffi.org>
parents:
233
diff
changeset
|
24 __import__(module_name) |
7a2ef5fe4e8d
distutils: added preinstall_check hack + some tuning while testing
Goffi <goffi@goffi.org>
parents:
233
diff
changeset
|
25 except: |
7a2ef5fe4e8d
distutils: added preinstall_check hack + some tuning while testing
Goffi <goffi@goffi.org>
parents:
233
diff
changeset
|
26 return False |
7a2ef5fe4e8d
distutils: added preinstall_check hack + some tuning while testing
Goffi <goffi@goffi.org>
parents:
233
diff
changeset
|
27 return True |
7a2ef5fe4e8d
distutils: added preinstall_check hack + some tuning while testing
Goffi <goffi@goffi.org>
parents:
233
diff
changeset
|
28 |
225 | 29 class custom_install(install): |
30 | |
31 def custom_auto_options(self): | |
32 """Change options for twistd in the shell script | |
33 Mainly change the paths""" | |
34 sh_buffer = "" | |
35 run_dir = os.path.dirname(self.sh_script_path) | |
36 with open(self.sh_script_path,'r') as sh_file: | |
37 for ori_line in sh_file: | |
38 if ori_line.startswith('DAEMON='): | |
39 dest_line = 'DAEMON=""\n' #we want to launch sat as a daemon | |
40 elif ori_line.startswith('TAP_PATH='): | |
41 dest_line = 'TAP_PATH="%s/"\n' % run_dir | |
42 else: | |
43 dest_line = ori_line | |
44 sh_buffer += dest_line | |
45 | |
46 with open(self.sh_script_path,'w') as sh_file: | |
47 sh_file.write(sh_buffer) | |
48 | |
49 | |
50 def custom_create_links(self): | |
51 """Create symbolic links to executables""" | |
52 #the script which launch the daemon | |
53 links = [(self.sh_script_path,LAUNCH_DAEMON_COMMAND),] | |
54 for source,dest in links: | |
55 dest_name, copied = copy_file(source, os.path.join(self.install_scripts, dest), link='sym') | |
56 assert (copied) | |
57 #we change the perm in the same way as in the original install_scripts | |
58 mode = ((os.stat(dest_name)[ST_MODE]) | 0555) & 07777 | |
59 os.chmod(dest_name, mode) | |
60 | |
232
0cd5b3c4513f
Distutils: added custom wokkel checking/building
Goffi <goffi@goffi.org>
parents:
230
diff
changeset
|
61 |
0cd5b3c4513f
Distutils: added custom wokkel checking/building
Goffi <goffi@goffi.org>
parents:
230
diff
changeset
|
62 def custom_wokkel_requirement(self): |
0cd5b3c4513f
Distutils: added custom wokkel checking/building
Goffi <goffi@goffi.org>
parents:
230
diff
changeset
|
63 """Test if the custom wokkel is present, else get and build it""" |
235
7a2ef5fe4e8d
distutils: added preinstall_check hack + some tuning while testing
Goffi <goffi@goffi.org>
parents:
233
diff
changeset
|
64 if not module_installed('wokkel.muc'): |
7a2ef5fe4e8d
distutils: added preinstall_check hack + some tuning while testing
Goffi <goffi@goffi.org>
parents:
233
diff
changeset
|
65 sys.stdout.write ('Custom wokkel is not present, building it\n') |
232
0cd5b3c4513f
Distutils: added custom wokkel checking/building
Goffi <goffi@goffi.org>
parents:
230
diff
changeset
|
66 import tempfile |
0cd5b3c4513f
Distutils: added custom wokkel checking/building
Goffi <goffi@goffi.org>
parents:
230
diff
changeset
|
67 ori_path = os.getcwd() |
0cd5b3c4513f
Distutils: added custom wokkel checking/building
Goffi <goffi@goffi.org>
parents:
230
diff
changeset
|
68 work_path = tempfile.mkdtemp() |
0cd5b3c4513f
Distutils: added custom wokkel checking/building
Goffi <goffi@goffi.org>
parents:
230
diff
changeset
|
69 os.chdir(work_path) |
235
7a2ef5fe4e8d
distutils: added preinstall_check hack + some tuning while testing
Goffi <goffi@goffi.org>
parents:
233
diff
changeset
|
70 hg_path = subprocess.Popen('which hg', stdout=subprocess.PIPE, shell=True).communicate()[0][:-1] |
232
0cd5b3c4513f
Distutils: added custom wokkel checking/building
Goffi <goffi@goffi.org>
parents:
230
diff
changeset
|
71 #we are now in a temp dir, we can get the repositories |
235
7a2ef5fe4e8d
distutils: added preinstall_check hack + some tuning while testing
Goffi <goffi@goffi.org>
parents:
233
diff
changeset
|
72 commands = ['%s clone http://hg.ik.nu/wokkel wokkel' % hg_path, |
232
0cd5b3c4513f
Distutils: added custom wokkel checking/building
Goffi <goffi@goffi.org>
parents:
230
diff
changeset
|
73 'cd wokkel', |
235
7a2ef5fe4e8d
distutils: added preinstall_check hack + some tuning while testing
Goffi <goffi@goffi.org>
parents:
233
diff
changeset
|
74 '%s pull -f http://hg.ik.nu/ralphm/wokkel-muc-client-support-24-2' % hg_path, |
7a2ef5fe4e8d
distutils: added preinstall_check hack + some tuning while testing
Goffi <goffi@goffi.org>
parents:
233
diff
changeset
|
75 '%s merge wokkel-muc-client-support-24' % hg_path, |
7a2ef5fe4e8d
distutils: added preinstall_check hack + some tuning while testing
Goffi <goffi@goffi.org>
parents:
233
diff
changeset
|
76 '%s commit -u "SàT installation script" -m "Merged wokkel\'s MUC branch"' % hg_path, |
232
0cd5b3c4513f
Distutils: added custom wokkel checking/building
Goffi <goffi@goffi.org>
parents:
230
diff
changeset
|
77 '%s setup.py install' % sys.executable] |
0cd5b3c4513f
Distutils: added custom wokkel checking/building
Goffi <goffi@goffi.org>
parents:
230
diff
changeset
|
78 for command in commands: |
233
6a37bc1b0b8c
distutils: fixed custom wokkel building
Goffi <goffi@goffi.org>
parents:
232
diff
changeset
|
79 if command.startswith('cd '): |
6a37bc1b0b8c
distutils: fixed custom wokkel building
Goffi <goffi@goffi.org>
parents:
232
diff
changeset
|
80 os.chdir(command[3:]) |
6a37bc1b0b8c
distutils: fixed custom wokkel building
Goffi <goffi@goffi.org>
parents:
232
diff
changeset
|
81 else: |
6a37bc1b0b8c
distutils: fixed custom wokkel building
Goffi <goffi@goffi.org>
parents:
232
diff
changeset
|
82 ret = subprocess.call(command, stdout=open('/dev/null', 'w'), shell=True) |
6a37bc1b0b8c
distutils: fixed custom wokkel building
Goffi <goffi@goffi.org>
parents:
232
diff
changeset
|
83 if ret!=0: |
6a37bc1b0b8c
distutils: fixed custom wokkel building
Goffi <goffi@goffi.org>
parents:
232
diff
changeset
|
84 os.chdir(ori_path) |
235
7a2ef5fe4e8d
distutils: added preinstall_check hack + some tuning while testing
Goffi <goffi@goffi.org>
parents:
233
diff
changeset
|
85 sys.stderr.write ("ERROR while building/installing custom wokkel\n") |
7a2ef5fe4e8d
distutils: added preinstall_check hack + some tuning while testing
Goffi <goffi@goffi.org>
parents:
233
diff
changeset
|
86 sys.stderr.write ('Error happened when executing [%s]\n' % command) |
7a2ef5fe4e8d
distutils: added preinstall_check hack + some tuning while testing
Goffi <goffi@goffi.org>
parents:
233
diff
changeset
|
87 sys.stderr.write ('tmpdir is [%s]\n' % work_path) |
233
6a37bc1b0b8c
distutils: fixed custom wokkel building
Goffi <goffi@goffi.org>
parents:
232
diff
changeset
|
88 raise MercurialException |
232
0cd5b3c4513f
Distutils: added custom wokkel checking/building
Goffi <goffi@goffi.org>
parents:
230
diff
changeset
|
89 os.chdir(ori_path) |
235
7a2ef5fe4e8d
distutils: added preinstall_check hack + some tuning while testing
Goffi <goffi@goffi.org>
parents:
233
diff
changeset
|
90 sys.stdout.write ("Custom wokkel builded and installed, removing temporary files\n") |
232
0cd5b3c4513f
Distutils: added custom wokkel checking/building
Goffi <goffi@goffi.org>
parents:
230
diff
changeset
|
91 import shutil |
0cd5b3c4513f
Distutils: added custom wokkel checking/building
Goffi <goffi@goffi.org>
parents:
230
diff
changeset
|
92 shutil.rmtree(work_path) |
235
7a2ef5fe4e8d
distutils: added preinstall_check hack + some tuning while testing
Goffi <goffi@goffi.org>
parents:
233
diff
changeset
|
93 sys.stdout.write ("done\n") |
232
0cd5b3c4513f
Distutils: added custom wokkel checking/building
Goffi <goffi@goffi.org>
parents:
230
diff
changeset
|
94 else: |
235
7a2ef5fe4e8d
distutils: added preinstall_check hack + some tuning while testing
Goffi <goffi@goffi.org>
parents:
233
diff
changeset
|
95 sys.stdout.write ("Custom wokkel already installed\n") |
232
0cd5b3c4513f
Distutils: added custom wokkel checking/building
Goffi <goffi@goffi.org>
parents:
230
diff
changeset
|
96 |
0cd5b3c4513f
Distutils: added custom wokkel checking/building
Goffi <goffi@goffi.org>
parents:
230
diff
changeset
|
97 |
225 | 98 def run(self): |
99 install.run(self) | |
235
7a2ef5fe4e8d
distutils: added preinstall_check hack + some tuning while testing
Goffi <goffi@goffi.org>
parents:
233
diff
changeset
|
100 sys.stdout.write ('running post installation stuff\n') |
225 | 101 self.sh_script_path = os.path.join(self.install_lib,'sat','sat.sh') |
102 self.primitivus_path = os.path.join(self.install_lib,'sat_frontends','primitivus') | |
103 self.custom_auto_options() | |
104 self.custom_create_links() | |
232
0cd5b3c4513f
Distutils: added custom wokkel checking/building
Goffi <goffi@goffi.org>
parents:
230
diff
changeset
|
105 self.custom_wokkel_requirement() |
225 | 106 |
107 | |
235
7a2ef5fe4e8d
distutils: added preinstall_check hack + some tuning while testing
Goffi <goffi@goffi.org>
parents:
233
diff
changeset
|
108 def preinstall_check(): |
7a2ef5fe4e8d
distutils: added preinstall_check hack + some tuning while testing
Goffi <goffi@goffi.org>
parents:
233
diff
changeset
|
109 """Check presence of problematic dependencies, and try to install them with package manager |
7a2ef5fe4e8d
distutils: added preinstall_check hack + some tuning while testing
Goffi <goffi@goffi.org>
parents:
233
diff
changeset
|
110 This ugly stuff is necessary as distributions are not installed correctly with setuptools/distribute |
7a2ef5fe4e8d
distutils: added preinstall_check hack + some tuning while testing
Goffi <goffi@goffi.org>
parents:
233
diff
changeset
|
111 Hope to remove this at some point""" |
7a2ef5fe4e8d
distutils: added preinstall_check hack + some tuning while testing
Goffi <goffi@goffi.org>
parents:
233
diff
changeset
|
112 |
7a2ef5fe4e8d
distutils: added preinstall_check hack + some tuning while testing
Goffi <goffi@goffi.org>
parents:
233
diff
changeset
|
113 #modules_tocheck=['twisted', 'twisted.words', 'twisted.web', 'wx', 'urwid'] |
237
aae816738314
distutils: added urwid-satext dependency, and gobject in preinstall_check
Goffi <goffi@goffi.org>
parents:
235
diff
changeset
|
114 modules_tocheck=['wx','gobject'] #XXX: wx is the only one to be really difficult to install, python-gobject is not up-to-date in PyPi |
235
7a2ef5fe4e8d
distutils: added preinstall_check hack + some tuning while testing
Goffi <goffi@goffi.org>
parents:
233
diff
changeset
|
115 |
7a2ef5fe4e8d
distutils: added preinstall_check hack + some tuning while testing
Goffi <goffi@goffi.org>
parents:
233
diff
changeset
|
116 package = {'twisted':'python-twisted-core', |
7a2ef5fe4e8d
distutils: added preinstall_check hack + some tuning while testing
Goffi <goffi@goffi.org>
parents:
233
diff
changeset
|
117 'twisted.words':'python-twisted-words', |
7a2ef5fe4e8d
distutils: added preinstall_check hack + some tuning while testing
Goffi <goffi@goffi.org>
parents:
233
diff
changeset
|
118 'twisted.web':'python-twisted-web', |
7a2ef5fe4e8d
distutils: added preinstall_check hack + some tuning while testing
Goffi <goffi@goffi.org>
parents:
233
diff
changeset
|
119 'wx':'python-wxgtk2.8', |
7a2ef5fe4e8d
distutils: added preinstall_check hack + some tuning while testing
Goffi <goffi@goffi.org>
parents:
233
diff
changeset
|
120 'urwid':'python-urwid', |
237
aae816738314
distutils: added urwid-satext dependency, and gobject in preinstall_check
Goffi <goffi@goffi.org>
parents:
235
diff
changeset
|
121 'gobject':'python-gobject', |
235
7a2ef5fe4e8d
distutils: added preinstall_check hack + some tuning while testing
Goffi <goffi@goffi.org>
parents:
233
diff
changeset
|
122 'mercurial':'mercurial'} #this dict map dependencies to packages names for debian distributions |
7a2ef5fe4e8d
distutils: added preinstall_check hack + some tuning while testing
Goffi <goffi@goffi.org>
parents:
233
diff
changeset
|
123 |
7a2ef5fe4e8d
distutils: added preinstall_check hack + some tuning while testing
Goffi <goffi@goffi.org>
parents:
233
diff
changeset
|
124 sys.stdout.write ("Running pre-installation dependencies check\n") |
7a2ef5fe4e8d
distutils: added preinstall_check hack + some tuning while testing
Goffi <goffi@goffi.org>
parents:
233
diff
changeset
|
125 |
7a2ef5fe4e8d
distutils: added preinstall_check hack + some tuning while testing
Goffi <goffi@goffi.org>
parents:
233
diff
changeset
|
126 #which modules are not installed ? |
7a2ef5fe4e8d
distutils: added preinstall_check hack + some tuning while testing
Goffi <goffi@goffi.org>
parents:
233
diff
changeset
|
127 modules_toinstall = filter(lambda mod:not module_installed(mod),modules_tocheck) |
7a2ef5fe4e8d
distutils: added preinstall_check hack + some tuning while testing
Goffi <goffi@goffi.org>
parents:
233
diff
changeset
|
128 """#is mercurial available ? |
7a2ef5fe4e8d
distutils: added preinstall_check hack + some tuning while testing
Goffi <goffi@goffi.org>
parents:
233
diff
changeset
|
129 hg_installed = subprocess.call('which hg', stdout=open('/dev/null', 'w'), shell=True) == 0 |
7a2ef5fe4e8d
distutils: added preinstall_check hack + some tuning while testing
Goffi <goffi@goffi.org>
parents:
233
diff
changeset
|
130 if not hg_installed: |
7a2ef5fe4e8d
distutils: added preinstall_check hack + some tuning while testing
Goffi <goffi@goffi.org>
parents:
233
diff
changeset
|
131 modules_toinstall.append('mercurial')""" #hg can be installed from pypi |
7a2ef5fe4e8d
distutils: added preinstall_check hack + some tuning while testing
Goffi <goffi@goffi.org>
parents:
233
diff
changeset
|
132 |
7a2ef5fe4e8d
distutils: added preinstall_check hack + some tuning while testing
Goffi <goffi@goffi.org>
parents:
233
diff
changeset
|
133 if modules_toinstall: |
7a2ef5fe4e8d
distutils: added preinstall_check hack + some tuning while testing
Goffi <goffi@goffi.org>
parents:
233
diff
changeset
|
134 #are we on a distribution using apt ? |
7a2ef5fe4e8d
distutils: added preinstall_check hack + some tuning while testing
Goffi <goffi@goffi.org>
parents:
233
diff
changeset
|
135 apt_path = subprocess.Popen('which apt-get', stdout=subprocess.PIPE, shell=True).communicate()[0][:-1] |
7a2ef5fe4e8d
distutils: added preinstall_check hack + some tuning while testing
Goffi <goffi@goffi.org>
parents:
233
diff
changeset
|
136 not_installed=set() |
7a2ef5fe4e8d
distutils: added preinstall_check hack + some tuning while testing
Goffi <goffi@goffi.org>
parents:
233
diff
changeset
|
137 if apt_path: |
7a2ef5fe4e8d
distutils: added preinstall_check hack + some tuning while testing
Goffi <goffi@goffi.org>
parents:
233
diff
changeset
|
138 #we have apt, we'll try to use it |
7a2ef5fe4e8d
distutils: added preinstall_check hack + some tuning while testing
Goffi <goffi@goffi.org>
parents:
233
diff
changeset
|
139 for module_name in modules_toinstall: |
7a2ef5fe4e8d
distutils: added preinstall_check hack + some tuning while testing
Goffi <goffi@goffi.org>
parents:
233
diff
changeset
|
140 package_name = package[module_name] |
7a2ef5fe4e8d
distutils: added preinstall_check hack + some tuning while testing
Goffi <goffi@goffi.org>
parents:
233
diff
changeset
|
141 sys.stdout.write ("Installing %s\n" % package_name) |
7a2ef5fe4e8d
distutils: added preinstall_check hack + some tuning while testing
Goffi <goffi@goffi.org>
parents:
233
diff
changeset
|
142 success = subprocess.call('%s -qy install %s' % (apt_path,package_name), shell=True) == 0 |
7a2ef5fe4e8d
distutils: added preinstall_check hack + some tuning while testing
Goffi <goffi@goffi.org>
parents:
233
diff
changeset
|
143 if not success: |
7a2ef5fe4e8d
distutils: added preinstall_check hack + some tuning while testing
Goffi <goffi@goffi.org>
parents:
233
diff
changeset
|
144 not_installed.add(module_name) |
7a2ef5fe4e8d
distutils: added preinstall_check hack + some tuning while testing
Goffi <goffi@goffi.org>
parents:
233
diff
changeset
|
145 else: |
7a2ef5fe4e8d
distutils: added preinstall_check hack + some tuning while testing
Goffi <goffi@goffi.org>
parents:
233
diff
changeset
|
146 not_installed=set(modules_toinstall) |
7a2ef5fe4e8d
distutils: added preinstall_check hack + some tuning while testing
Goffi <goffi@goffi.org>
parents:
233
diff
changeset
|
147 |
7a2ef5fe4e8d
distutils: added preinstall_check hack + some tuning while testing
Goffi <goffi@goffi.org>
parents:
233
diff
changeset
|
148 if not_installed: |
237
aae816738314
distutils: added urwid-satext dependency, and gobject in preinstall_check
Goffi <goffi@goffi.org>
parents:
235
diff
changeset
|
149 #some packages can't be automatically installed, we print their name for manual installation |
235
7a2ef5fe4e8d
distutils: added preinstall_check hack + some tuning while testing
Goffi <goffi@goffi.org>
parents:
233
diff
changeset
|
150 sys.stdout.write ("You should install the following dependencies with your distribution recommanded tool before installing %s:\n" % NAME) |
7a2ef5fe4e8d
distutils: added preinstall_check hack + some tuning while testing
Goffi <goffi@goffi.org>
parents:
233
diff
changeset
|
151 for module_name in not_installed: |
7a2ef5fe4e8d
distutils: added preinstall_check hack + some tuning while testing
Goffi <goffi@goffi.org>
parents:
233
diff
changeset
|
152 sys.stdout.write ("- %s (Debian name: %s)\n" % (module_name,package[module_name])) |
7a2ef5fe4e8d
distutils: added preinstall_check hack + some tuning while testing
Goffi <goffi@goffi.org>
parents:
233
diff
changeset
|
153 sys.exit(2) |
7a2ef5fe4e8d
distutils: added preinstall_check hack + some tuning while testing
Goffi <goffi@goffi.org>
parents:
233
diff
changeset
|
154 |
7a2ef5fe4e8d
distutils: added preinstall_check hack + some tuning while testing
Goffi <goffi@goffi.org>
parents:
233
diff
changeset
|
155 |
7a2ef5fe4e8d
distutils: added preinstall_check hack + some tuning while testing
Goffi <goffi@goffi.org>
parents:
233
diff
changeset
|
156 if sys.argv[1].lower() in ['egg_info','install']: |
237
aae816738314
distutils: added urwid-satext dependency, and gobject in preinstall_check
Goffi <goffi@goffi.org>
parents:
235
diff
changeset
|
157 #we only check dependencies if egg_info or install is used |
235
7a2ef5fe4e8d
distutils: added preinstall_check hack + some tuning while testing
Goffi <goffi@goffi.org>
parents:
233
diff
changeset
|
158 preinstall_check() |
225 | 159 |
160 setup(name=NAME, | |
161 version='0.1.0', | |
162 description=u'Salut à Toi multi-frontend XMPP client', | |
163 long_description=u'Salut à Toi (SàT) is a XMPP client based on a daemon/frontend architecture. You can use it with the desktop frontend (wix - WxPython based), console ui frontend (Primitivus, Urwid based), or command line frontend (jp), and others are coming. ', | |
164 author='Goffi (Jérôme Poisson)', | |
165 author_email='goffi@goffi.org', | |
166 url='http://wiki.goffi.org/wiki/Salut_%C3%A0_Toi', | |
167 classifiers=['Development Status :: 3 - Alpha', | |
168 'Environment :: Console', | |
169 'Environment :: X11 Applications :: GTK', | |
170 'Framework :: Twisted', | |
171 'License :: OSI Approved :: GNU General Public License (GPL)', | |
172 'Operating System :: POSIX :: Linux', | |
173 'Topic :: Communications :: Chat'], | |
174 package_dir = {'sat':'src', 'sat_frontends':'frontends/src'}, | |
175 packages=['sat','sat.tools','sat.bridge', 'sat.plugins', | |
176 'sat_frontends', 'sat_frontends.bridge', 'sat_frontends.quick_frontend', | |
227 | 177 'sat_frontends.primitivus', 'sat_frontends.wix'], |
178 package_data = {'sat': ['sat.tac','sat.sh'], | |
179 'sat_frontends': ['wix/COPYING','wix/images/*png','wix/images/cards/*','wix/images/crystal/*']}, | |
225 | 180 data_files=[(os.path.join(sys.prefix,'share/locale/fr/LC_MESSAGES'), ['i18n/fr/LC_MESSAGES/sat.mo']), |
181 (os.path.join(sys.prefix,'share/locale/fr/LC_MESSAGES'), ['frontends/i18n/fr/LC_MESSAGES/sat_frontend.mo']), | |
182 (os.path.join(sys.prefix,'share/locale/fr/LC_MESSAGES'), ['frontends/src/jp/i18n/fr/LC_MESSAGES/jp.mo']), | |
227 | 183 ('share/doc/%s' % NAME, ['CHANGELOG', 'COPYING', 'INSTALL', 'README', 'README4TRANSLATORS']), |
184 ('share/doc/%s/misc' % NAME, ['frontends/src/wix/images/split_card.sh']), | |
185 ], | |
186 scripts=['frontends/src/jp/jp', 'frontends/src/primitivus/primitivus', 'frontends/src/wix/wix'], | |
230
b25cbec73c1e
distutils: removes build and dist from manifest's prune
Goffi <goffi@goffi.org>
parents:
227
diff
changeset
|
187 zip_safe=False, |
237
aae816738314
distutils: added urwid-satext dependency, and gobject in preinstall_check
Goffi <goffi@goffi.org>
parents:
235
diff
changeset
|
188 dependency_links = ['http://ftp.goffi.org/urwid-satext/'], |
aae816738314
distutils: added urwid-satext dependency, and gobject in preinstall_check
Goffi <goffi@goffi.org>
parents:
235
diff
changeset
|
189 install_requires=['twisted', 'progressbar', 'urwid', 'beautifulsoup', 'mercurial', 'urwid-satext'], |
225 | 190 cmdclass=dict(install=custom_install), |
232
0cd5b3c4513f
Distutils: added custom wokkel checking/building
Goffi <goffi@goffi.org>
parents:
230
diff
changeset
|
191 ) #XXX: The Mercurial dependecy is just here to build the custom wokkel (with MUC branch), it must be removed |
0cd5b3c4513f
Distutils: added custom wokkel checking/building
Goffi <goffi@goffi.org>
parents:
230
diff
changeset
|
192 # and replace by wokkel as soon as MUC branch is officially available in wokkel main branch. |
235
7a2ef5fe4e8d
distutils: added preinstall_check hack + some tuning while testing
Goffi <goffi@goffi.org>
parents:
233
diff
changeset
|
193 # wxpython doesn't work, it's managed with preinstall_check |
7a2ef5fe4e8d
distutils: added preinstall_check hack + some tuning while testing
Goffi <goffi@goffi.org>
parents:
233
diff
changeset
|
194 |