Merge lp:~dobey/ubuntuone-client/fix-due-nonsense into lp:ubuntuone-client

Proposed by dobey
Status: Merged
Approved by: dobey
Approved revision: 1402
Merged at revision: 1401
Proposed branch: lp:~dobey/ubuntuone-client/fix-due-nonsense
Merge into: lp:ubuntuone-client
Diff against target: 29 lines (+8/-10)
1 file modified
setup.py (+8/-10)
To merge this branch: bzr merge lp:~dobey/ubuntuone-client/fix-due-nonsense
Reviewer Review Type Date Requested Status
Mike McCracken (community) Approve
Review via email: mp+168702@code.launchpad.net

Commit message

Simplify the removal of packages which shouldn't be installed.
Also remove data files which shouldn't be installed.

To post a comment you must log in.
1402. By dobey

Fix pep8 issue.

Revision history for this message
Mike McCracken (mikemc) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'setup.py'
2--- setup.py 2013-06-10 22:06:01 +0000
3+++ setup.py 2013-06-11 15:28:41 +0000
4@@ -96,17 +96,15 @@
5
6 # Remove the contrib and tests packages from the packages list
7 # as they are not meant to be installed to the system.
8- i = 0
9- for pkg in self.distribution.packages:
10- print("Checking %s" % pkg)
11- if pkg.startswith('contrib'):
12- print('Removing %s' % pkg)
13- self.distribution.packages.pop(i)
14- if pkg.startswith('tests'):
15- print("Removing %s" % pkg)
16- self.distribution.packages.pop(i)
17+ pkgs = [x for x in self.distribution.packages if not (
18+ x.startswith('contrib') or x.startswith('tests'))]
19+ self.distribution.packages = pkgs
20
21- i += 1
22+ # Remove the input and dev files from the data files list,
23+ # as they are not meant to be installed.
24+ data_files = [x for x in self.distribution.data_files if not (
25+ x[1][0].endswith('.in') or x[1][0].endswith('-dev.conf'))]
26+ self.distribution.data_files = data_files
27
28 # Get just the prefix value, without the root
29 prefix = self.install_data.replace(

Subscribers

People subscribed via source and target branches