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

Proposed by dobey
Status: Merged
Approved by: dobey
Approved revision: 1398
Merged at revision: 1398
Proposed branch: lp:~dobey/ubuntuone-client/py-fixes
Merge into: lp:ubuntuone-client
Diff against target: 85 lines (+19/-9)
4 files modified
run-tests (+1/-1)
run-tests.bat (+1/-1)
setup.py (+16/-7)
ubuntuone-client.pth (+1/-0)
To merge this branch: bzr merge lp:~dobey/ubuntuone-client/py-fixes
Reviewer Review Type Date Requested Status
Mike McCracken (community) Approve
Review via email: mp+168535@code.launchpad.net

Commit message

Move the reactor import check script to contrib, as a script.
Update the run-tests scripts for the change.
Add a .pth file.
Work around DistUtilsExtra.auto wanting to install everything with __init__.py.

Description of the change

This should hopefully fix the weird error occurring when the reactor import checker is run in the daily builds. The check works fine locally, and I don't see anything else that might cause it. So adding the .pth here, moving the script, and avoiding install of the contrib and tests directories as packages, should hopefully fix it.

To post a comment you must log in.
Revision history for this message
Mike McCracken (mikemc) wrote :

works on osx for me

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== renamed file 'tests/platform/check_reactor_import.py' => 'contrib/check-reactor-import' (properties changed: -x to +x)
2=== modified file 'run-tests'
3--- run-tests 2013-06-07 17:42:06 +0000
4+++ run-tests 2013-06-10 19:37:33 +0000
5@@ -71,6 +71,6 @@
6 rm -rf _trial_temp
7 rm -rf build
8
9-$PYTHON tests/platform/check_reactor_import.py
10+$PYTHON contrib/check-reactor-import
11
12 style_check
13
14=== modified file 'run-tests.bat'
15--- run-tests.bat 2013-06-07 17:17:02 +0000
16+++ run-tests.bat 2013-06-10 19:37:33 +0000
17@@ -87,7 +87,7 @@
18 ECHO Performing style checks...
19 "%LINTPATH%"
20
21-"%PYTHONEXEPATH%" tests\platform\check_reactor_import.py
22+"%PYTHONEXEPATH%" contrib\check-reactor-import
23
24 :: if pep8 is not present, move to the end
25 IF EXIST "%PEP8PATH%" (
26
27=== modified file 'setup.py'
28--- setup.py 2013-06-07 15:31:52 +0000
29+++ setup.py 2013-06-10 19:37:33 +0000
30@@ -41,11 +41,6 @@
31 assert DistUtilsExtra.auto.__version__ >= '2.18', \
32 'needs DistUtilsExtra.auto >= 2.18'
33
34-try:
35- from setuptools import find_packages
36-except ImportError:
37- from distutils.core import find_packages
38-
39
40 PROJECT_NAME = 'ubuntuone-client'
41 VERSION = '13.05'
42@@ -98,6 +93,21 @@
43 @prefix@ by self.prefix.
44
45 """
46+
47+ # Remove the contrib and tests packages from the packages list
48+ # as they are not meant to be installed to the system.
49+ i = 0
50+ for pkg in self.distribution.packages:
51+ print("Checking %s" % pkg)
52+ if pkg.startswith('contrib'):
53+ print('Removing %s' % pkg)
54+ self.distribution.packages.pop(i)
55+ if pkg.startswith('tests'):
56+ print("Removing %s" % pkg)
57+ self.distribution.packages.pop(i)
58+
59+ i += 1
60+
61 # Get just the prefix value, without the root
62 prefix = self.install_data.replace(
63 self.root if self.root is not None else '', '')
64@@ -143,7 +153,7 @@
65
66
67 class BuildLocale(build_i18n.build_i18n):
68- """Workaround a bug in DistUtilsExtra."""
69+ """Work around a bug in DistUtilsExtra."""
70
71 def run(self):
72 """Magic."""
73@@ -247,6 +257,5 @@
74 extra_path=PROJECT_NAME,
75 scripts=scripts,
76 data_files=data_files,
77- packages=find_packages(),
78 cmdclass=cmdclass,
79 **extra)
80
81=== added file 'ubuntuone-client.pth'
82--- ubuntuone-client.pth 1970-01-01 00:00:00 +0000
83+++ ubuntuone-client.pth 2013-06-10 19:37:33 +0000
84@@ -0,0 +1,1 @@
85+ubuntuone-client

Subscribers

People subscribed via source and target branches