Merge lp:~dobey/ubuntuone-client/py-only into lp:ubuntuone-client

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
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

To post a comment you must log in.
lp:~dobey/ubuntuone-client/py-only updated
1399. By dobey

Add a space.

Revision history for this message
Alejandro J. Cura (alecu) wrote :

The linux part looks fine.
I have not checked the osx and win parts.

review: Approve
lp:~dobey/ubuntuone-client/py-only updated
1400. By dobey

Remove autogen.sh too

1401. By dobey

Update run-tests.bat for the changes.

1402. By dobey

Fix typo and allow use of $PYTHON when calling setup.py.

1403. By dobey

Default to python instead of empty string.

Revision history for this message
Brian Curtin (brian.curtin) :
review: Approve
Revision history for this message
Mike McCracken (mikemc) wrote :

osx ok.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file '.bzrignore'
--- .bzrignore 2011-02-09 19:54:46 +0000
+++ .bzrignore 2013-06-07 17:44:24 +0000
@@ -1,86 +1,15 @@
1Makefile
2Makefile.in
3Makefile.in.in
4POTFILES1POTFILES
5.deps
6.libs
7autom4te.cache
8build2build
9dist3dist
10m4
11tmp
12_trial_temp4_trial_temp
13aclocal.m45*.egg-info
14config.guess6
15config.h
16config.h.in
17config.log
18config.status
19config.sub
20configure
21depcomp
22install-sh
23intltool-*
24libtool
25ltmain.sh
26missing
27setup.py
28stamp-*
29*.desktop7*.desktop
30*.gmo8*.gmo
31*.icon
32*.la
33*.lo
34*.menu
35*_pb2.py9*_pb2.py
36*.pot10*.pot
37*.pyc11*.pyc
38*.rendercache
39*.service12*.service
40.intltool-merge-cache
41gtk-doc.make
4213
43ubuntuone-client-*.tar.*
44hicolor
45icons
46storageprotocol
47clientdefs.py14clientdefs.py
48docs/syncdaemon_dbus_api.txt
49docs/reference/html*
50docs/reference/libsyncdaemon-decl-list.txt
51docs/reference/libsyncdaemon-decl-list.txt.bak
52docs/reference/libsyncdaemon-decl.txt
53docs/reference/libsyncdaemon-decl.txt.bak
54docs/reference/libsyncdaemon-overrides.txt
55docs/reference/libsyncdaemon-sections.txt
56docs/reference/libsyncdaemon-undeclared.txt
57docs/reference/libsyncdaemon-undocumented.txt
58docs/reference/libsyncdaemon-unused.txt
59docs/reference/libsyncdaemon.args
60docs/reference/libsyncdaemon.hierarchy
61docs/reference/libsyncdaemon.interfaces
62docs/reference/libsyncdaemon.prerequisites
63docs/reference/libsyncdaemon.signals
64docs/reference/libsyncdaemon.types
65docs/reference/*.stamp
66docs/reference/tmpl
67docs/reference/xml*
68logging.conf15logging.conf
69ubuntuone-marshallers.[ch]
70
71nautilus/test-contacts-picker
72nautilus/test-highlight
73
74libsyncdaemon/syncdaemon-marshal.[ch]
75libsyncdaemon/test-libsyncdaemon
76libsyncdaemon/test-libsyncdaemon-vapi
77libsyncdaemon/test-libsyncdaemon-vapi.c
78libsyncdaemon/libsyncdaemon-1.0.pc
79libsyncdaemon/Syncdaemon-1.0.gir
80libsyncdaemon/Syncdaemon-1.0.typelib
81libsyncdaemon/libsyncdaemon-1.0.deps
82libsyncdaemon/libsyncdaemon-1.0.vapi
83*_vala.stamp
84
85ubuntuone.gnome-settings-plugin
86test-gsd-ubuntuone
8716
=== removed file 'Makefile.am'
--- Makefile.am 2013-06-05 20:09:11 +0000
+++ Makefile.am 1970-01-01 00:00:00 +0000
@@ -1,154 +0,0 @@
1SUBDIRS = data po docs
2
3# Shut libtoolize up
4ACLOCAL_AMFLAGS = -I m4
5
6# PYTHONPATH for local Python scripts
7PYTHONPATH="$(SSO_PATH):$(USP_PATH):$(top_builddir):$(top_srcdir)"
8
9# Python packages we want to install
10pythonpkgdir = $(pythondir)/$(PACKAGE)
11pypackages = \
12 ubuntuone \
13 $(shell SRCDIR="ubuntuone"; for i in `find $$SRCDIR -type d`; do DIRNAME=`basename $$i`; if [ "x$$DIRNAME" != "xtest" ]; then printf "$$i "; fi; done)
14
15# Install our scripts and extra data here
16bin_SCRIPTS = \
17 bin/ubuntuone-launch \
18 bin/u1sdtool
19
20libexec_SCRIPTS = \
21 bin/ubuntuone-syncdaemon \
22 bin/ubuntuone-proxy-tunnel \
23 bin/ubuntuone-login
24
25clientdefsdir = $(pythonpkgdir)/ubuntuone
26clientdefs_in_files = ubuntuone/clientdefs.py.in
27clientdefs_DATA = $(clientdefs_in_files:.py.in=.py)
28
29# Don't end up pulling in storage-protocol source as well
30pyfiles = $(shell SRCDIR="$(top_srcdir)/ubuntuone"; for i in `find $$SRCDIR -type f -name "*.py"`; do if [ ! -f $$i.in ]; then printf "$$i "; fi; done)
31
32$(clientdefs_DATA): $(clientdefs_in_files) ubuntuone
33 sed -e 's|\@localedir\@|$(localedir)|g' \
34 -e 's|\@libexecdir\@|$(libexecdir)|g' \
35 -e 's|\@GETTEXT_PACKAGE\@|$(GETTEXT_PACKAGE)|g' \
36 -e 's|\@SSO_APP_NAME\@|$(SSO_APP_NAME)|g' \
37 -e 's|\@SSO_TC_URL\@|$(SSO_TC_URL)|g' \
38 -e 's|\@SSO_PING_URL\@|$(SSO_PING_URL)|g' \
39 -e 's|\@VERSION\@|$(VERSION)|g' < $< > $@
40
41logging.conf: data/logging.conf.in Makefile
42 $(MAKE) -C data logging.conf
43
44lint: $(clientdefs_DATA) Makefile
45 PYTHONPATH="$(PYTHONPATH)" SRCDIR="$(srcdir)" USE_PYFLAKES="true" u1lint -i ubuntuone/platform/filesystem_notifications/pyinotify_agnostic.py
46
47test: logging.conf $(clientdefs_DATA) Makefile
48 echo "$(PYTHONPATH)"
49 if test "x$(builddir)" == "x$(srcdir)"; then \
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; \
51 PYTHONPATH="$(PYTHONPATH)" u1trial -r qt4 -p tests/platform/windows -i "test_windows.py,test_darwin.py" tests/proxy || exit 1; \
52 PYTHONPATH="$(PYTHONPATH)" $(PYTHON) tests/platform/check_reactor_import.py || exit 1; \
53 fi
54 rm -rf _trial_temp
55
56test-proxy: logging.conf $(clientdefs_DATA) Makefile
57 if test "x$(builddir)" == "x$(srcdir)"; then \
58 PYTHONPATH="$(PYTHONPATH)" u1trial -r qt4 -p tests/platform/windows -i "test_windows.py,test_darwin.py" tests/proxy || exit 1; \
59 fi
60 rm -rf _trial_temp
61
62test-coverage: logging.conf $(clientdefs_DATA) Makefile
63 if test "x$(builddir)" == "x$(srcdir)"; then \
64 PYTHONPATH="$(PYTHONPATH)" u1trial -r $(REACTOR) -c -p tests/platform/windows -i "test_windows.py,test_darwin.py" tests; \
65 fi
66 rm -rf _trial_temp
67
68check: lint test Makefile
69
70docs: $(clientdefs_DATA) Makefile
71 $(mkdir_p) docs
72 if test "x$(builddir)" != "x$(srcdir)" -a -f "$(srcdir)/docs/syncdaemon_dbus_api.txt"; then \
73 $(LN_S) "$(top_srcdir)/docs/syncdaemon_dbus_api.txt" "docs/syncdaemon_dbus_api.txt"; \
74 else \
75 PYTHONPATH="$(PYTHONPATH)" SRCDIR="$(srcdir)" $(PYTHON) $(srcdir)/contrib/dbus-docs; \
76 fi
77
78ubuntuone: Makefile
79 if test "x$(builddir)" != "x$(srcdir)"; then \
80 $(mkdir_p) ubuntuone; \
81 $(mkdir_p) tests; \
82 (cd ubuntuone && $(LNDIR) $(srcdir)/../ubuntuone > /dev/null); \
83 (cd tests && $(LNDIR) $(srcdir)/../tests > /dev/null); \
84 fi
85
86all-local: logging.conf $(clientdefs_DATA)
87
88sd_path = ubuntuone/syncdaemon
89
90u1fsfsm: $(srcdir)/ubuntuone/syncdaemon/u1fsfsm.ods
91 PYTHONPATH=$(PYTHONPATH) \
92 HAS_OOFFICE="true" \
93 XDG_CACHE_HOME="$(builddir)/_trial_temp/xdg_cache" \
94 $(PYTHON) -t $(srcdir)/$(sd_path)/fsm/fsm_parser.py \
95 -o $(builddir)/$(sd_path)/u1fsfsm.py $<
96 PYTHONPATH=$(PYTHONPATH) \
97 HAS_OOFFICE="true" \
98 XDG_CACHE_HOME="$(builddir)/_trial_temp/xdg_cache" \
99 $(PYTHON) -t $(srcdir)/$(sd_path)/fsm/fsm.py \
100 $(srcdir)/$(sd_path)/u1fsfsm.py
101
102install-data-local: $(clientdefs_DATA)
103 for package in $(pypackages); do \
104 $(mkdir_p) $(DESTDIR)$(pythonpkgdir)/$$package; \
105 for module in $(top_srcdir)/$$package/*.py; do \
106 $(install_sh_DATA) $$module $(DESTDIR)$(pythonpkgdir)/$$package; \
107 done; \
108 done
109 echo "$(PACKAGE)" > $(DESTDIR)$(pythondir)/$(PACKAGE).pth
110
111uninstall-local:
112 for package in $(pypackages); do \
113 for module in $(top_srcdir)/$$package/*.py; do \
114 modname=`basename $$module`; \
115 rm -f $(DESTDIR)$(pythonpkgdir)/$$package/$$modname; \
116 done; \
117 rmdir -p --ignore-fail-on-non-empty $(DESTDIR)$(pythonpkgdir)/$$package; \
118 done
119 rm -f $(DESTDIR)$(pythondir)/$(PACKAGE).pth
120
121clean-local:
122 for i in `find $(builddir) -name "*.pyc"`; do \
123 rm -f $$i; \
124 done
125 rm -rf build dist _trial_temp
126
127EXTRA_DIST = \
128 $(srcdir)/ubuntuone/syncdaemon/u1fsfsm.ods \
129 $(pyfiles) \
130 $(clientdefs_in_files) \
131 LICENSE \
132 LICENSE.OpenSSL \
133 HACKING \
134 VERSION \
135 bin \
136 contrib \
137 tests
138
139CLEANFILES = \
140 $(clientdefs_DATA)
141
142MAINTAINERCLEANFILES = \
143 Makefile.in \
144 aclocal.m4 \
145 config.guess \
146 config.h.in \
147 config.sub \
148 configure \
149 depcomp \
150 install-sh \
151 libtool \
152 ltmain.sh \
153 missing \
154 mkinstalldirs
1550
=== removed file 'VERSION'
--- VERSION 2013-05-28 21:50:41 +0000
+++ VERSION 1970-01-01 00:00:00 +0000
@@ -1,1 +0,0 @@
199.12
20
=== removed file 'autogen.sh'
--- autogen.sh 2013-06-05 20:09:11 +0000
+++ autogen.sh 1970-01-01 00:00:00 +0000
@@ -1,21 +0,0 @@
1#!/bin/sh
2# Run this to generate all the initial makefiles, etc.
3
4srcdir=`dirname $0`
5test -z "$srcdir" && srcdir=.
6
7PKG_NAME="ubuntuone-client"
8REQUIRED_AUTOMAKE_VERSION="1.10"
9
10(test -f $srcdir/configure.ac) || {
11 echo -n "**Error**: Directory "\`$srcdir\'" does not look like the"
12 echo " top-level $PKG_NAME directory"
13 exit 1
14}
15
16which gnome-autogen.sh || {
17 echo "You need to install gnome-common from the GNOME source repository"
18 exit 1
19}
20mkdir -p "$srcdir/m4"
21USE_GNOME2_MACROS=1 . gnome-autogen.sh
220
=== removed file 'configure.ac'
--- configure.ac 2013-06-05 20:09:11 +0000
+++ configure.ac 1970-01-01 00:00:00 +0000
@@ -1,139 +0,0 @@
1dnl Process this file with autoconf to produce a configure script.
2AC_PREREQ(2.53)
3
4# We need to omit the trailing newline when catting the VERSION file
5AC_INIT([ubuntuone-client], m4_esyscmd([cat VERSION | tr -d '\012']))
6AC_CONFIG_SRCDIR([VERSION])
7
8AM_INIT_AUTOMAKE([1.10 foreign tar-ustar])
9
10m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])
11
12# Workaround to make aclocal get the right flags
13AC_CONFIG_MACRO_DIR([m4])
14AC_SUBST(ACLOCAL_AMFLAGS, "\${ACLOCAL_FLAGS} -I m4")
15
16IT_PROG_INTLTOOL([0.40.0])
17
18GETTEXT_PACKAGE="${PACKAGE}"
19AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE",
20 [translation domain of this package])
21AC_SUBST(GETTEXT_PACKAGE)
22localedir='$(prefix)/$(DATADIRNAME)/locale'
23AC_SUBST(localedir)
24
25# Need lndir for builddir != srcdir builds, because Python is not sane
26AC_PATH_PROG([LNDIR], [lndir], [])
27if test "x$LNDIR" = "x"; then
28 AC_MSG_ERROR([lndir is required to build ubuntuone-client])
29fi
30
31# Alter default logging if we're development vs. stable
32AC_MSG_CHECKING([development series build])
33DEVVERSION="`echo $PACKAGE_VERSION|cut -d. -f2`"
34if expr $DEVVERSION % 2 > /dev/null != "0"; then
35 debugging=yes
36 AC_MSG_RESULT([yes])
37else
38 debugging=no
39 AC_MSG_RESULT([no])
40fi
41
42AC_ARG_ENABLE([debug],
43 AC_HELP_STRING([--enable-debug],
44 [Enable debug logging by default [default=auto]]),
45 enable_debug=$enableval,
46 enable_debug=$debugging)
47if test "x$enable_debug" != "xno"; then
48 LOG_LEVEL="DEBUG"
49 LOG_FILE_SIZE="10485760"
50 CFLAGS="${CFLAGS} -Wall -Werror"
51 AC_SUBST(CFLAGS)
52else
53 LOG_LEVEL="INFO"
54 LOG_FILE_SIZE="1048576"
55fi
56AC_SUBST(LOG_LEVEL)
57AC_SUBST(LOG_FILE_SIZE)
58
59# Check for python 2.6
60AM_PATH_PYTHON([2.6])
61
62# Specify the path for ubuntu-sso-client source
63AC_MSG_CHECKING([for ubuntu-sso-client])
64AC_ARG_WITH([sso],
65 AC_HELP_STRING([--with-sso],
66 [Specify path to ubuntu-sso-client [default=auto]]),
67 [with_sso=$withval],
68 [with_sso=auto])
69SSO_PATH=""
70if test "x$with_sso" = "xauto"; then
71 SSO_PATH=""
72 AC_MSG_RESULT([using system path])
73else
74 SSO_PATH="$with_sso"
75 AC_MSG_RESULT([$SSO_PATH])
76fi
77AC_SUBST(SSO_PATH)
78
79# Specify the path for ubuntuone-storage-protocol source
80AC_MSG_CHECKING([for ubuntuone-storage-protocol])
81AC_ARG_WITH([protocol],
82 AC_HELP_STRING([--with-protocol],
83 [Specify path to storage protocol [default=auto]]),
84 [with_protocol=$withval],
85 [with_protocol=auto])
86USP_PATH=""
87if test "x$with_protocol" = "xauto"; then
88 USP_PATH=""
89 AC_MSG_RESULT([using system path])
90else
91 USP_PATH="$with_protocol"
92 AC_MSG_RESULT([$USP_PATH])
93fi
94AC_SUBST(USP_PATH)
95
96PKG_CHECK_MODULES(DBUS, [dbus-glib-1 >= 0.70])
97AC_SUBST(DBUS_CFLAGS)
98AC_SUBST(DBUS_LIBS)
99
100dnl ---------------------------------------------------------------------------
101dnl - Are we specifying a different dbus root ?
102dnl ---------------------------------------------------------------------------
103AC_ARG_WITH(dbus-services,
104 [AC_HELP_STRING([--with-dbus-services=<dir>],
105 [where D-BUS services directory is])])
106if ! test -z "$with_dbus_services" ; then
107 DBUS_SERVICES_DIR="$with_dbus_services"
108else
109 # D-BUS 0.23 and higher use $prefix/share/dbus-1/services
110 DBUS_SERVICES_DIR="\${datadir}/dbus-1/services"
111fi
112AC_SUBST(DBUS_SERVICES_DIR)
113
114dnl Strings to pass to SSO data
115SSO_APP_NAME="Ubuntu One"
116SSO_TC_URL="https://one.ubuntu.com/terms/"
117SSO_PING_URL="https://one.ubuntu.com/oauth/sso-finished-so-get-tokens/"
118AC_SUBST(SSO_APP_NAME)
119AC_SUBST(SSO_TC_URL)
120AC_SUBST(SSO_PING_URL)
121AC_DEFINE_UNQUOTED([SSO_APP_NAME], ["$SSO_APP_NAME"], ["The Ubuntu One app name."])
122AC_DEFINE_UNQUOTED([SSO_TC_URL], ["$SSO_TC_URL"], ["The Ubuntu One terms and conditions URL."])
123AC_DEFINE_UNQUOTED([SSO_PING_URL], ["$SSO_PING_URL"], ["The Ubuntu One url to ping to when new tokens are stored."])
124
125AC_CONFIG_FILES([
126Makefile
127data/Makefile
128po/Makefile.in
129docs/Makefile
130])
131
132if [[ -n "$(lsb_release -r | grep -v '1[2-9].[0-9][0-9]')" ]]; then
133 REACTOR="glib";
134else
135 REACTOR="gi"
136fi
137AC_SUBST(REACTOR)
138
139AC_OUTPUT
1400
=== renamed file 'ubuntuone/syncdaemon/fsm/fsm_draw.py' => 'contrib/draw-fsm' (properties changed: -x to +x)
--- ubuntuone/syncdaemon/fsm/fsm_draw.py 2012-04-09 20:07:05 +0000
+++ contrib/draw-fsm 2013-06-07 17:44:24 +0000
@@ -1,3 +1,4 @@
1#!/usr/bin/python
1# ubuntuone.syncdaemon.fsm.fsm_draw - draw a fsm2# ubuntuone.syncdaemon.fsm.fsm_draw - draw a fsm
2#3#
3# Author: Lucio Torre <lucio.torre@canonical.com>4# Author: Lucio Torre <lucio.torre@canonical.com>
@@ -35,7 +36,7 @@
35import sys36import sys
3637
37# pylint: disable-msg=F040138# pylint: disable-msg=F0401
38import gtk39from gi.repository import Gtk as gtk
3940
40import xdot41import xdot
41from ubuntuone.syncdaemon.fsm import fsm42from ubuntuone.syncdaemon.fsm import fsm
4243
=== removed file 'data/Makefile.am'
--- data/Makefile.am 2013-02-13 20:57:13 +0000
+++ data/Makefile.am 1970-01-01 00:00:00 +0000
@@ -1,48 +0,0 @@
1
2apportdir = $(datadir)/apport/package-hooks
3apport_DATA = source_ubuntuone-client.py
4
5crashdbdir = $(sysconfdir)/apport/crashdb.conf.d
6crashdb_DATA = ubuntuone-client-crashdb.conf
7
8configdir = $(sysconfdir)/xdg/ubuntuone
9config_in_files = logging.conf.in
10config_out_files = $(config_in_files:.conf.in=.conf)
11config_files = syncdaemon.conf
12config_DATA = $(config_files) $(config_out_files)
13
14autostartdir = $(sysconfdir)/xdg/autostart
15autostart_in_files = ubuntuone-launch.desktop.in
16autostart_DATA = $(autostart_in_files:.desktop.in=.desktop)
17
18@INTLTOOL_DESKTOP_RULE@
19
20%.conf: %.conf.in
21 @sed -e "s|\@LOG_LEVEL\@|$(LOG_LEVEL)|" \
22 -e "s|\@LOG_FILE_SIZE\@|$(LOG_FILE_SIZE)|" $< > $@
23
24servicedir = $(DBUS_SERVICES_DIR)
25service_in_files = \
26 com.ubuntuone.SyncDaemon.service.in \
27 com.ubuntuone.Credentials.service.in
28service_DATA = $(service_in_files:.service.in=.service)
29
30%.service: %.service.in
31 @sed -e "s|\@libexecdir\@|$(libexecdir)|" \
32 -e "s|\@bindir\@|$(bindir)|" $< > $@
33
34EXTRA_DIST = \
35 $(config_in_files) \
36 $(config_files) \
37 $(autostart_in_files) \
38 $(service_in_files) \
39 $(apport_DATA) \
40 $(crashdb_DATA)
41
42CLEANFILES = \
43 $(config_out_files) \
44 $(autostart_DATA) \
45 $(service_DATA)
46
47MAINTAINERCLEANFILES = \
48 Makefile.in
490
=== removed file 'docs/Makefile.am'
--- docs/Makefile.am 2013-06-05 20:09:11 +0000
+++ docs/Makefile.am 1970-01-01 00:00:00 +0000
@@ -1,6 +0,0 @@
1
2manfilesdir = $(mandir)/man1
3manfiles_DATA = \
4 man/u1sdtool.1
5
6EXTRA_DIST=$(manfiles_DATA)
70
=== renamed file 'run-mac-tests' => 'run-tests'
--- run-mac-tests 2012-08-16 06:36:31 +0000
+++ run-tests 2013-06-07 17:44:24 +0000
@@ -1,6 +1,6 @@
1#! /bin/bash1#! /bin/bash
2#2#
3# Copyright 2012 Canonical Ltd.3# Copyright 2012-2013 Canonical Ltd.
4#4#
5# This program is free software: you can redistribute it and/or modify it5# This program is free software: you can redistribute it and/or modify it
6# under the terms of the GNU General Public License version 3, as published6# under the terms of the GNU General Public License version 3, as published
@@ -27,7 +27,12 @@
27# version. If you delete this exception statement from all source27# version. If you delete this exception statement from all source
28# files in the program, then also delete it here.28# files in the program, then also delete it here.
2929
30PYTHONPATH=../ubuntu-sso-client/:../ubuntuone-storage-protocol:../ubuntuone-dev-tools:../ubuntuone-fsevents-daemon/python:$PYTHONPATH30PROXY_TESTS_PATH="tests/proxy"
31LINT_IGNORES="ubuntuone/platform/filesystem_notifications/pyinotify_agnostic.py"
32
33# Allow alternative python executable via environment variable. This is
34# useful for virtualenv testing.
35PYTHON=${PYTHON:-'python'}
3136
32set -e37set -e
33if [ $# -ne 0 ]; then38if [ $# -ne 0 ]; then
@@ -38,14 +43,34 @@
38 MODULE="tests"43 MODULE="tests"
39fi44fi
4045
41echo "Executing the tests..."46style_check() {
42cp windows/clientdefs.py ubuntuone/clientdefs.py47 u1lint -i "$LINT_IGNORES"
43cp windows/logging.conf data/logging.conf48 # Don't run pep8 yet, as there are a LOT of warnings to fix
44# execute the tests with a number of ignored linux only modules49 # pep8 --exclude '.bzr,.pc,build' . bin/*
45u1trial --reactor=twisted -i "test_linux.py,test_windows.py" -p tests/platform/linux "$MODULE"50}
51
52SYSNAME=`uname -s`
53
54if [ "$SYSNAME" == "Darwin" ]; then
55 IGNORE_FILES="test_linux.py,test_windows.py"
56 IGNORE_PATHS="tests/platform/linux"
57 REACTOR=qt4
58else
59 # Linux
60 IGNORE_FILES="test_darwin.py,test_fsevents_daemon.py,test_windows.py"
61 IGNORE_PATHS="tests/platform/windows"
62 REACTOR=gi
63fi
64
65echo "*** Running test suite for ""$MODULE"" ***"
66$PYTHON ./setup.py build
67u1trial --reactor=$REACTOR -i "$IGNORE_FILES" -p "$IGNORE_PATHS,$PROXY_TESTS_PATH" "$MODULE"
68echo "*** Running tests for ubuntuone-client-proxy ***"
69u1trial --reactor=qt4 -i "$IGNORE_FILES" -p "$IGNORE_PATHS" "$PROXY_TESTS_PATH"
70$PYTHON ./setup.py clean
46rm -rf _trial_temp71rm -rf _trial_temp
47rm -rf build72rm -rf build
4873
49python tests/platform/check_reactor_import.py74$PYTHON tests/platform/check_reactor_import.py
5075
51USE_PYFLAKES="true" u1lint76style_check
5277
=== modified file 'run-tests.bat'
--- run-tests.bat 2012-10-08 20:02:06 +0000
+++ run-tests.bat 2013-06-07 17:44:24 +0000
@@ -70,11 +70,16 @@
70GOTO GETREST70GOTO GETREST
71:CONTINUEBATCH71:CONTINUEBATCH
7272
73ECHO Python found, executing the tests...73ECHO Python found at %PYTHONEXEPATH%, building auto-generated modules...
74COPY windows\clientdefs.py ubuntuone\clientdefs.py74:: call setup.py build so that necessary generated files are built
75COPY windows\logging.conf data\logging.conf75::START "Build code" /D%CD% /WAIT "%PYTHONEXEPATH%\python.exe" setup.py build
76"%PYTHONEXEPATH%" setup.py build
77ECHO Running tests
76:: execute the tests with a number of ignored linux and mac os only modules78:: execute the tests with a number of ignored linux and mac os only modules
77"%TRIALPATH%" --reactor=twisted -c -p tests\platform\linux -i "test_linux.py,test_darwin.py,test_fsevents_daemon.py" %PARAMS% tests79"%TRIALPATH%" --reactor=twisted -c -p tests\platform\linux -i "test_linux.py,test_darwin.py,test_fsevents_daemon.py" %PARAMS% tests
80:: Clean the build from the setupt.py
81ECHO Cleaning the generated code before running the style checks...
82"%PYTHONEXEPATH%" setup.py clean
7883
79IF %SKIPLINT% == 1 (84IF %SKIPLINT% == 1 (
80 ECHO Skipping style checks85 ECHO Skipping style checks
8186
=== added file 'setup.cfg'
--- setup.cfg 1970-01-01 00:00:00 +0000
+++ setup.cfg 2013-06-07 17:44:24 +0000
@@ -0,0 +1,2 @@
1[build_i18n]
2desktop_files=[("etc/xdg/autostart", ("data/ubuntuone-launch.desktop.in",))]
03
=== added file 'setup.py'
--- setup.py 1970-01-01 00:00:00 +0000
+++ setup.py 2013-06-07 17:44:24 +0000
@@ -0,0 +1,252 @@
1#!/usr/bin/python
2#
3# Copyright 2013 Canonical Ltd.
4#
5# This program is free software: you can redistribute it and/or modify it
6# under the terms of the GNU General Public License version 3, as published
7# by the Free Software Foundation.
8#
9# This program is distributed in the hope that it will be useful, but
10# WITHOUT ANY WARRANTY; without even the implied warranties of
11# MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
12# PURPOSE. See the GNU General Public License for more details.
13#
14# You should have received a copy of the GNU General Public License along
15# with this program. If not, see <http://www.gnu.org/licenses/>.
16#
17# In addition, as a special exception, the copyright holders give
18# permission to link the code of portions of this program with the
19# OpenSSL library under certain conditions as described in each
20# individual source file, and distribute linked combinations
21# including the two.
22# You must obey the GNU General Public License in all respects
23# for all of the code used other than OpenSSL. If you modify
24# file(s) with this exception, you may extend this exception to your
25# version of the file(s), but you are not obligated to do so. If you
26# do not wish to do so, delete this exception statement from your
27# version. If you delete this exception statement from all source
28# files in the program, then also delete it here.
29"""Setup.py: build, distribute, clean."""
30
31import os
32import sys
33
34try:
35 import DistUtilsExtra.auto
36 from DistUtilsExtra.command import build_extra, build_i18n
37except ImportError:
38 print >> sys.stderr, 'To build this program you need '\
39 'https://launchpad.net/python-distutils-extra'
40 sys.exit(1)
41assert DistUtilsExtra.auto.__version__ >= '2.18', \
42 'needs DistUtilsExtra.auto >= 2.18'
43
44try:
45 from setuptools import find_packages
46except ImportError:
47 from distutils.core import find_packages
48
49
50PROJECT_NAME = 'ubuntuone-client'
51VERSION = '13.05'
52
53POT_FILE = 'po/%s.pot' % PROJECT_NAME
54SERVICE_FILES = ['data/com.ubuntuone.Credentials.service',
55 'data/com.ubuntuone.SyncDaemon.service']
56CONFIG_FILES = ['data/logging.conf']
57CLIENTDEFS = 'ubuntuone/clientdefs.py'
58
59BUILD_FILES = [CLIENTDEFS] + CONFIG_FILES
60CLEANFILES = [POT_FILE, 'MANIFEST'] + BUILD_FILES + SERVICE_FILES
61
62if int(VERSION.split('.')[1]) % 2 != 0:
63 LOG_LEVEL = 'DEBUG'
64 LOG_FILE_SIZE = '10485760'
65else:
66 LOG_LEVEL = 'INFO'
67 LOG_FILE_SIZE = '1048576'
68
69
70def replace_variables(files_to_replace, prefix=None, *args, **kwargs):
71 """Replace the @VERSION@ in the constants file with the actual version."""
72 for fname in files_to_replace:
73 with open(fname + '.in') as in_file:
74 content = in_file.read()
75 with open(fname, 'w') as out_file:
76 content = content.replace('@VERSION@', VERSION)
77 content = content.replace('@PROJECT_NAME@', PROJECT_NAME)
78 content = content.replace('@GETTEXT_PACKAGE@', PROJECT_NAME)
79 content = content.replace('@LOG_LEVEL@', LOG_LEVEL)
80 content = content.replace('@LOG_FILE_SIZE@', LOG_FILE_SIZE)
81 if prefix is not None:
82 content = content.replace(
83 '@localedir@', os.path.join(prefix,
84 'share', 'locale'))
85 content = content.replace(
86 '@libexecdir@', os.path.join(prefix,
87 'lib', PROJECT_NAME))
88 out_file.write(content)
89
90
91class Install(DistUtilsExtra.auto.install_auto):
92 """Class to install proper files."""
93
94 def run(self):
95 """Do the install.
96
97 Read from *.service.in and generate .service files by replacing
98 @prefix@ by self.prefix.
99
100 """
101 # Get just the prefix value, without the root
102 prefix = self.install_data.replace(
103 self.root if self.root is not None else '', '')
104 replace_variables(SERVICE_FILES, prefix)
105 DistUtilsExtra.auto.install_auto.run(self)
106 # Replace the CLIENTDEFS paths here, so that we can do it directly in
107 # the installed copy, rather than the lcoal copy. This allows us to
108 # have a semi-generated version for use in tests, and a full version
109 # for use in installed systems.
110 with open(CLIENTDEFS) as in_file:
111 content = in_file.read()
112 with open(os.path.join(self.install_purelib,
113 PROJECT_NAME,
114 CLIENTDEFS), 'w') as out_file:
115 content = content.replace(
116 '@localedir@', os.path.join(prefix, 'share', 'locale'))
117 content = content.replace(
118 '@libexecdir@', os.path.join(prefix, 'lib', PROJECT_NAME))
119 out_file.write(content)
120
121
122class Build(build_extra.build_extra):
123 """Build PyQt (.ui) files and resources."""
124
125 description = "build PyQt GUIs (.ui) and resources (.qrc)"
126
127 def run(self):
128 """Execute the command."""
129 replace_variables(BUILD_FILES)
130 build_extra.build_extra.run(self)
131
132
133class Clean(DistUtilsExtra.auto.clean_build_tree):
134 """Class to clean up after the build."""
135
136 def run(self):
137 """Clean up the built files."""
138 for built_file in CLEANFILES:
139 if os.path.exists(built_file):
140 os.unlink(built_file)
141
142 DistUtilsExtra.auto.clean_build_tree.run(self)
143
144
145class BuildLocale(build_i18n.build_i18n):
146 """Workaround a bug in DistUtilsExtra."""
147
148 def run(self):
149 """Magic."""
150 build_i18n.build_i18n.run(self)
151 i = 0
152 for df in self.distribution.data_files:
153 if df[0].startswith('etc/xdg/'):
154 if sys.platform not in ('darwin', 'win32'):
155 new_df = (df[0].replace('etc/xdg/', '/etc/xdg/'), df[1])
156 self.distribution.data_files[i] = new_df
157 else:
158 self.distribution.data_files.pop(i)
159 i += 1
160
161
162def set_py2exe_paths():
163 """Set the path so that py2exe finds the required modules."""
164 # Pylint does not understand same spaced imports
165 # pylint: disable=F0401
166 import win32com
167 # pylint: enable=F0401
168 try:
169 # pylint: disable=F0401
170 import py2exe.mf as modulefinder
171 # pylint: enable=F0401
172 except ImportError:
173 import modulefinder
174
175 # py2exe 0.6.4 introduced a replacement modulefinder.
176 # This means we have to add package paths there,
177 # not to the built-in one. If this new modulefinder gets
178 # integrated into Python, then we might be able to revert
179 # this some day. If this doesn't work, try import modulefinder
180 for package_path in win32com.__path__[1:]:
181 modulefinder.AddPackagePath("win32com", package_path)
182 for extra_mod in ["win32com.server", "win32com.client"]:
183 __import__(extra_mod)
184 module = sys.modules[extra_mod]
185 for module_path in module.__path__[1:]:
186 modulefinder.AddPackagePath(extra_mod, module_path)
187
188
189# pylint: disable=C0103
190
191cmdclass = {
192 'install': Install,
193 'build': Build,
194 'clean': Clean,
195 'build_i18n': BuildLocale,
196}
197
198bin_scripts = [
199 'bin/u1sdtool',
200 'bin/ubuntuone-launch',
201]
202
203libexec_scripts = [
204 'bin/ubuntuone-login',
205 'bin/ubuntuone-proxy-tunnel',
206 'bin/ubuntuone-syncdaemon',
207]
208
209data_files = []
210scripts = []
211
212if sys.platform == 'win32':
213 set_py2exe_paths()
214 extra = {
215 'options': {
216 'py2exe': {
217 'bundle_files': 1,
218 'skip_archive': 0,
219 'optimize': 1,
220 'dll_excludes': ["mswsock.dll", "powrprof.dll"],
221 },
222 },
223 # add the console script so that py2exe compiles it
224 'console': bin_scripts + libexec_scripts,
225 'zipfile': None,
226 }
227else:
228 data_files.extend([
229 ('lib/%s' % PROJECT_NAME, libexec_scripts),
230 ('share/dbus-1/services', SERVICE_FILES),
231 ('/etc/xdg/ubuntuone', CONFIG_FILES + ['data/syncdaemon.conf']),
232 ('/etc/apport/crashdb.conf.d', ['data/ubuntuone-client-crashdb.conf']),
233 ('share/apport/package-hooks', ['data/source_ubuntuone-client.py']),
234 ('share/man1', ['docs/man/u1sdtool.1']),
235 ])
236 scripts.extend(bin_scripts)
237 extra = {}
238
239DistUtilsExtra.auto.setup(
240 name=PROJECT_NAME,
241 version=VERSION,
242 license='GPL v3',
243 author='Ubuntu One Developers',
244 author_email='ubuntuone-users@lists.launchpad.net',
245 description='Ubuntu One file synchronization client',
246 url='https://launchpad.net/%s' % PROJECT_NAME,
247 extra_path=PROJECT_NAME,
248 scripts=scripts,
249 data_files=data_files,
250 packages=find_packages(),
251 cmdclass=cmdclass,
252 **extra)
0253
=== modified file 'ubuntuone/clientdefs.py.in'
--- ubuntuone/clientdefs.py.in 2012-04-09 20:07:05 +0000
+++ ubuntuone/clientdefs.py.in 2013-06-07 17:44:24 +0000
@@ -36,17 +36,9 @@
3636
37import gettext37import gettext
3838
39
40Q_ = lambda string: gettext.dgettext(GETTEXT_PACKAGE, string)39Q_ = lambda string: gettext.dgettext(GETTEXT_PACKAGE, string)
4140
42# pylint: disable-msg=C0301
43VERSION = "@VERSION@"41VERSION = "@VERSION@"
44LOCALEDIR = "@localedir@"42LOCALEDIR = "@localedir@"
45LIBEXECDIR = "@libexecdir@"43LIBEXECDIR = "@libexecdir@"
46GETTEXT_PACKAGE = "@GETTEXT_PACKAGE@"44GETTEXT_PACKAGE = "@GETTEXT_PACKAGE@"
47
48# these variables are Deprecated, use those defined in ubuntuone.credentials
49APP_NAME = "@SSO_APP_NAME@"
50TC_URL = "@SSO_TC_URL@"
51PING_URL = "@SSO_PING_URL@"
52DESCRIPTION = 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.")
5345
=== removed directory 'windows'
=== removed file 'windows/clientdefs.py'
--- windows/clientdefs.py 2012-04-09 20:07:05 +0000
+++ windows/clientdefs.py 1970-01-01 00:00:00 +0000
@@ -1,53 +0,0 @@
1# ubuntuone.clientdefs - Configure-time definitions
2#
3# Author: David Planella <david.planella@ubuntu.com>
4#
5# Copyright 2009-2012 Canonical Ltd.
6#
7# This program is free software: you can redistribute it and/or modify it
8# under the terms of the GNU General Public License version 3, as published
9# by the Free Software Foundation.
10#
11# This program is distributed in the hope that it will be useful, but
12# WITHOUT ANY WARRANTY; without even the implied warranties of
13# MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
14# PURPOSE. See the GNU General Public License for more details.
15#
16# You should have received a copy of the GNU General Public License along
17# with this program. If not, see <http://www.gnu.org/licenses/>.
18#
19# In addition, as a special exception, the copyright holders give
20# permission to link the code of portions of this program with the
21# OpenSSL library under certain conditions as described in each
22# individual source file, and distribute linked combinations
23# including the two.
24# You must obey the GNU General Public License in all respects
25# for all of the code used other than OpenSSL. If you modify
26# file(s) with this exception, you may extend this exception to your
27# version of the file(s), but you are not obligated to do so. If you
28# do not wish to do so, delete this exception statement from your
29# version. If you delete this exception statement from all source
30# files in the program, then also delete it here.
31"""
32Ubuntu One client definitions.
33
34This is a package containing configure-time definitions for the Ubuntu One
35client.
36"""
37
38import gettext
39
40
41Q_ = lambda string: gettext.dgettext(GETTEXT_PACKAGE, string)
42
43# pylint: disable-msg=C0301
44VERSION = '0.1'
45LOCALEDIR = ''
46LIBEXECDIR = ''
47GETTEXT_PACKAGE = ''
48
49# these variables are Deprecated, use those defined in ubuntuone.credentials
50APP_NAME="Ubuntu One"
51TC_URL="https://one.ubuntu.com/terms/"
52PING_URL="https://one.ubuntu.com/oauth/sso-finished-so-get-tokens/"
53DESCRIPTION = 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.")
540
=== removed file 'windows/logging.conf'
--- windows/logging.conf 2011-08-24 16:24:01 +0000
+++ windows/logging.conf 1970-01-01 00:00:00 +0000
@@ -1,13 +0,0 @@
1[logging]
2level.default = DEBUG
3level.parser = log_level
4level.help = Set the log level (TRACE, DEBUG, INFO, WARNING, ERROR, NOTE
5 CRITICAL, FATAL)
6
7file_size.default = 1000000
8file_size.parser = int
9file_size.help = max file size (the file will be rotated)
10
11backup_count.default = 5
12backup_count.parser = int
13backup_count.help = number of rotated log files to keep around.

Subscribers

People subscribed via source and target branches