Merge lp:~dobey/ubuntuone-client/py-only into lp:ubuntuone-client
- py-only
- Merge into trunk
Proposed by
dobey
Status: | Merged |
---|---|
Approved by: | dobey |
Approved revision: | 1403 |
Merged at revision: | 1397 |
Proposed branch: | lp:~dobey/ubuntuone-client/py-only |
Merge into: | lp:ubuntuone-client |
Diff against target: |
964 lines (+300/-529) 15 files modified
.bzrignore (+2/-73) Makefile.am (+0/-154) VERSION (+0/-1) autogen.sh (+0/-21) configure.ac (+0/-139) contrib/draw-fsm (+2/-1) data/Makefile.am (+0/-48) docs/Makefile.am (+0/-6) run-tests (+34/-9) run-tests.bat (+8/-3) setup.cfg (+2/-0) setup.py (+252/-0) ubuntuone/clientdefs.py.in (+0/-8) windows/clientdefs.py (+0/-53) windows/logging.conf (+0/-13) |
To merge this branch: | bzr merge lp:~dobey/ubuntuone-client/py-only |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Mike McCracken (community) | Approve | ||
Brian Curtin (community) | Approve | ||
Alejandro J. Cura (community) | Approve | ||
Review via email: mp+168105@code.launchpad.net |
Commit message
Convert build system from autotools to DistUtilsExtra
Description of the change
To post a comment you must log in.
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file '.bzrignore' | |||
2 | --- .bzrignore 2011-02-09 19:54:46 +0000 | |||
3 | +++ .bzrignore 2013-06-07 17:44:24 +0000 | |||
4 | @@ -1,86 +1,15 @@ | |||
5 | 1 | Makefile | ||
6 | 2 | Makefile.in | ||
7 | 3 | Makefile.in.in | ||
8 | 4 | POTFILES | 1 | POTFILES |
9 | 5 | .deps | ||
10 | 6 | .libs | ||
11 | 7 | autom4te.cache | ||
12 | 8 | build | 2 | build |
13 | 9 | dist | 3 | dist |
14 | 10 | m4 | ||
15 | 11 | tmp | ||
16 | 12 | _trial_temp | 4 | _trial_temp |
33 | 13 | aclocal.m4 | 5 | *.egg-info |
34 | 14 | config.guess | 6 | |
19 | 15 | config.h | ||
20 | 16 | config.h.in | ||
21 | 17 | config.log | ||
22 | 18 | config.status | ||
23 | 19 | config.sub | ||
24 | 20 | configure | ||
25 | 21 | depcomp | ||
26 | 22 | install-sh | ||
27 | 23 | intltool-* | ||
28 | 24 | libtool | ||
29 | 25 | ltmain.sh | ||
30 | 26 | missing | ||
31 | 27 | setup.py | ||
32 | 28 | stamp-* | ||
35 | 29 | *.desktop | 7 | *.desktop |
36 | 30 | *.gmo | 8 | *.gmo |
37 | 31 | *.icon | ||
38 | 32 | *.la | ||
39 | 33 | *.lo | ||
40 | 34 | *.menu | ||
41 | 35 | *_pb2.py | 9 | *_pb2.py |
42 | 36 | *.pot | 10 | *.pot |
43 | 37 | *.pyc | 11 | *.pyc |
44 | 38 | *.rendercache | ||
45 | 39 | *.service | 12 | *.service |
46 | 40 | .intltool-merge-cache | ||
47 | 41 | gtk-doc.make | ||
48 | 42 | 13 | ||
49 | 43 | ubuntuone-client-*.tar.* | ||
50 | 44 | hicolor | ||
51 | 45 | icons | ||
52 | 46 | storageprotocol | ||
53 | 47 | clientdefs.py | 14 | clientdefs.py |
54 | 48 | docs/syncdaemon_dbus_api.txt | ||
55 | 49 | docs/reference/html* | ||
56 | 50 | docs/reference/libsyncdaemon-decl-list.txt | ||
57 | 51 | docs/reference/libsyncdaemon-decl-list.txt.bak | ||
58 | 52 | docs/reference/libsyncdaemon-decl.txt | ||
59 | 53 | docs/reference/libsyncdaemon-decl.txt.bak | ||
60 | 54 | docs/reference/libsyncdaemon-overrides.txt | ||
61 | 55 | docs/reference/libsyncdaemon-sections.txt | ||
62 | 56 | docs/reference/libsyncdaemon-undeclared.txt | ||
63 | 57 | docs/reference/libsyncdaemon-undocumented.txt | ||
64 | 58 | docs/reference/libsyncdaemon-unused.txt | ||
65 | 59 | docs/reference/libsyncdaemon.args | ||
66 | 60 | docs/reference/libsyncdaemon.hierarchy | ||
67 | 61 | docs/reference/libsyncdaemon.interfaces | ||
68 | 62 | docs/reference/libsyncdaemon.prerequisites | ||
69 | 63 | docs/reference/libsyncdaemon.signals | ||
70 | 64 | docs/reference/libsyncdaemon.types | ||
71 | 65 | docs/reference/*.stamp | ||
72 | 66 | docs/reference/tmpl | ||
73 | 67 | docs/reference/xml* | ||
74 | 68 | logging.conf | 15 | logging.conf |
75 | 69 | ubuntuone-marshallers.[ch] | ||
76 | 70 | |||
77 | 71 | nautilus/test-contacts-picker | ||
78 | 72 | nautilus/test-highlight | ||
79 | 73 | |||
80 | 74 | libsyncdaemon/syncdaemon-marshal.[ch] | ||
81 | 75 | libsyncdaemon/test-libsyncdaemon | ||
82 | 76 | libsyncdaemon/test-libsyncdaemon-vapi | ||
83 | 77 | libsyncdaemon/test-libsyncdaemon-vapi.c | ||
84 | 78 | libsyncdaemon/libsyncdaemon-1.0.pc | ||
85 | 79 | libsyncdaemon/Syncdaemon-1.0.gir | ||
86 | 80 | libsyncdaemon/Syncdaemon-1.0.typelib | ||
87 | 81 | libsyncdaemon/libsyncdaemon-1.0.deps | ||
88 | 82 | libsyncdaemon/libsyncdaemon-1.0.vapi | ||
89 | 83 | *_vala.stamp | ||
90 | 84 | |||
91 | 85 | ubuntuone.gnome-settings-plugin | ||
92 | 86 | test-gsd-ubuntuone | ||
93 | 87 | 16 | ||
94 | === removed file 'Makefile.am' | |||
95 | --- Makefile.am 2013-06-05 20:09:11 +0000 | |||
96 | +++ Makefile.am 1970-01-01 00:00:00 +0000 | |||
97 | @@ -1,154 +0,0 @@ | |||
98 | 1 | SUBDIRS = data po docs | ||
99 | 2 | |||
100 | 3 | # Shut libtoolize up | ||
101 | 4 | ACLOCAL_AMFLAGS = -I m4 | ||
102 | 5 | |||
103 | 6 | # PYTHONPATH for local Python scripts | ||
104 | 7 | PYTHONPATH="$(SSO_PATH):$(USP_PATH):$(top_builddir):$(top_srcdir)" | ||
105 | 8 | |||
106 | 9 | # Python packages we want to install | ||
107 | 10 | pythonpkgdir = $(pythondir)/$(PACKAGE) | ||
108 | 11 | pypackages = \ | ||
109 | 12 | ubuntuone \ | ||
110 | 13 | $(shell SRCDIR="ubuntuone"; for i in `find $$SRCDIR -type d`; do DIRNAME=`basename $$i`; if [ "x$$DIRNAME" != "xtest" ]; then printf "$$i "; fi; done) | ||
111 | 14 | |||
112 | 15 | # Install our scripts and extra data here | ||
113 | 16 | bin_SCRIPTS = \ | ||
114 | 17 | bin/ubuntuone-launch \ | ||
115 | 18 | bin/u1sdtool | ||
116 | 19 | |||
117 | 20 | libexec_SCRIPTS = \ | ||
118 | 21 | bin/ubuntuone-syncdaemon \ | ||
119 | 22 | bin/ubuntuone-proxy-tunnel \ | ||
120 | 23 | bin/ubuntuone-login | ||
121 | 24 | |||
122 | 25 | clientdefsdir = $(pythonpkgdir)/ubuntuone | ||
123 | 26 | clientdefs_in_files = ubuntuone/clientdefs.py.in | ||
124 | 27 | clientdefs_DATA = $(clientdefs_in_files:.py.in=.py) | ||
125 | 28 | |||
126 | 29 | # Don't end up pulling in storage-protocol source as well | ||
127 | 30 | pyfiles = $(shell SRCDIR="$(top_srcdir)/ubuntuone"; for i in `find $$SRCDIR -type f -name "*.py"`; do if [ ! -f $$i.in ]; then printf "$$i "; fi; done) | ||
128 | 31 | |||
129 | 32 | $(clientdefs_DATA): $(clientdefs_in_files) ubuntuone | ||
130 | 33 | sed -e 's|\@localedir\@|$(localedir)|g' \ | ||
131 | 34 | -e 's|\@libexecdir\@|$(libexecdir)|g' \ | ||
132 | 35 | -e 's|\@GETTEXT_PACKAGE\@|$(GETTEXT_PACKAGE)|g' \ | ||
133 | 36 | -e 's|\@SSO_APP_NAME\@|$(SSO_APP_NAME)|g' \ | ||
134 | 37 | -e 's|\@SSO_TC_URL\@|$(SSO_TC_URL)|g' \ | ||
135 | 38 | -e 's|\@SSO_PING_URL\@|$(SSO_PING_URL)|g' \ | ||
136 | 39 | -e 's|\@VERSION\@|$(VERSION)|g' < $< > $@ | ||
137 | 40 | |||
138 | 41 | logging.conf: data/logging.conf.in Makefile | ||
139 | 42 | $(MAKE) -C data logging.conf | ||
140 | 43 | |||
141 | 44 | lint: $(clientdefs_DATA) Makefile | ||
142 | 45 | PYTHONPATH="$(PYTHONPATH)" SRCDIR="$(srcdir)" USE_PYFLAKES="true" u1lint -i ubuntuone/platform/filesystem_notifications/pyinotify_agnostic.py | ||
143 | 46 | |||
144 | 47 | test: logging.conf $(clientdefs_DATA) Makefile | ||
145 | 48 | echo "$(PYTHONPATH)" | ||
146 | 49 | if test "x$(builddir)" == "x$(srcdir)"; then \ | ||
147 | 50 | PYTHONPATH="$(PYTHONPATH)" u1trial -r $(REACTOR) -p tests/platform/windows,tests/proxy -i "test_windows.py,test_darwin.py,test_fsevents_daemon.py" tests || exit 1; \ | ||
148 | 51 | PYTHONPATH="$(PYTHONPATH)" u1trial -r qt4 -p tests/platform/windows -i "test_windows.py,test_darwin.py" tests/proxy || exit 1; \ | ||
149 | 52 | PYTHONPATH="$(PYTHONPATH)" $(PYTHON) tests/platform/check_reactor_import.py || exit 1; \ | ||
150 | 53 | fi | ||
151 | 54 | rm -rf _trial_temp | ||
152 | 55 | |||
153 | 56 | test-proxy: logging.conf $(clientdefs_DATA) Makefile | ||
154 | 57 | if test "x$(builddir)" == "x$(srcdir)"; then \ | ||
155 | 58 | PYTHONPATH="$(PYTHONPATH)" u1trial -r qt4 -p tests/platform/windows -i "test_windows.py,test_darwin.py" tests/proxy || exit 1; \ | ||
156 | 59 | fi | ||
157 | 60 | rm -rf _trial_temp | ||
158 | 61 | |||
159 | 62 | test-coverage: logging.conf $(clientdefs_DATA) Makefile | ||
160 | 63 | if test "x$(builddir)" == "x$(srcdir)"; then \ | ||
161 | 64 | PYTHONPATH="$(PYTHONPATH)" u1trial -r $(REACTOR) -c -p tests/platform/windows -i "test_windows.py,test_darwin.py" tests; \ | ||
162 | 65 | fi | ||
163 | 66 | rm -rf _trial_temp | ||
164 | 67 | |||
165 | 68 | check: lint test Makefile | ||
166 | 69 | |||
167 | 70 | docs: $(clientdefs_DATA) Makefile | ||
168 | 71 | $(mkdir_p) docs | ||
169 | 72 | if test "x$(builddir)" != "x$(srcdir)" -a -f "$(srcdir)/docs/syncdaemon_dbus_api.txt"; then \ | ||
170 | 73 | $(LN_S) "$(top_srcdir)/docs/syncdaemon_dbus_api.txt" "docs/syncdaemon_dbus_api.txt"; \ | ||
171 | 74 | else \ | ||
172 | 75 | PYTHONPATH="$(PYTHONPATH)" SRCDIR="$(srcdir)" $(PYTHON) $(srcdir)/contrib/dbus-docs; \ | ||
173 | 76 | fi | ||
174 | 77 | |||
175 | 78 | ubuntuone: Makefile | ||
176 | 79 | if test "x$(builddir)" != "x$(srcdir)"; then \ | ||
177 | 80 | $(mkdir_p) ubuntuone; \ | ||
178 | 81 | $(mkdir_p) tests; \ | ||
179 | 82 | (cd ubuntuone && $(LNDIR) $(srcdir)/../ubuntuone > /dev/null); \ | ||
180 | 83 | (cd tests && $(LNDIR) $(srcdir)/../tests > /dev/null); \ | ||
181 | 84 | fi | ||
182 | 85 | |||
183 | 86 | all-local: logging.conf $(clientdefs_DATA) | ||
184 | 87 | |||
185 | 88 | sd_path = ubuntuone/syncdaemon | ||
186 | 89 | |||
187 | 90 | u1fsfsm: $(srcdir)/ubuntuone/syncdaemon/u1fsfsm.ods | ||
188 | 91 | PYTHONPATH=$(PYTHONPATH) \ | ||
189 | 92 | HAS_OOFFICE="true" \ | ||
190 | 93 | XDG_CACHE_HOME="$(builddir)/_trial_temp/xdg_cache" \ | ||
191 | 94 | $(PYTHON) -t $(srcdir)/$(sd_path)/fsm/fsm_parser.py \ | ||
192 | 95 | -o $(builddir)/$(sd_path)/u1fsfsm.py $< | ||
193 | 96 | PYTHONPATH=$(PYTHONPATH) \ | ||
194 | 97 | HAS_OOFFICE="true" \ | ||
195 | 98 | XDG_CACHE_HOME="$(builddir)/_trial_temp/xdg_cache" \ | ||
196 | 99 | $(PYTHON) -t $(srcdir)/$(sd_path)/fsm/fsm.py \ | ||
197 | 100 | $(srcdir)/$(sd_path)/u1fsfsm.py | ||
198 | 101 | |||
199 | 102 | install-data-local: $(clientdefs_DATA) | ||
200 | 103 | for package in $(pypackages); do \ | ||
201 | 104 | $(mkdir_p) $(DESTDIR)$(pythonpkgdir)/$$package; \ | ||
202 | 105 | for module in $(top_srcdir)/$$package/*.py; do \ | ||
203 | 106 | $(install_sh_DATA) $$module $(DESTDIR)$(pythonpkgdir)/$$package; \ | ||
204 | 107 | done; \ | ||
205 | 108 | done | ||
206 | 109 | echo "$(PACKAGE)" > $(DESTDIR)$(pythondir)/$(PACKAGE).pth | ||
207 | 110 | |||
208 | 111 | uninstall-local: | ||
209 | 112 | for package in $(pypackages); do \ | ||
210 | 113 | for module in $(top_srcdir)/$$package/*.py; do \ | ||
211 | 114 | modname=`basename $$module`; \ | ||
212 | 115 | rm -f $(DESTDIR)$(pythonpkgdir)/$$package/$$modname; \ | ||
213 | 116 | done; \ | ||
214 | 117 | rmdir -p --ignore-fail-on-non-empty $(DESTDIR)$(pythonpkgdir)/$$package; \ | ||
215 | 118 | done | ||
216 | 119 | rm -f $(DESTDIR)$(pythondir)/$(PACKAGE).pth | ||
217 | 120 | |||
218 | 121 | clean-local: | ||
219 | 122 | for i in `find $(builddir) -name "*.pyc"`; do \ | ||
220 | 123 | rm -f $$i; \ | ||
221 | 124 | done | ||
222 | 125 | rm -rf build dist _trial_temp | ||
223 | 126 | |||
224 | 127 | EXTRA_DIST = \ | ||
225 | 128 | $(srcdir)/ubuntuone/syncdaemon/u1fsfsm.ods \ | ||
226 | 129 | $(pyfiles) \ | ||
227 | 130 | $(clientdefs_in_files) \ | ||
228 | 131 | LICENSE \ | ||
229 | 132 | LICENSE.OpenSSL \ | ||
230 | 133 | HACKING \ | ||
231 | 134 | VERSION \ | ||
232 | 135 | bin \ | ||
233 | 136 | contrib \ | ||
234 | 137 | tests | ||
235 | 138 | |||
236 | 139 | CLEANFILES = \ | ||
237 | 140 | $(clientdefs_DATA) | ||
238 | 141 | |||
239 | 142 | MAINTAINERCLEANFILES = \ | ||
240 | 143 | Makefile.in \ | ||
241 | 144 | aclocal.m4 \ | ||
242 | 145 | config.guess \ | ||
243 | 146 | config.h.in \ | ||
244 | 147 | config.sub \ | ||
245 | 148 | configure \ | ||
246 | 149 | depcomp \ | ||
247 | 150 | install-sh \ | ||
248 | 151 | libtool \ | ||
249 | 152 | ltmain.sh \ | ||
250 | 153 | missing \ | ||
251 | 154 | mkinstalldirs | ||
252 | 155 | 0 | ||
253 | === removed file 'VERSION' | |||
254 | --- VERSION 2013-05-28 21:50:41 +0000 | |||
255 | +++ VERSION 1970-01-01 00:00:00 +0000 | |||
256 | @@ -1,1 +0,0 @@ | |||
257 | 1 | 99.12 | ||
258 | 2 | 0 | ||
259 | === removed file 'autogen.sh' | |||
260 | --- autogen.sh 2013-06-05 20:09:11 +0000 | |||
261 | +++ autogen.sh 1970-01-01 00:00:00 +0000 | |||
262 | @@ -1,21 +0,0 @@ | |||
263 | 1 | #!/bin/sh | ||
264 | 2 | # Run this to generate all the initial makefiles, etc. | ||
265 | 3 | |||
266 | 4 | srcdir=`dirname $0` | ||
267 | 5 | test -z "$srcdir" && srcdir=. | ||
268 | 6 | |||
269 | 7 | PKG_NAME="ubuntuone-client" | ||
270 | 8 | REQUIRED_AUTOMAKE_VERSION="1.10" | ||
271 | 9 | |||
272 | 10 | (test -f $srcdir/configure.ac) || { | ||
273 | 11 | echo -n "**Error**: Directory "\`$srcdir\'" does not look like the" | ||
274 | 12 | echo " top-level $PKG_NAME directory" | ||
275 | 13 | exit 1 | ||
276 | 14 | } | ||
277 | 15 | |||
278 | 16 | which gnome-autogen.sh || { | ||
279 | 17 | echo "You need to install gnome-common from the GNOME source repository" | ||
280 | 18 | exit 1 | ||
281 | 19 | } | ||
282 | 20 | mkdir -p "$srcdir/m4" | ||
283 | 21 | USE_GNOME2_MACROS=1 . gnome-autogen.sh | ||
284 | 22 | 0 | ||
285 | === removed file 'configure.ac' | |||
286 | --- configure.ac 2013-06-05 20:09:11 +0000 | |||
287 | +++ configure.ac 1970-01-01 00:00:00 +0000 | |||
288 | @@ -1,139 +0,0 @@ | |||
289 | 1 | dnl Process this file with autoconf to produce a configure script. | ||
290 | 2 | AC_PREREQ(2.53) | ||
291 | 3 | |||
292 | 4 | # We need to omit the trailing newline when catting the VERSION file | ||
293 | 5 | AC_INIT([ubuntuone-client], m4_esyscmd([cat VERSION | tr -d '\012'])) | ||
294 | 6 | AC_CONFIG_SRCDIR([VERSION]) | ||
295 | 7 | |||
296 | 8 | AM_INIT_AUTOMAKE([1.10 foreign tar-ustar]) | ||
297 | 9 | |||
298 | 10 | m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])]) | ||
299 | 11 | |||
300 | 12 | # Workaround to make aclocal get the right flags | ||
301 | 13 | AC_CONFIG_MACRO_DIR([m4]) | ||
302 | 14 | AC_SUBST(ACLOCAL_AMFLAGS, "\${ACLOCAL_FLAGS} -I m4") | ||
303 | 15 | |||
304 | 16 | IT_PROG_INTLTOOL([0.40.0]) | ||
305 | 17 | |||
306 | 18 | GETTEXT_PACKAGE="${PACKAGE}" | ||
307 | 19 | AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", | ||
308 | 20 | [translation domain of this package]) | ||
309 | 21 | AC_SUBST(GETTEXT_PACKAGE) | ||
310 | 22 | localedir='$(prefix)/$(DATADIRNAME)/locale' | ||
311 | 23 | AC_SUBST(localedir) | ||
312 | 24 | |||
313 | 25 | # Need lndir for builddir != srcdir builds, because Python is not sane | ||
314 | 26 | AC_PATH_PROG([LNDIR], [lndir], []) | ||
315 | 27 | if test "x$LNDIR" = "x"; then | ||
316 | 28 | AC_MSG_ERROR([lndir is required to build ubuntuone-client]) | ||
317 | 29 | fi | ||
318 | 30 | |||
319 | 31 | # Alter default logging if we're development vs. stable | ||
320 | 32 | AC_MSG_CHECKING([development series build]) | ||
321 | 33 | DEVVERSION="`echo $PACKAGE_VERSION|cut -d. -f2`" | ||
322 | 34 | if expr $DEVVERSION % 2 > /dev/null != "0"; then | ||
323 | 35 | debugging=yes | ||
324 | 36 | AC_MSG_RESULT([yes]) | ||
325 | 37 | else | ||
326 | 38 | debugging=no | ||
327 | 39 | AC_MSG_RESULT([no]) | ||
328 | 40 | fi | ||
329 | 41 | |||
330 | 42 | AC_ARG_ENABLE([debug], | ||
331 | 43 | AC_HELP_STRING([--enable-debug], | ||
332 | 44 | [Enable debug logging by default [default=auto]]), | ||
333 | 45 | enable_debug=$enableval, | ||
334 | 46 | enable_debug=$debugging) | ||
335 | 47 | if test "x$enable_debug" != "xno"; then | ||
336 | 48 | LOG_LEVEL="DEBUG" | ||
337 | 49 | LOG_FILE_SIZE="10485760" | ||
338 | 50 | CFLAGS="${CFLAGS} -Wall -Werror" | ||
339 | 51 | AC_SUBST(CFLAGS) | ||
340 | 52 | else | ||
341 | 53 | LOG_LEVEL="INFO" | ||
342 | 54 | LOG_FILE_SIZE="1048576" | ||
343 | 55 | fi | ||
344 | 56 | AC_SUBST(LOG_LEVEL) | ||
345 | 57 | AC_SUBST(LOG_FILE_SIZE) | ||
346 | 58 | |||
347 | 59 | # Check for python 2.6 | ||
348 | 60 | AM_PATH_PYTHON([2.6]) | ||
349 | 61 | |||
350 | 62 | # Specify the path for ubuntu-sso-client source | ||
351 | 63 | AC_MSG_CHECKING([for ubuntu-sso-client]) | ||
352 | 64 | AC_ARG_WITH([sso], | ||
353 | 65 | AC_HELP_STRING([--with-sso], | ||
354 | 66 | [Specify path to ubuntu-sso-client [default=auto]]), | ||
355 | 67 | [with_sso=$withval], | ||
356 | 68 | [with_sso=auto]) | ||
357 | 69 | SSO_PATH="" | ||
358 | 70 | if test "x$with_sso" = "xauto"; then | ||
359 | 71 | SSO_PATH="" | ||
360 | 72 | AC_MSG_RESULT([using system path]) | ||
361 | 73 | else | ||
362 | 74 | SSO_PATH="$with_sso" | ||
363 | 75 | AC_MSG_RESULT([$SSO_PATH]) | ||
364 | 76 | fi | ||
365 | 77 | AC_SUBST(SSO_PATH) | ||
366 | 78 | |||
367 | 79 | # Specify the path for ubuntuone-storage-protocol source | ||
368 | 80 | AC_MSG_CHECKING([for ubuntuone-storage-protocol]) | ||
369 | 81 | AC_ARG_WITH([protocol], | ||
370 | 82 | AC_HELP_STRING([--with-protocol], | ||
371 | 83 | [Specify path to storage protocol [default=auto]]), | ||
372 | 84 | [with_protocol=$withval], | ||
373 | 85 | [with_protocol=auto]) | ||
374 | 86 | USP_PATH="" | ||
375 | 87 | if test "x$with_protocol" = "xauto"; then | ||
376 | 88 | USP_PATH="" | ||
377 | 89 | AC_MSG_RESULT([using system path]) | ||
378 | 90 | else | ||
379 | 91 | USP_PATH="$with_protocol" | ||
380 | 92 | AC_MSG_RESULT([$USP_PATH]) | ||
381 | 93 | fi | ||
382 | 94 | AC_SUBST(USP_PATH) | ||
383 | 95 | |||
384 | 96 | PKG_CHECK_MODULES(DBUS, [dbus-glib-1 >= 0.70]) | ||
385 | 97 | AC_SUBST(DBUS_CFLAGS) | ||
386 | 98 | AC_SUBST(DBUS_LIBS) | ||
387 | 99 | |||
388 | 100 | dnl --------------------------------------------------------------------------- | ||
389 | 101 | dnl - Are we specifying a different dbus root ? | ||
390 | 102 | dnl --------------------------------------------------------------------------- | ||
391 | 103 | AC_ARG_WITH(dbus-services, | ||
392 | 104 | [AC_HELP_STRING([--with-dbus-services=<dir>], | ||
393 | 105 | [where D-BUS services directory is])]) | ||
394 | 106 | if ! test -z "$with_dbus_services" ; then | ||
395 | 107 | DBUS_SERVICES_DIR="$with_dbus_services" | ||
396 | 108 | else | ||
397 | 109 | # D-BUS 0.23 and higher use $prefix/share/dbus-1/services | ||
398 | 110 | DBUS_SERVICES_DIR="\${datadir}/dbus-1/services" | ||
399 | 111 | fi | ||
400 | 112 | AC_SUBST(DBUS_SERVICES_DIR) | ||
401 | 113 | |||
402 | 114 | dnl Strings to pass to SSO data | ||
403 | 115 | SSO_APP_NAME="Ubuntu One" | ||
404 | 116 | SSO_TC_URL="https://one.ubuntu.com/terms/" | ||
405 | 117 | SSO_PING_URL="https://one.ubuntu.com/oauth/sso-finished-so-get-tokens/" | ||
406 | 118 | AC_SUBST(SSO_APP_NAME) | ||
407 | 119 | AC_SUBST(SSO_TC_URL) | ||
408 | 120 | AC_SUBST(SSO_PING_URL) | ||
409 | 121 | AC_DEFINE_UNQUOTED([SSO_APP_NAME], ["$SSO_APP_NAME"], ["The Ubuntu One app name."]) | ||
410 | 122 | AC_DEFINE_UNQUOTED([SSO_TC_URL], ["$SSO_TC_URL"], ["The Ubuntu One terms and conditions URL."]) | ||
411 | 123 | AC_DEFINE_UNQUOTED([SSO_PING_URL], ["$SSO_PING_URL"], ["The Ubuntu One url to ping to when new tokens are stored."]) | ||
412 | 124 | |||
413 | 125 | AC_CONFIG_FILES([ | ||
414 | 126 | Makefile | ||
415 | 127 | data/Makefile | ||
416 | 128 | po/Makefile.in | ||
417 | 129 | docs/Makefile | ||
418 | 130 | ]) | ||
419 | 131 | |||
420 | 132 | if [[ -n "$(lsb_release -r | grep -v '1[2-9].[0-9][0-9]')" ]]; then | ||
421 | 133 | REACTOR="glib"; | ||
422 | 134 | else | ||
423 | 135 | REACTOR="gi" | ||
424 | 136 | fi | ||
425 | 137 | AC_SUBST(REACTOR) | ||
426 | 138 | |||
427 | 139 | AC_OUTPUT | ||
428 | 140 | 0 | ||
429 | === renamed file 'ubuntuone/syncdaemon/fsm/fsm_draw.py' => 'contrib/draw-fsm' (properties changed: -x to +x) | |||
430 | --- ubuntuone/syncdaemon/fsm/fsm_draw.py 2012-04-09 20:07:05 +0000 | |||
431 | +++ contrib/draw-fsm 2013-06-07 17:44:24 +0000 | |||
432 | @@ -1,3 +1,4 @@ | |||
433 | 1 | #!/usr/bin/python | ||
434 | 1 | # ubuntuone.syncdaemon.fsm.fsm_draw - draw a fsm | 2 | # ubuntuone.syncdaemon.fsm.fsm_draw - draw a fsm |
435 | 2 | # | 3 | # |
436 | 3 | # Author: Lucio Torre <lucio.torre@canonical.com> | 4 | # Author: Lucio Torre <lucio.torre@canonical.com> |
437 | @@ -35,7 +36,7 @@ | |||
438 | 35 | import sys | 36 | import sys |
439 | 36 | 37 | ||
440 | 37 | # pylint: disable-msg=F0401 | 38 | # pylint: disable-msg=F0401 |
442 | 38 | import gtk | 39 | from gi.repository import Gtk as gtk |
443 | 39 | 40 | ||
444 | 40 | import xdot | 41 | import xdot |
445 | 41 | from ubuntuone.syncdaemon.fsm import fsm | 42 | from ubuntuone.syncdaemon.fsm import fsm |
446 | 42 | 43 | ||
447 | === removed file 'data/Makefile.am' | |||
448 | --- data/Makefile.am 2013-02-13 20:57:13 +0000 | |||
449 | +++ data/Makefile.am 1970-01-01 00:00:00 +0000 | |||
450 | @@ -1,48 +0,0 @@ | |||
451 | 1 | |||
452 | 2 | apportdir = $(datadir)/apport/package-hooks | ||
453 | 3 | apport_DATA = source_ubuntuone-client.py | ||
454 | 4 | |||
455 | 5 | crashdbdir = $(sysconfdir)/apport/crashdb.conf.d | ||
456 | 6 | crashdb_DATA = ubuntuone-client-crashdb.conf | ||
457 | 7 | |||
458 | 8 | configdir = $(sysconfdir)/xdg/ubuntuone | ||
459 | 9 | config_in_files = logging.conf.in | ||
460 | 10 | config_out_files = $(config_in_files:.conf.in=.conf) | ||
461 | 11 | config_files = syncdaemon.conf | ||
462 | 12 | config_DATA = $(config_files) $(config_out_files) | ||
463 | 13 | |||
464 | 14 | autostartdir = $(sysconfdir)/xdg/autostart | ||
465 | 15 | autostart_in_files = ubuntuone-launch.desktop.in | ||
466 | 16 | autostart_DATA = $(autostart_in_files:.desktop.in=.desktop) | ||
467 | 17 | |||
468 | 18 | @INTLTOOL_DESKTOP_RULE@ | ||
469 | 19 | |||
470 | 20 | %.conf: %.conf.in | ||
471 | 21 | @sed -e "s|\@LOG_LEVEL\@|$(LOG_LEVEL)|" \ | ||
472 | 22 | -e "s|\@LOG_FILE_SIZE\@|$(LOG_FILE_SIZE)|" $< > $@ | ||
473 | 23 | |||
474 | 24 | servicedir = $(DBUS_SERVICES_DIR) | ||
475 | 25 | service_in_files = \ | ||
476 | 26 | com.ubuntuone.SyncDaemon.service.in \ | ||
477 | 27 | com.ubuntuone.Credentials.service.in | ||
478 | 28 | service_DATA = $(service_in_files:.service.in=.service) | ||
479 | 29 | |||
480 | 30 | %.service: %.service.in | ||
481 | 31 | @sed -e "s|\@libexecdir\@|$(libexecdir)|" \ | ||
482 | 32 | -e "s|\@bindir\@|$(bindir)|" $< > $@ | ||
483 | 33 | |||
484 | 34 | EXTRA_DIST = \ | ||
485 | 35 | $(config_in_files) \ | ||
486 | 36 | $(config_files) \ | ||
487 | 37 | $(autostart_in_files) \ | ||
488 | 38 | $(service_in_files) \ | ||
489 | 39 | $(apport_DATA) \ | ||
490 | 40 | $(crashdb_DATA) | ||
491 | 41 | |||
492 | 42 | CLEANFILES = \ | ||
493 | 43 | $(config_out_files) \ | ||
494 | 44 | $(autostart_DATA) \ | ||
495 | 45 | $(service_DATA) | ||
496 | 46 | |||
497 | 47 | MAINTAINERCLEANFILES = \ | ||
498 | 48 | Makefile.in | ||
499 | 49 | 0 | ||
500 | === removed file 'docs/Makefile.am' | |||
501 | --- docs/Makefile.am 2013-06-05 20:09:11 +0000 | |||
502 | +++ docs/Makefile.am 1970-01-01 00:00:00 +0000 | |||
503 | @@ -1,6 +0,0 @@ | |||
504 | 1 | |||
505 | 2 | manfilesdir = $(mandir)/man1 | ||
506 | 3 | manfiles_DATA = \ | ||
507 | 4 | man/u1sdtool.1 | ||
508 | 5 | |||
509 | 6 | EXTRA_DIST=$(manfiles_DATA) | ||
510 | 7 | 0 | ||
511 | === renamed file 'run-mac-tests' => 'run-tests' | |||
512 | --- run-mac-tests 2012-08-16 06:36:31 +0000 | |||
513 | +++ run-tests 2013-06-07 17:44:24 +0000 | |||
514 | @@ -1,6 +1,6 @@ | |||
515 | 1 | #! /bin/bash | 1 | #! /bin/bash |
516 | 2 | # | 2 | # |
518 | 3 | # Copyright 2012 Canonical Ltd. | 3 | # Copyright 2012-2013 Canonical Ltd. |
519 | 4 | # | 4 | # |
520 | 5 | # This program is free software: you can redistribute it and/or modify it | 5 | # This program is free software: you can redistribute it and/or modify it |
521 | 6 | # under the terms of the GNU General Public License version 3, as published | 6 | # under the terms of the GNU General Public License version 3, as published |
522 | @@ -27,7 +27,12 @@ | |||
523 | 27 | # version. If you delete this exception statement from all source | 27 | # version. If you delete this exception statement from all source |
524 | 28 | # files in the program, then also delete it here. | 28 | # files in the program, then also delete it here. |
525 | 29 | 29 | ||
527 | 30 | PYTHONPATH=../ubuntu-sso-client/:../ubuntuone-storage-protocol:../ubuntuone-dev-tools:../ubuntuone-fsevents-daemon/python:$PYTHONPATH | 30 | PROXY_TESTS_PATH="tests/proxy" |
528 | 31 | LINT_IGNORES="ubuntuone/platform/filesystem_notifications/pyinotify_agnostic.py" | ||
529 | 32 | |||
530 | 33 | # Allow alternative python executable via environment variable. This is | ||
531 | 34 | # useful for virtualenv testing. | ||
532 | 35 | PYTHON=${PYTHON:-'python'} | ||
533 | 31 | 36 | ||
534 | 32 | set -e | 37 | set -e |
535 | 33 | if [ $# -ne 0 ]; then | 38 | if [ $# -ne 0 ]; then |
536 | @@ -38,14 +43,34 @@ | |||
537 | 38 | MODULE="tests" | 43 | MODULE="tests" |
538 | 39 | fi | 44 | fi |
539 | 40 | 45 | ||
545 | 41 | echo "Executing the tests..." | 46 | style_check() { |
546 | 42 | cp windows/clientdefs.py ubuntuone/clientdefs.py | 47 | u1lint -i "$LINT_IGNORES" |
547 | 43 | cp windows/logging.conf data/logging.conf | 48 | # Don't run pep8 yet, as there are a LOT of warnings to fix |
548 | 44 | # execute the tests with a number of ignored linux only modules | 49 | # pep8 --exclude '.bzr,.pc,build' . bin/* |
549 | 45 | u1trial --reactor=twisted -i "test_linux.py,test_windows.py" -p tests/platform/linux "$MODULE" | 50 | } |
550 | 51 | |||
551 | 52 | SYSNAME=`uname -s` | ||
552 | 53 | |||
553 | 54 | if [ "$SYSNAME" == "Darwin" ]; then | ||
554 | 55 | IGNORE_FILES="test_linux.py,test_windows.py" | ||
555 | 56 | IGNORE_PATHS="tests/platform/linux" | ||
556 | 57 | REACTOR=qt4 | ||
557 | 58 | else | ||
558 | 59 | # Linux | ||
559 | 60 | IGNORE_FILES="test_darwin.py,test_fsevents_daemon.py,test_windows.py" | ||
560 | 61 | IGNORE_PATHS="tests/platform/windows" | ||
561 | 62 | REACTOR=gi | ||
562 | 63 | fi | ||
563 | 64 | |||
564 | 65 | echo "*** Running test suite for ""$MODULE"" ***" | ||
565 | 66 | $PYTHON ./setup.py build | ||
566 | 67 | u1trial --reactor=$REACTOR -i "$IGNORE_FILES" -p "$IGNORE_PATHS,$PROXY_TESTS_PATH" "$MODULE" | ||
567 | 68 | echo "*** Running tests for ubuntuone-client-proxy ***" | ||
568 | 69 | u1trial --reactor=qt4 -i "$IGNORE_FILES" -p "$IGNORE_PATHS" "$PROXY_TESTS_PATH" | ||
569 | 70 | $PYTHON ./setup.py clean | ||
570 | 46 | rm -rf _trial_temp | 71 | rm -rf _trial_temp |
571 | 47 | rm -rf build | 72 | rm -rf build |
572 | 48 | 73 | ||
574 | 49 | python tests/platform/check_reactor_import.py | 74 | $PYTHON tests/platform/check_reactor_import.py |
575 | 50 | 75 | ||
577 | 51 | USE_PYFLAKES="true" u1lint | 76 | style_check |
578 | 52 | 77 | ||
579 | === modified file 'run-tests.bat' | |||
580 | --- run-tests.bat 2012-10-08 20:02:06 +0000 | |||
581 | +++ run-tests.bat 2013-06-07 17:44:24 +0000 | |||
582 | @@ -70,11 +70,16 @@ | |||
583 | 70 | GOTO GETREST | 70 | GOTO GETREST |
584 | 71 | :CONTINUEBATCH | 71 | :CONTINUEBATCH |
585 | 72 | 72 | ||
589 | 73 | ECHO Python found, executing the tests... | 73 | ECHO Python found at %PYTHONEXEPATH%, building auto-generated modules... |
590 | 74 | COPY windows\clientdefs.py ubuntuone\clientdefs.py | 74 | :: call setup.py build so that necessary generated files are built |
591 | 75 | COPY windows\logging.conf data\logging.conf | 75 | ::START "Build code" /D%CD% /WAIT "%PYTHONEXEPATH%\python.exe" setup.py build |
592 | 76 | "%PYTHONEXEPATH%" setup.py build | ||
593 | 77 | ECHO Running tests | ||
594 | 76 | :: execute the tests with a number of ignored linux and mac os only modules | 78 | :: execute the tests with a number of ignored linux and mac os only modules |
595 | 77 | "%TRIALPATH%" --reactor=twisted -c -p tests\platform\linux -i "test_linux.py,test_darwin.py,test_fsevents_daemon.py" %PARAMS% tests | 79 | "%TRIALPATH%" --reactor=twisted -c -p tests\platform\linux -i "test_linux.py,test_darwin.py,test_fsevents_daemon.py" %PARAMS% tests |
596 | 80 | :: Clean the build from the setupt.py | ||
597 | 81 | ECHO Cleaning the generated code before running the style checks... | ||
598 | 82 | "%PYTHONEXEPATH%" setup.py clean | ||
599 | 78 | 83 | ||
600 | 79 | IF %SKIPLINT% == 1 ( | 84 | IF %SKIPLINT% == 1 ( |
601 | 80 | ECHO Skipping style checks | 85 | ECHO Skipping style checks |
602 | 81 | 86 | ||
603 | === added file 'setup.cfg' | |||
604 | --- setup.cfg 1970-01-01 00:00:00 +0000 | |||
605 | +++ setup.cfg 2013-06-07 17:44:24 +0000 | |||
606 | @@ -0,0 +1,2 @@ | |||
607 | 1 | [build_i18n] | ||
608 | 2 | desktop_files=[("etc/xdg/autostart", ("data/ubuntuone-launch.desktop.in",))] | ||
609 | 0 | 3 | ||
610 | === added file 'setup.py' | |||
611 | --- setup.py 1970-01-01 00:00:00 +0000 | |||
612 | +++ setup.py 2013-06-07 17:44:24 +0000 | |||
613 | @@ -0,0 +1,252 @@ | |||
614 | 1 | #!/usr/bin/python | ||
615 | 2 | # | ||
616 | 3 | # Copyright 2013 Canonical Ltd. | ||
617 | 4 | # | ||
618 | 5 | # This program is free software: you can redistribute it and/or modify it | ||
619 | 6 | # under the terms of the GNU General Public License version 3, as published | ||
620 | 7 | # by the Free Software Foundation. | ||
621 | 8 | # | ||
622 | 9 | # This program is distributed in the hope that it will be useful, but | ||
623 | 10 | # WITHOUT ANY WARRANTY; without even the implied warranties of | ||
624 | 11 | # MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR | ||
625 | 12 | # PURPOSE. See the GNU General Public License for more details. | ||
626 | 13 | # | ||
627 | 14 | # You should have received a copy of the GNU General Public License along | ||
628 | 15 | # with this program. If not, see <http://www.gnu.org/licenses/>. | ||
629 | 16 | # | ||
630 | 17 | # In addition, as a special exception, the copyright holders give | ||
631 | 18 | # permission to link the code of portions of this program with the | ||
632 | 19 | # OpenSSL library under certain conditions as described in each | ||
633 | 20 | # individual source file, and distribute linked combinations | ||
634 | 21 | # including the two. | ||
635 | 22 | # You must obey the GNU General Public License in all respects | ||
636 | 23 | # for all of the code used other than OpenSSL. If you modify | ||
637 | 24 | # file(s) with this exception, you may extend this exception to your | ||
638 | 25 | # version of the file(s), but you are not obligated to do so. If you | ||
639 | 26 | # do not wish to do so, delete this exception statement from your | ||
640 | 27 | # version. If you delete this exception statement from all source | ||
641 | 28 | # files in the program, then also delete it here. | ||
642 | 29 | """Setup.py: build, distribute, clean.""" | ||
643 | 30 | |||
644 | 31 | import os | ||
645 | 32 | import sys | ||
646 | 33 | |||
647 | 34 | try: | ||
648 | 35 | import DistUtilsExtra.auto | ||
649 | 36 | from DistUtilsExtra.command import build_extra, build_i18n | ||
650 | 37 | except ImportError: | ||
651 | 38 | print >> sys.stderr, 'To build this program you need '\ | ||
652 | 39 | 'https://launchpad.net/python-distutils-extra' | ||
653 | 40 | sys.exit(1) | ||
654 | 41 | assert DistUtilsExtra.auto.__version__ >= '2.18', \ | ||
655 | 42 | 'needs DistUtilsExtra.auto >= 2.18' | ||
656 | 43 | |||
657 | 44 | try: | ||
658 | 45 | from setuptools import find_packages | ||
659 | 46 | except ImportError: | ||
660 | 47 | from distutils.core import find_packages | ||
661 | 48 | |||
662 | 49 | |||
663 | 50 | PROJECT_NAME = 'ubuntuone-client' | ||
664 | 51 | VERSION = '13.05' | ||
665 | 52 | |||
666 | 53 | POT_FILE = 'po/%s.pot' % PROJECT_NAME | ||
667 | 54 | SERVICE_FILES = ['data/com.ubuntuone.Credentials.service', | ||
668 | 55 | 'data/com.ubuntuone.SyncDaemon.service'] | ||
669 | 56 | CONFIG_FILES = ['data/logging.conf'] | ||
670 | 57 | CLIENTDEFS = 'ubuntuone/clientdefs.py' | ||
671 | 58 | |||
672 | 59 | BUILD_FILES = [CLIENTDEFS] + CONFIG_FILES | ||
673 | 60 | CLEANFILES = [POT_FILE, 'MANIFEST'] + BUILD_FILES + SERVICE_FILES | ||
674 | 61 | |||
675 | 62 | if int(VERSION.split('.')[1]) % 2 != 0: | ||
676 | 63 | LOG_LEVEL = 'DEBUG' | ||
677 | 64 | LOG_FILE_SIZE = '10485760' | ||
678 | 65 | else: | ||
679 | 66 | LOG_LEVEL = 'INFO' | ||
680 | 67 | LOG_FILE_SIZE = '1048576' | ||
681 | 68 | |||
682 | 69 | |||
683 | 70 | def replace_variables(files_to_replace, prefix=None, *args, **kwargs): | ||
684 | 71 | """Replace the @VERSION@ in the constants file with the actual version.""" | ||
685 | 72 | for fname in files_to_replace: | ||
686 | 73 | with open(fname + '.in') as in_file: | ||
687 | 74 | content = in_file.read() | ||
688 | 75 | with open(fname, 'w') as out_file: | ||
689 | 76 | content = content.replace('@VERSION@', VERSION) | ||
690 | 77 | content = content.replace('@PROJECT_NAME@', PROJECT_NAME) | ||
691 | 78 | content = content.replace('@GETTEXT_PACKAGE@', PROJECT_NAME) | ||
692 | 79 | content = content.replace('@LOG_LEVEL@', LOG_LEVEL) | ||
693 | 80 | content = content.replace('@LOG_FILE_SIZE@', LOG_FILE_SIZE) | ||
694 | 81 | if prefix is not None: | ||
695 | 82 | content = content.replace( | ||
696 | 83 | '@localedir@', os.path.join(prefix, | ||
697 | 84 | 'share', 'locale')) | ||
698 | 85 | content = content.replace( | ||
699 | 86 | '@libexecdir@', os.path.join(prefix, | ||
700 | 87 | 'lib', PROJECT_NAME)) | ||
701 | 88 | out_file.write(content) | ||
702 | 89 | |||
703 | 90 | |||
704 | 91 | class Install(DistUtilsExtra.auto.install_auto): | ||
705 | 92 | """Class to install proper files.""" | ||
706 | 93 | |||
707 | 94 | def run(self): | ||
708 | 95 | """Do the install. | ||
709 | 96 | |||
710 | 97 | Read from *.service.in and generate .service files by replacing | ||
711 | 98 | @prefix@ by self.prefix. | ||
712 | 99 | |||
713 | 100 | """ | ||
714 | 101 | # Get just the prefix value, without the root | ||
715 | 102 | prefix = self.install_data.replace( | ||
716 | 103 | self.root if self.root is not None else '', '') | ||
717 | 104 | replace_variables(SERVICE_FILES, prefix) | ||
718 | 105 | DistUtilsExtra.auto.install_auto.run(self) | ||
719 | 106 | # Replace the CLIENTDEFS paths here, so that we can do it directly in | ||
720 | 107 | # the installed copy, rather than the lcoal copy. This allows us to | ||
721 | 108 | # have a semi-generated version for use in tests, and a full version | ||
722 | 109 | # for use in installed systems. | ||
723 | 110 | with open(CLIENTDEFS) as in_file: | ||
724 | 111 | content = in_file.read() | ||
725 | 112 | with open(os.path.join(self.install_purelib, | ||
726 | 113 | PROJECT_NAME, | ||
727 | 114 | CLIENTDEFS), 'w') as out_file: | ||
728 | 115 | content = content.replace( | ||
729 | 116 | '@localedir@', os.path.join(prefix, 'share', 'locale')) | ||
730 | 117 | content = content.replace( | ||
731 | 118 | '@libexecdir@', os.path.join(prefix, 'lib', PROJECT_NAME)) | ||
732 | 119 | out_file.write(content) | ||
733 | 120 | |||
734 | 121 | |||
735 | 122 | class Build(build_extra.build_extra): | ||
736 | 123 | """Build PyQt (.ui) files and resources.""" | ||
737 | 124 | |||
738 | 125 | description = "build PyQt GUIs (.ui) and resources (.qrc)" | ||
739 | 126 | |||
740 | 127 | def run(self): | ||
741 | 128 | """Execute the command.""" | ||
742 | 129 | replace_variables(BUILD_FILES) | ||
743 | 130 | build_extra.build_extra.run(self) | ||
744 | 131 | |||
745 | 132 | |||
746 | 133 | class Clean(DistUtilsExtra.auto.clean_build_tree): | ||
747 | 134 | """Class to clean up after the build.""" | ||
748 | 135 | |||
749 | 136 | def run(self): | ||
750 | 137 | """Clean up the built files.""" | ||
751 | 138 | for built_file in CLEANFILES: | ||
752 | 139 | if os.path.exists(built_file): | ||
753 | 140 | os.unlink(built_file) | ||
754 | 141 | |||
755 | 142 | DistUtilsExtra.auto.clean_build_tree.run(self) | ||
756 | 143 | |||
757 | 144 | |||
758 | 145 | class BuildLocale(build_i18n.build_i18n): | ||
759 | 146 | """Workaround a bug in DistUtilsExtra.""" | ||
760 | 147 | |||
761 | 148 | def run(self): | ||
762 | 149 | """Magic.""" | ||
763 | 150 | build_i18n.build_i18n.run(self) | ||
764 | 151 | i = 0 | ||
765 | 152 | for df in self.distribution.data_files: | ||
766 | 153 | if df[0].startswith('etc/xdg/'): | ||
767 | 154 | if sys.platform not in ('darwin', 'win32'): | ||
768 | 155 | new_df = (df[0].replace('etc/xdg/', '/etc/xdg/'), df[1]) | ||
769 | 156 | self.distribution.data_files[i] = new_df | ||
770 | 157 | else: | ||
771 | 158 | self.distribution.data_files.pop(i) | ||
772 | 159 | i += 1 | ||
773 | 160 | |||
774 | 161 | |||
775 | 162 | def set_py2exe_paths(): | ||
776 | 163 | """Set the path so that py2exe finds the required modules.""" | ||
777 | 164 | # Pylint does not understand same spaced imports | ||
778 | 165 | # pylint: disable=F0401 | ||
779 | 166 | import win32com | ||
780 | 167 | # pylint: enable=F0401 | ||
781 | 168 | try: | ||
782 | 169 | # pylint: disable=F0401 | ||
783 | 170 | import py2exe.mf as modulefinder | ||
784 | 171 | # pylint: enable=F0401 | ||
785 | 172 | except ImportError: | ||
786 | 173 | import modulefinder | ||
787 | 174 | |||
788 | 175 | # py2exe 0.6.4 introduced a replacement modulefinder. | ||
789 | 176 | # This means we have to add package paths there, | ||
790 | 177 | # not to the built-in one. If this new modulefinder gets | ||
791 | 178 | # integrated into Python, then we might be able to revert | ||
792 | 179 | # this some day. If this doesn't work, try import modulefinder | ||
793 | 180 | for package_path in win32com.__path__[1:]: | ||
794 | 181 | modulefinder.AddPackagePath("win32com", package_path) | ||
795 | 182 | for extra_mod in ["win32com.server", "win32com.client"]: | ||
796 | 183 | __import__(extra_mod) | ||
797 | 184 | module = sys.modules[extra_mod] | ||
798 | 185 | for module_path in module.__path__[1:]: | ||
799 | 186 | modulefinder.AddPackagePath(extra_mod, module_path) | ||
800 | 187 | |||
801 | 188 | |||
802 | 189 | # pylint: disable=C0103 | ||
803 | 190 | |||
804 | 191 | cmdclass = { | ||
805 | 192 | 'install': Install, | ||
806 | 193 | 'build': Build, | ||
807 | 194 | 'clean': Clean, | ||
808 | 195 | 'build_i18n': BuildLocale, | ||
809 | 196 | } | ||
810 | 197 | |||
811 | 198 | bin_scripts = [ | ||
812 | 199 | 'bin/u1sdtool', | ||
813 | 200 | 'bin/ubuntuone-launch', | ||
814 | 201 | ] | ||
815 | 202 | |||
816 | 203 | libexec_scripts = [ | ||
817 | 204 | 'bin/ubuntuone-login', | ||
818 | 205 | 'bin/ubuntuone-proxy-tunnel', | ||
819 | 206 | 'bin/ubuntuone-syncdaemon', | ||
820 | 207 | ] | ||
821 | 208 | |||
822 | 209 | data_files = [] | ||
823 | 210 | scripts = [] | ||
824 | 211 | |||
825 | 212 | if sys.platform == 'win32': | ||
826 | 213 | set_py2exe_paths() | ||
827 | 214 | extra = { | ||
828 | 215 | 'options': { | ||
829 | 216 | 'py2exe': { | ||
830 | 217 | 'bundle_files': 1, | ||
831 | 218 | 'skip_archive': 0, | ||
832 | 219 | 'optimize': 1, | ||
833 | 220 | 'dll_excludes': ["mswsock.dll", "powrprof.dll"], | ||
834 | 221 | }, | ||
835 | 222 | }, | ||
836 | 223 | # add the console script so that py2exe compiles it | ||
837 | 224 | 'console': bin_scripts + libexec_scripts, | ||
838 | 225 | 'zipfile': None, | ||
839 | 226 | } | ||
840 | 227 | else: | ||
841 | 228 | data_files.extend([ | ||
842 | 229 | ('lib/%s' % PROJECT_NAME, libexec_scripts), | ||
843 | 230 | ('share/dbus-1/services', SERVICE_FILES), | ||
844 | 231 | ('/etc/xdg/ubuntuone', CONFIG_FILES + ['data/syncdaemon.conf']), | ||
845 | 232 | ('/etc/apport/crashdb.conf.d', ['data/ubuntuone-client-crashdb.conf']), | ||
846 | 233 | ('share/apport/package-hooks', ['data/source_ubuntuone-client.py']), | ||
847 | 234 | ('share/man1', ['docs/man/u1sdtool.1']), | ||
848 | 235 | ]) | ||
849 | 236 | scripts.extend(bin_scripts) | ||
850 | 237 | extra = {} | ||
851 | 238 | |||
852 | 239 | DistUtilsExtra.auto.setup( | ||
853 | 240 | name=PROJECT_NAME, | ||
854 | 241 | version=VERSION, | ||
855 | 242 | license='GPL v3', | ||
856 | 243 | author='Ubuntu One Developers', | ||
857 | 244 | author_email='ubuntuone-users@lists.launchpad.net', | ||
858 | 245 | description='Ubuntu One file synchronization client', | ||
859 | 246 | url='https://launchpad.net/%s' % PROJECT_NAME, | ||
860 | 247 | extra_path=PROJECT_NAME, | ||
861 | 248 | scripts=scripts, | ||
862 | 249 | data_files=data_files, | ||
863 | 250 | packages=find_packages(), | ||
864 | 251 | cmdclass=cmdclass, | ||
865 | 252 | **extra) | ||
866 | 0 | 253 | ||
867 | === modified file 'ubuntuone/clientdefs.py.in' | |||
868 | --- ubuntuone/clientdefs.py.in 2012-04-09 20:07:05 +0000 | |||
869 | +++ ubuntuone/clientdefs.py.in 2013-06-07 17:44:24 +0000 | |||
870 | @@ -36,17 +36,9 @@ | |||
871 | 36 | 36 | ||
872 | 37 | import gettext | 37 | import gettext |
873 | 38 | 38 | ||
874 | 39 | |||
875 | 40 | Q_ = lambda string: gettext.dgettext(GETTEXT_PACKAGE, string) | 39 | Q_ = lambda string: gettext.dgettext(GETTEXT_PACKAGE, string) |
876 | 41 | 40 | ||
877 | 42 | # pylint: disable-msg=C0301 | ||
878 | 43 | VERSION = "@VERSION@" | 41 | VERSION = "@VERSION@" |
879 | 44 | LOCALEDIR = "@localedir@" | 42 | LOCALEDIR = "@localedir@" |
880 | 45 | LIBEXECDIR = "@libexecdir@" | 43 | LIBEXECDIR = "@libexecdir@" |
881 | 46 | GETTEXT_PACKAGE = "@GETTEXT_PACKAGE@" | 44 | GETTEXT_PACKAGE = "@GETTEXT_PACKAGE@" |
882 | 47 | |||
883 | 48 | # these variables are Deprecated, use those defined in ubuntuone.credentials | ||
884 | 49 | APP_NAME = "@SSO_APP_NAME@" | ||
885 | 50 | TC_URL = "@SSO_TC_URL@" | ||
886 | 51 | PING_URL = "@SSO_PING_URL@" | ||
887 | 52 | DESCRIPTION = Q_("Ubuntu One requires an Ubuntu Single Sign On (SSO) account. This process will allow you to create a new account, if you do not yet have one.") | ||
888 | 53 | 45 | ||
889 | === removed directory 'windows' | |||
890 | === removed file 'windows/clientdefs.py' | |||
891 | --- windows/clientdefs.py 2012-04-09 20:07:05 +0000 | |||
892 | +++ windows/clientdefs.py 1970-01-01 00:00:00 +0000 | |||
893 | @@ -1,53 +0,0 @@ | |||
894 | 1 | # ubuntuone.clientdefs - Configure-time definitions | ||
895 | 2 | # | ||
896 | 3 | # Author: David Planella <david.planella@ubuntu.com> | ||
897 | 4 | # | ||
898 | 5 | # Copyright 2009-2012 Canonical Ltd. | ||
899 | 6 | # | ||
900 | 7 | # This program is free software: you can redistribute it and/or modify it | ||
901 | 8 | # under the terms of the GNU General Public License version 3, as published | ||
902 | 9 | # by the Free Software Foundation. | ||
903 | 10 | # | ||
904 | 11 | # This program is distributed in the hope that it will be useful, but | ||
905 | 12 | # WITHOUT ANY WARRANTY; without even the implied warranties of | ||
906 | 13 | # MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR | ||
907 | 14 | # PURPOSE. See the GNU General Public License for more details. | ||
908 | 15 | # | ||
909 | 16 | # You should have received a copy of the GNU General Public License along | ||
910 | 17 | # with this program. If not, see <http://www.gnu.org/licenses/>. | ||
911 | 18 | # | ||
912 | 19 | # In addition, as a special exception, the copyright holders give | ||
913 | 20 | # permission to link the code of portions of this program with the | ||
914 | 21 | # OpenSSL library under certain conditions as described in each | ||
915 | 22 | # individual source file, and distribute linked combinations | ||
916 | 23 | # including the two. | ||
917 | 24 | # You must obey the GNU General Public License in all respects | ||
918 | 25 | # for all of the code used other than OpenSSL. If you modify | ||
919 | 26 | # file(s) with this exception, you may extend this exception to your | ||
920 | 27 | # version of the file(s), but you are not obligated to do so. If you | ||
921 | 28 | # do not wish to do so, delete this exception statement from your | ||
922 | 29 | # version. If you delete this exception statement from all source | ||
923 | 30 | # files in the program, then also delete it here. | ||
924 | 31 | """ | ||
925 | 32 | Ubuntu One client definitions. | ||
926 | 33 | |||
927 | 34 | This is a package containing configure-time definitions for the Ubuntu One | ||
928 | 35 | client. | ||
929 | 36 | """ | ||
930 | 37 | |||
931 | 38 | import gettext | ||
932 | 39 | |||
933 | 40 | |||
934 | 41 | Q_ = lambda string: gettext.dgettext(GETTEXT_PACKAGE, string) | ||
935 | 42 | |||
936 | 43 | # pylint: disable-msg=C0301 | ||
937 | 44 | VERSION = '0.1' | ||
938 | 45 | LOCALEDIR = '' | ||
939 | 46 | LIBEXECDIR = '' | ||
940 | 47 | GETTEXT_PACKAGE = '' | ||
941 | 48 | |||
942 | 49 | # these variables are Deprecated, use those defined in ubuntuone.credentials | ||
943 | 50 | APP_NAME="Ubuntu One" | ||
944 | 51 | TC_URL="https://one.ubuntu.com/terms/" | ||
945 | 52 | PING_URL="https://one.ubuntu.com/oauth/sso-finished-so-get-tokens/" | ||
946 | 53 | DESCRIPTION = Q_("Ubuntu One requires an Ubuntu Single Sign On (SSO) account. This process will allow you to create a new account, if you do not yet have one.") | ||
947 | 54 | 0 | ||
948 | === removed file 'windows/logging.conf' | |||
949 | --- windows/logging.conf 2011-08-24 16:24:01 +0000 | |||
950 | +++ windows/logging.conf 1970-01-01 00:00:00 +0000 | |||
951 | @@ -1,13 +0,0 @@ | |||
952 | 1 | [logging] | ||
953 | 2 | level.default = DEBUG | ||
954 | 3 | level.parser = log_level | ||
955 | 4 | level.help = Set the log level (TRACE, DEBUG, INFO, WARNING, ERROR, NOTE | ||
956 | 5 | CRITICAL, FATAL) | ||
957 | 6 | |||
958 | 7 | file_size.default = 1000000 | ||
959 | 8 | file_size.parser = int | ||
960 | 9 | file_size.help = max file size (the file will be rotated) | ||
961 | 10 | |||
962 | 11 | backup_count.default = 5 | ||
963 | 12 | backup_count.parser = int | ||
964 | 13 | backup_count.help = number of rotated log files to keep around. |
The linux part looks fine.
I have not checked the osx and win parts.