Merge lp:~nataliabidart/magicicada-client/snapping into lp:magicicada-client
- snapping
- Merge into trunk
Proposed by
Natalia Bidart
Status: | Work in progress |
---|---|
Proposed branch: | lp:~nataliabidart/magicicada-client/snapping |
Merge into: | lp:magicicada-client |
Diff against target: |
526 lines (+69/-363) 11 files modified
.snapcraft.yaml (+33/-0) HACKING (+1/-1) data/com.ubuntuone.SyncDaemon.service.in (+0/-1) data/logging.conf.in (+0/-13) data/source_ubuntuone-client.py (+0/-61) data/syncdaemon.conf (+1/-2) data/ubuntuone-client-crashdb.conf (+0/-5) dependencies.txt (+1/-1) setup.py (+24/-250) ubuntuone-client.pth (+0/-1) ubuntuone/platform/os_helper/linux.py (+9/-28) |
To merge this branch: | bzr merge lp:~nataliabidart/magicicada-client/snapping |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
chicharreros | Pending | ||
Review via email:
|
Commit message
- Initial work on snapping the client.
Description of the change
To post a comment you must log in.
- 1431. By Natalia Bidart
-
Debugging.
Unmerged revisions
- 1431. By Natalia Bidart
-
Debugging.
- 1430. By Natalia Bidart
-
Initial work on snapping the client.
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === added file '.snapcraft.yaml' | |||
2 | --- .snapcraft.yaml 1970-01-01 00:00:00 +0000 | |||
3 | +++ .snapcraft.yaml 2016-09-02 00:06:46 +0000 | |||
4 | @@ -0,0 +1,33 @@ | |||
5 | 1 | name: magicicada-client | ||
6 | 2 | version: 0.1 | ||
7 | 3 | summary: The client for the Magicicada filesync service (ex-Ubuntu One). | ||
8 | 4 | description: Magicicada is an open source fork of the original Ubuntu One filesync service. | ||
9 | 5 | confinement: devmode | ||
10 | 6 | |||
11 | 7 | apps: | ||
12 | 8 | syncdaemon: | ||
13 | 9 | command: ./bin/ubuntuone-syncdaemon | ||
14 | 10 | daemon: simple | ||
15 | 11 | |||
16 | 12 | parts: | ||
17 | 13 | magicicada-protocol: | ||
18 | 14 | plugin: python2 | ||
19 | 15 | source: lp:magicicada-protocol | ||
20 | 16 | build-packages: | ||
21 | 17 | - protobuf-compiler | ||
22 | 18 | magicicada-client: | ||
23 | 19 | plugin: python2 | ||
24 | 20 | source: . | ||
25 | 21 | stage-packages: | ||
26 | 22 | - gir1.2-notify-0.7 | ||
27 | 23 | - gir1.2-soup-2.4 | ||
28 | 24 | - python-configglue | ||
29 | 25 | - python-dirspec | ||
30 | 26 | - python-distutils-extra | ||
31 | 27 | - python-gi | ||
32 | 28 | - python-httplib2 | ||
33 | 29 | - python-protobuf | ||
34 | 30 | - python-pyinotify | ||
35 | 31 | - python-qt4-dbus | ||
36 | 32 | - python-qt4reactor | ||
37 | 33 | - python-twisted | ||
38 | 0 | 34 | ||
39 | === modified file 'HACKING' | |||
40 | --- HACKING 2015-09-29 21:05:26 +0000 | |||
41 | +++ HACKING 2016-09-02 00:06:46 +0000 | |||
42 | @@ -5,7 +5,7 @@ | |||
43 | 5 | 5 | ||
44 | 6 | Or you can simply bootstrap and everything will happen automagically: | 6 | Or you can simply bootstrap and everything will happen automagically: |
45 | 7 | 7 | ||
47 | 8 | $: make boostrap | 8 | $: make bootstrap |
48 | 9 | 9 | ||
49 | 10 | After configuring, in order to run the tests, all you need to do is run | 10 | After configuring, in order to run the tests, all you need to do is run |
50 | 11 | make check. | 11 | make check. |
51 | 12 | 12 | ||
52 | === modified file 'data/com.ubuntuone.SyncDaemon.service.in' | |||
53 | --- data/com.ubuntuone.SyncDaemon.service.in 2009-06-17 16:08:17 +0000 | |||
54 | +++ data/com.ubuntuone.SyncDaemon.service.in 2016-09-02 00:06:46 +0000 | |||
55 | @@ -1,4 +1,3 @@ | |||
56 | 1 | [D-BUS Service] | 1 | [D-BUS Service] |
57 | 2 | Name=com.ubuntuone.SyncDaemon | 2 | Name=com.ubuntuone.SyncDaemon |
58 | 3 | Exec=@libexecdir@/ubuntuone-syncdaemon | 3 | Exec=@libexecdir@/ubuntuone-syncdaemon |
59 | 4 | |||
60 | 5 | 4 | ||
61 | === removed file 'data/logging.conf.in' | |||
62 | --- data/logging.conf.in 2009-12-23 22:05:44 +0000 | |||
63 | +++ data/logging.conf.in 1970-01-01 00:00:00 +0000 | |||
64 | @@ -1,13 +0,0 @@ | |||
65 | 1 | [logging] | ||
66 | 2 | level.default = @LOG_LEVEL@ | ||
67 | 3 | level.parser = log_level | ||
68 | 4 | level.help = Set the log level (TRACE, DEBUG, INFO, WARNING, ERROR, NOTE | ||
69 | 5 | CRITICAL, FATAL) | ||
70 | 6 | |||
71 | 7 | file_size.default = @LOG_FILE_SIZE@ | ||
72 | 8 | file_size.parser = int | ||
73 | 9 | file_size.help = max file size (the file will be rotated) | ||
74 | 10 | |||
75 | 11 | backup_count.default = 5 | ||
76 | 12 | backup_count.parser = int | ||
77 | 13 | backup_count.help = number of rotated log files to keep around. | ||
78 | 14 | 0 | ||
79 | === removed file 'data/source_ubuntuone-client.py' | |||
80 | --- data/source_ubuntuone-client.py 2013-01-31 20:35:21 +0000 | |||
81 | +++ data/source_ubuntuone-client.py 1970-01-01 00:00:00 +0000 | |||
82 | @@ -1,61 +0,0 @@ | |||
83 | 1 | # Copyright 2009-2013 Canonical Ltd. | ||
84 | 2 | # | ||
85 | 3 | # This program is free software: you can redistribute it and/or modify it | ||
86 | 4 | # under the terms of the GNU General Public License version 3, as published | ||
87 | 5 | # by the Free Software Foundation. | ||
88 | 6 | # | ||
89 | 7 | # This program is distributed in the hope that it will be useful, but | ||
90 | 8 | # WITHOUT ANY WARRANTY; without even the implied warranties of | ||
91 | 9 | # MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR | ||
92 | 10 | # PURPOSE. See the GNU General Public License for more details. | ||
93 | 11 | # | ||
94 | 12 | # You should have received a copy of the GNU General Public License along | ||
95 | 13 | # with this program. If not, see <http://www.gnu.org/licenses/>. | ||
96 | 14 | # | ||
97 | 15 | # In addition, as a special exception, the copyright holders give | ||
98 | 16 | # permission to link the code of portions of this program with the | ||
99 | 17 | # OpenSSL library under certain conditions as described in each | ||
100 | 18 | # individual source file, and distribute linked combinations | ||
101 | 19 | # including the two. | ||
102 | 20 | # You must obey the GNU General Public License in all respects | ||
103 | 21 | # for all of the code used other than OpenSSL. If you modify | ||
104 | 22 | # file(s) with this exception, you may extend this exception to your | ||
105 | 23 | # version of the file(s), but you are not obligated to do so. If you | ||
106 | 24 | # do not wish to do so, delete this exception statement from your | ||
107 | 25 | # version. If you delete this exception statement from all source | ||
108 | 26 | # files in the program, then also delete it here. | ||
109 | 27 | """Stub for Apport""" | ||
110 | 28 | |||
111 | 29 | from __future__ import print_function, unicode_literals | ||
112 | 30 | |||
113 | 31 | import apport | ||
114 | 32 | import os | ||
115 | 33 | |||
116 | 34 | from apport.hookutils import attach_file_if_exists | ||
117 | 35 | from dirspec.basedir import xdg_cache_home, xdg_config_home | ||
118 | 36 | |||
119 | 37 | # Paths where things we might want live | ||
120 | 38 | u1_log_path = os.path.join(xdg_cache_home, b"ubuntuone", b"log") | ||
121 | 39 | u1_user_config_path = os.path.join(xdg_config_home, b"ubuntuone") | ||
122 | 40 | # things we may want to collect for the report | ||
123 | 41 | u1_client_log = os.path.join(u1_log_path, b"syncdaemon.log") | ||
124 | 42 | u1_except_log = os.path.join(u1_log_path, b"syncdaemon-exceptions.log") | ||
125 | 43 | u1_invalidnames_log = os.path.join(u1_log_path, b"syncdaemon-invalid-names.log") | ||
126 | 44 | u1_sd_conf = os.path.join(b"etc", b"xdg", b"ubuntuone", b"syncdaemon.conf") | ||
127 | 45 | u1_usersd_conf = os.path.join(u1_user_config_path, b"syncdaemon.conf") | ||
128 | 46 | |||
129 | 47 | |||
130 | 48 | def add_info(report): | ||
131 | 49 | """add report info""" | ||
132 | 50 | attach_file_if_exists(report, u1_except_log, | ||
133 | 51 | "UbuntuOneSyncdaemonExceptionsLog") | ||
134 | 52 | attach_file_if_exists(report, u1_invalidnames_log, | ||
135 | 53 | "UbuntuOneSyncdaemonInvalidNamesLog") | ||
136 | 54 | attach_file_if_exists(report, u1_usersd_conf, | ||
137 | 55 | "UbuntuOneUserSyncdaemonConfig") | ||
138 | 56 | attach_file_if_exists(report, u1_sd_conf, | ||
139 | 57 | "UbuntuOneSyncdaemonConfig") | ||
140 | 58 | |||
141 | 59 | if not apport.packaging.is_distro_package(report['Package'].split()[0]): | ||
142 | 60 | report['ThirdParty'] = 'True' | ||
143 | 61 | report['CrashDB'] = 'ubuntuone' | ||
144 | 62 | 0 | ||
145 | === modified file 'data/syncdaemon.conf' | |||
146 | --- data/syncdaemon.conf 2015-09-29 02:25:44 +0000 | |||
147 | +++ data/syncdaemon.conf 2016-09-02 00:06:46 +0000 | |||
148 | @@ -52,8 +52,7 @@ | |||
149 | 52 | send_events_over_dbus.default = False | 52 | send_events_over_dbus.default = False |
150 | 53 | send_events_over_dbus.parser = bool | 53 | send_events_over_dbus.parser = bool |
151 | 54 | send_events_over_dbus.action = store_true | 54 | send_events_over_dbus.action = store_true |
154 | 55 | send_events_over_dbus.help = Enable sending "Event" singals for each internal | 55 | send_events_over_dbus.help = Enable sending "Event" singals for each internal event |
153 | 56 | event | ||
155 | 57 | 56 | ||
156 | 58 | handshake_timeout.default = 50 | 57 | handshake_timeout.default = 50 |
157 | 59 | handshake_timeout.parser = int | 58 | handshake_timeout.parser = int |
158 | 60 | 59 | ||
159 | === removed file 'data/ubuntuone-client-crashdb.conf' | |||
160 | --- data/ubuntuone-client-crashdb.conf 2009-08-05 18:01:19 +0000 | |||
161 | +++ data/ubuntuone-client-crashdb.conf 1970-01-01 00:00:00 +0000 | |||
162 | @@ -1,5 +0,0 @@ | |||
163 | 1 | ubuntuone = { | ||
164 | 2 | 'impl' : 'launchpad', | ||
165 | 3 | 'project' : 'ubuntuone-client', | ||
166 | 4 | 'bug_pattern_base' : None, | ||
167 | 5 | } | ||
168 | 6 | 0 | ||
169 | === modified file 'dependencies.txt' | |||
170 | --- dependencies.txt 2016-07-13 22:12:48 +0000 | |||
171 | +++ dependencies.txt 2016-09-02 00:06:46 +0000 | |||
172 | @@ -1,4 +1,4 @@ | |||
174 | 1 | gir1.2-notify | 1 | gir1.2-notify-0.7 |
175 | 2 | gir1.2-soup-2.4 | 2 | gir1.2-soup-2.4 |
176 | 3 | protobuf-compiler | 3 | protobuf-compiler |
177 | 4 | python-configglue | 4 | python-configglue |
178 | 5 | 5 | ||
179 | === modified file 'setup.py' (properties changed: +x to -x) | |||
180 | --- setup.py 2016-08-06 20:02:14 +0000 | |||
181 | +++ setup.py 2016-09-02 00:06:46 +0000 | |||
182 | @@ -1,252 +1,26 @@ | |||
183 | 1 | #!/usr/bin/python | ||
184 | 2 | # | ||
185 | 3 | # Copyright 2013 Canonical Ltd. | ||
186 | 4 | # | ||
187 | 5 | # This program is free software: you can redistribute it and/or modify it | ||
188 | 6 | # under the terms of the GNU General Public License version 3, as published | ||
189 | 7 | # by the Free Software Foundation. | ||
190 | 8 | # | ||
191 | 9 | # This program is distributed in the hope that it will be useful, but | ||
192 | 10 | # WITHOUT ANY WARRANTY; without even the implied warranties of | ||
193 | 11 | # MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR | ||
194 | 12 | # PURPOSE. See the GNU General Public License for more details. | ||
195 | 13 | # | ||
196 | 14 | # You should have received a copy of the GNU General Public License along | ||
197 | 15 | # with this program. If not, see <http://www.gnu.org/licenses/>. | ||
198 | 16 | # | ||
199 | 17 | # In addition, as a special exception, the copyright holders give | ||
200 | 18 | # permission to link the code of portions of this program with the | ||
201 | 19 | # OpenSSL library under certain conditions as described in each | ||
202 | 20 | # individual source file, and distribute linked combinations | ||
203 | 21 | # including the two. | ||
204 | 22 | # You must obey the GNU General Public License in all respects | ||
205 | 23 | # for all of the code used other than OpenSSL. If you modify | ||
206 | 24 | # file(s) with this exception, you may extend this exception to your | ||
207 | 25 | # version of the file(s), but you are not obligated to do so. If you | ||
208 | 26 | # do not wish to do so, delete this exception statement from your | ||
209 | 27 | # version. If you delete this exception statement from all source | ||
210 | 28 | # files in the program, then also delete it here. | ||
211 | 29 | """Setup.py: build, distribute, clean.""" | ||
212 | 30 | |||
213 | 31 | import os | 1 | import os |
426 | 32 | import sys | 2 | |
427 | 33 | 3 | from setuptools import setup, find_packages | |
428 | 34 | try: | 4 | |
429 | 35 | from DistUtilsExtra.command import build_extra, build_i18n | 5 | # Utility function to read the README file. |
430 | 36 | import DistUtilsExtra.auto | 6 | # Used for the long_description. It's nice, because now 1) we have a top level |
431 | 37 | except ImportError: | 7 | # README file and 2) it's easier to type in the README file than to put a raw |
432 | 38 | print >> sys.stderr, 'To build this program you need '\ | 8 | # string in below ... |
433 | 39 | 'https://launchpad.net/python-distutils-extra' | 9 | def read(fname): |
434 | 40 | raise | 10 | return open(os.path.join(os.path.dirname(__file__), fname)).read() |
435 | 41 | assert DistUtilsExtra.auto.__version__ >= '2.18', \ | 11 | |
436 | 42 | 'needs DistUtilsExtra.auto >= 2.18' | 12 | |
437 | 43 | 13 | setup( | |
438 | 44 | 14 | name='magicicada-client', | |
439 | 45 | PROJECT_NAME = 'magicicada-client' | 15 | version='0.1', |
228 | 46 | VERSION = '1.0' | ||
229 | 47 | |||
230 | 48 | POT_FILE = 'po/%s.pot' % PROJECT_NAME | ||
231 | 49 | SERVICE_FILES = ['data/com.ubuntuone.Credentials.service', | ||
232 | 50 | 'data/com.ubuntuone.SyncDaemon.service'] | ||
233 | 51 | CONFIG_FILES = ['data/logging.conf'] | ||
234 | 52 | CLIENTDEFS = 'ubuntuone/clientdefs.py' | ||
235 | 53 | |||
236 | 54 | BUILD_FILES = [CLIENTDEFS] + CONFIG_FILES | ||
237 | 55 | CLEANFILES = [POT_FILE, 'MANIFEST'] + BUILD_FILES + SERVICE_FILES | ||
238 | 56 | |||
239 | 57 | if int(VERSION.split('.')[1]) % 2 != 0: | ||
240 | 58 | LOG_LEVEL = 'DEBUG' | ||
241 | 59 | LOG_FILE_SIZE = '10485760' | ||
242 | 60 | else: | ||
243 | 61 | LOG_LEVEL = 'INFO' | ||
244 | 62 | LOG_FILE_SIZE = '1048576' | ||
245 | 63 | |||
246 | 64 | |||
247 | 65 | def replace_variables(files_to_replace, prefix=None, *args, **kwargs): | ||
248 | 66 | """Replace the @VERSION@ in the constants file with the actual version.""" | ||
249 | 67 | for fname in files_to_replace: | ||
250 | 68 | with open(fname + '.in') as in_file: | ||
251 | 69 | content = in_file.read() | ||
252 | 70 | with open(fname, 'w') as out_file: | ||
253 | 71 | content = content.replace('@VERSION@', VERSION) | ||
254 | 72 | content = content.replace('@PROJECT_NAME@', PROJECT_NAME) | ||
255 | 73 | content = content.replace('@GETTEXT_PACKAGE@', PROJECT_NAME) | ||
256 | 74 | content = content.replace('@LOG_LEVEL@', LOG_LEVEL) | ||
257 | 75 | content = content.replace('@LOG_FILE_SIZE@', LOG_FILE_SIZE) | ||
258 | 76 | if prefix is not None: | ||
259 | 77 | content = content.replace( | ||
260 | 78 | '@localedir@', os.path.join(prefix, | ||
261 | 79 | 'share', 'locale')) | ||
262 | 80 | content = content.replace( | ||
263 | 81 | '@libexecdir@', os.path.join(prefix, | ||
264 | 82 | 'lib', PROJECT_NAME)) | ||
265 | 83 | out_file.write(content) | ||
266 | 84 | |||
267 | 85 | |||
268 | 86 | class Install(DistUtilsExtra.auto.install_auto): | ||
269 | 87 | """Class to install proper files.""" | ||
270 | 88 | |||
271 | 89 | def run(self): | ||
272 | 90 | """Do the install. | ||
273 | 91 | |||
274 | 92 | Read from *.service.in and generate .service files by replacing | ||
275 | 93 | @prefix@ by self.prefix. | ||
276 | 94 | |||
277 | 95 | """ | ||
278 | 96 | |||
279 | 97 | # Remove the contrib and tests packages from the packages list | ||
280 | 98 | # as they are not meant to be installed to the system. | ||
281 | 99 | pkgs = [x for x in self.distribution.packages if not ( | ||
282 | 100 | x.startswith('contrib') or x.startswith('tests'))] | ||
283 | 101 | self.distribution.packages = pkgs | ||
284 | 102 | |||
285 | 103 | # Remove the input and dev files from the data files list, | ||
286 | 104 | # as they are not meant to be installed. | ||
287 | 105 | data_files = [x for x in self.distribution.data_files if not ( | ||
288 | 106 | x[1][0].endswith('.in') or x[1][0].endswith('-dev.conf'))] | ||
289 | 107 | self.distribution.data_files = data_files | ||
290 | 108 | |||
291 | 109 | # Get just the prefix value, without the root | ||
292 | 110 | prefix = self.install_data.replace( | ||
293 | 111 | self.root if self.root is not None else '', '') | ||
294 | 112 | replace_variables(SERVICE_FILES, prefix) | ||
295 | 113 | DistUtilsExtra.auto.install_auto.run(self) | ||
296 | 114 | # Replace the CLIENTDEFS paths here, so that we can do it directly in | ||
297 | 115 | # the installed copy, rather than the lcoal copy. This allows us to | ||
298 | 116 | # have a semi-generated version for use in tests, and a full version | ||
299 | 117 | # for use in installed systems. | ||
300 | 118 | with open(CLIENTDEFS) as in_file: | ||
301 | 119 | content = in_file.read() | ||
302 | 120 | with open(os.path.join(self.install_purelib, | ||
303 | 121 | PROJECT_NAME, | ||
304 | 122 | CLIENTDEFS), 'w') as out_file: | ||
305 | 123 | content = content.replace( | ||
306 | 124 | '@localedir@', os.path.join(prefix, 'share', 'locale')) | ||
307 | 125 | content = content.replace( | ||
308 | 126 | '@libexecdir@', os.path.join(prefix, 'lib', PROJECT_NAME)) | ||
309 | 127 | out_file.write(content) | ||
310 | 128 | |||
311 | 129 | |||
312 | 130 | class Build(build_extra.build_extra): | ||
313 | 131 | """Build PyQt (.ui) files and resources.""" | ||
314 | 132 | |||
315 | 133 | description = "build PyQt GUIs (.ui) and resources (.qrc)" | ||
316 | 134 | |||
317 | 135 | def run(self): | ||
318 | 136 | """Execute the command.""" | ||
319 | 137 | replace_variables(BUILD_FILES) | ||
320 | 138 | build_extra.build_extra.run(self) | ||
321 | 139 | |||
322 | 140 | |||
323 | 141 | class Clean(DistUtilsExtra.auto.clean_build_tree): | ||
324 | 142 | """Class to clean up after the build.""" | ||
325 | 143 | |||
326 | 144 | def run(self): | ||
327 | 145 | """Clean up the built files.""" | ||
328 | 146 | for built_file in CLEANFILES: | ||
329 | 147 | if os.path.exists(built_file): | ||
330 | 148 | os.unlink(built_file) | ||
331 | 149 | |||
332 | 150 | DistUtilsExtra.auto.clean_build_tree.run(self) | ||
333 | 151 | |||
334 | 152 | |||
335 | 153 | class BuildLocale(build_i18n.build_i18n): | ||
336 | 154 | """Work around a bug in DistUtilsExtra.""" | ||
337 | 155 | |||
338 | 156 | def run(self): | ||
339 | 157 | """Magic.""" | ||
340 | 158 | build_i18n.build_i18n.run(self) | ||
341 | 159 | i = 0 | ||
342 | 160 | for df in self.distribution.data_files: | ||
343 | 161 | if df[0].startswith('etc/xdg/'): | ||
344 | 162 | if sys.platform not in ('darwin', 'win32'): | ||
345 | 163 | new_df = (df[0].replace('etc/xdg/', '/etc/xdg/'), df[1]) | ||
346 | 164 | self.distribution.data_files[i] = new_df | ||
347 | 165 | else: | ||
348 | 166 | self.distribution.data_files.pop(i) | ||
349 | 167 | i += 1 | ||
350 | 168 | |||
351 | 169 | |||
352 | 170 | def set_py2exe_paths(): | ||
353 | 171 | """Set the path so that py2exe finds the required modules.""" | ||
354 | 172 | # Pylint does not understand same spaced imports | ||
355 | 173 | import win32com | ||
356 | 174 | try: | ||
357 | 175 | import py2exe.mf as modulefinder | ||
358 | 176 | except ImportError: | ||
359 | 177 | import modulefinder | ||
360 | 178 | |||
361 | 179 | # py2exe 0.6.4 introduced a replacement modulefinder. | ||
362 | 180 | # This means we have to add package paths there, | ||
363 | 181 | # not to the built-in one. If this new modulefinder gets | ||
364 | 182 | # integrated into Python, then we might be able to revert | ||
365 | 183 | # this some day. If this doesn't work, try import modulefinder | ||
366 | 184 | for package_path in win32com.__path__[1:]: | ||
367 | 185 | modulefinder.AddPackagePath("win32com", package_path) | ||
368 | 186 | for extra_mod in ["win32com.server", "win32com.client"]: | ||
369 | 187 | __import__(extra_mod) | ||
370 | 188 | module = sys.modules[extra_mod] | ||
371 | 189 | for module_path in module.__path__[1:]: | ||
372 | 190 | modulefinder.AddPackagePath(extra_mod, module_path) | ||
373 | 191 | |||
374 | 192 | |||
375 | 193 | cmdclass = { | ||
376 | 194 | 'install': Install, | ||
377 | 195 | 'build': Build, | ||
378 | 196 | 'clean': Clean, | ||
379 | 197 | 'build_i18n': BuildLocale, | ||
380 | 198 | } | ||
381 | 199 | |||
382 | 200 | bin_scripts = [ | ||
383 | 201 | 'bin/u1sdtool', | ||
384 | 202 | 'bin/ubuntuone-launch', | ||
385 | 203 | ] | ||
386 | 204 | |||
387 | 205 | libexec_scripts = [ | ||
388 | 206 | 'bin/ubuntuone-proxy-tunnel', | ||
389 | 207 | 'bin/ubuntuone-syncdaemon', | ||
390 | 208 | ] | ||
391 | 209 | |||
392 | 210 | data_files = [] | ||
393 | 211 | scripts = [] | ||
394 | 212 | |||
395 | 213 | if sys.platform == 'win32': | ||
396 | 214 | set_py2exe_paths() | ||
397 | 215 | extra = { | ||
398 | 216 | 'options': { | ||
399 | 217 | 'py2exe': { | ||
400 | 218 | 'bundle_files': 1, | ||
401 | 219 | 'skip_archive': 0, | ||
402 | 220 | 'optimize': 1, | ||
403 | 221 | 'dll_excludes': ["mswsock.dll", "powrprof.dll"], | ||
404 | 222 | }, | ||
405 | 223 | }, | ||
406 | 224 | # add the console script so that py2exe compiles it | ||
407 | 225 | 'console': bin_scripts + libexec_scripts, | ||
408 | 226 | 'zipfile': None, | ||
409 | 227 | } | ||
410 | 228 | else: | ||
411 | 229 | data_files.extend([ | ||
412 | 230 | ('lib/%s' % PROJECT_NAME, libexec_scripts), | ||
413 | 231 | ('share/dbus-1/services', SERVICE_FILES), | ||
414 | 232 | ('/etc/xdg/ubuntuone', CONFIG_FILES + ['data/syncdaemon.conf']), | ||
415 | 233 | ('/etc/apport/crashdb.conf.d', ['data/ubuntuone-client-crashdb.conf']), | ||
416 | 234 | ('share/apport/package-hooks', ['data/source_ubuntuone-client.py']), | ||
417 | 235 | ('share/man/man1', ['docs/man/u1sdtool.1']), | ||
418 | 236 | ]) | ||
419 | 237 | scripts.extend(bin_scripts) | ||
420 | 238 | extra = {} | ||
421 | 239 | |||
422 | 240 | DistUtilsExtra.auto.setup( | ||
423 | 241 | name=PROJECT_NAME, | ||
424 | 242 | version=VERSION, | ||
425 | 243 | license='GPL v3', | ||
440 | 244 | author='Chicharreros', | 16 | author='Chicharreros', |
449 | 245 | author_email='magicicada-hackers@@lists.launchpad.net', | 17 | author_email='magicicada-hackers@lists.launchpad.net', |
450 | 246 | description='Magicicada file synchronization client', | 18 | description='Magicicada filesync client', |
451 | 247 | url='https://launchpad.net/%s' % PROJECT_NAME, | 19 | license='GPL', |
452 | 248 | extra_path=PROJECT_NAME, | 20 | keywords='filesync', |
453 | 249 | scripts=scripts, | 21 | url='https://launchpad.net/magicicada', |
454 | 250 | data_files=data_files, | 22 | packages=find_packages(), |
455 | 251 | cmdclass=cmdclass, | 23 | long_description=read('README'), |
456 | 252 | **extra) | 24 | include_package_data=True, |
457 | 25 | scripts=['bin/ubuntuone-syncdaemon', 'bin/u1sdtool'], | ||
458 | 26 | ) | ||
459 | 253 | 27 | ||
460 | === removed file 'ubuntuone-client.pth' | |||
461 | --- ubuntuone-client.pth 2013-06-10 19:27:21 +0000 | |||
462 | +++ ubuntuone-client.pth 1970-01-01 00:00:00 +0000 | |||
463 | @@ -1,1 +0,0 @@ | |||
464 | 1 | ubuntuone-client | ||
465 | 2 | 0 | ||
466 | === modified file 'ubuntuone/platform/os_helper/linux.py' | |||
467 | --- ubuntuone/platform/os_helper/linux.py 2013-02-12 23:15:48 +0000 | |||
468 | +++ ubuntuone/platform/os_helper/linux.py 2016-09-02 00:06:46 +0000 | |||
469 | @@ -36,12 +36,7 @@ | |||
470 | 36 | import os | 36 | import os |
471 | 37 | import shutil | 37 | import shutil |
472 | 38 | 38 | ||
479 | 39 | try: | 39 | from gi.repository import GLib, GObject, Gio |
474 | 40 | from gi.repository import Gio, GLib | ||
475 | 41 | has_gi = True | ||
476 | 42 | except ImportError: | ||
477 | 43 | import gio | ||
478 | 44 | has_gi = False | ||
480 | 45 | 40 | ||
481 | 46 | from ubuntuone.platform.os_helper import unix | 41 | from ubuntuone.platform.os_helper import unix |
482 | 47 | 42 | ||
483 | @@ -55,22 +50,13 @@ | |||
484 | 55 | 50 | ||
485 | 56 | If had any error, or the system can't do it, just remove it. | 51 | If had any error, or the system can't do it, just remove it. |
486 | 57 | """ | 52 | """ |
503 | 58 | if has_gi: | 53 | not_supported = Gio.IOErrorEnum.NOT_SUPPORTED |
504 | 59 | not_supported = Gio.IOErrorEnum.NOT_SUPPORTED | 54 | try: |
505 | 60 | try: | 55 | return_code = Gio.File.new_for_path(path).trash(None) |
506 | 61 | return_code = Gio.File.new_for_path(path).trash(None) | 56 | except GLib.GError: |
507 | 62 | except GLib.GError: | 57 | exc = OSError() |
508 | 63 | exc = OSError() | 58 | exc.errno = errno.ENOENT |
509 | 64 | exc.errno = errno.ENOENT | 59 | raise exc |
494 | 65 | raise exc | ||
495 | 66 | else: | ||
496 | 67 | not_supported = gio.ERROR_NOT_SUPPORTED | ||
497 | 68 | try: | ||
498 | 69 | return_code = gio.File(path).trash() | ||
499 | 70 | except gio.Error: | ||
500 | 71 | exc = OSError() | ||
501 | 72 | exc.errno = errno.ENOENT | ||
502 | 73 | raise exc | ||
510 | 74 | 60 | ||
511 | 75 | if not return_code or return_code == not_supported: | 61 | if not return_code or return_code == not_supported: |
512 | 76 | logger.warning("Problems moving to trash! (%s) Removing anyway: %r", | 62 | logger.warning("Problems moving to trash! (%s) Removing anyway: %r", |
513 | @@ -83,12 +69,7 @@ | |||
514 | 83 | 69 | ||
515 | 84 | def set_application_name(app_name): | 70 | def set_application_name(app_name): |
516 | 85 | """Set the name of the application.""" | 71 | """Set the name of the application.""" |
523 | 86 | if has_gi: | 72 | GObject.set_application_name(app_name) |
518 | 87 | from gi.repository import GObject | ||
519 | 88 | GObject.set_application_name(app_name) | ||
520 | 89 | else: | ||
521 | 90 | import gobject | ||
522 | 91 | gobject.set_application_name(app_name) | ||
524 | 92 | 73 | ||
525 | 93 | 74 | ||
526 | 94 | set_no_rights = unix.set_no_rights | 75 | set_no_rights = unix.set_no_rights |