Merge lp:~dobey/software-center/update-5-6 into lp:software-center/stable-5-6

Proposed by dobey
Status: Merged
Approved by: dobey
Approved revision: no longer in the source branch.
Merged at revision: 3294
Proposed branch: lp:~dobey/software-center/update-5-6
Merge into: lp:software-center/stable-5-6
Diff against target: 114 lines (+31/-35)
1 file modified
setup.py (+31/-35)
To merge this branch: bzr merge lp:~dobey/software-center/update-5-6
Reviewer Review Type Date Requested Status
Brian Curtin (community) Approve
Michał Karnicki (community) Approve
Review via email: mp+151104@code.launchpad.net

Commit message

[Rodney Dawes]

    Remove extraneous empty po directory under po directory.
    Make setup.py executable.
    Include the license header in setup.py
    Bump the version of trunk to 5.7.
    Move some code around in setup.py to reduce duplication.
    Use setup from DistutilsExtra.auto instead of manually adding some commands.

To post a comment you must log in.
Revision history for this message
Michał Karnicki (karni) :
review: Approve
Revision history for this message
Brian Curtin (brian.curtin) :
review: Approve
lp:~dobey/software-center/update-5-6 updated
3294. By dobey

[Rodney Dawes]

    Remove extraneous empty po directory under po directory.
    Make setup.py executable.
    Include the license header in setup.py
    Bump the version of trunk to 5.7.
    Move some code around in setup.py to reduce duplication.
    Use setup from DistutilsExtra.auto instead of manually adding some commands.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== removed directory 'po/po'
2=== modified file 'setup.py' (properties changed: -x to +x)
3--- setup.py 2013-01-03 23:04:18 +0000
4+++ setup.py 2013-02-28 21:26:20 +0000
5@@ -1,4 +1,19 @@
6-#!/usr/bin/env python
7+#!/usr/bin/python
8+#
9+# Copyright 2009-2013 Canonical Ltd.
10+#
11+# This program is free software: you can redistribute it and/or modify it
12+# under the terms of the GNU General Public License version 3, as published
13+# by the Free Software Foundation.
14+#
15+# This program is distributed in the hope that it will be useful, but
16+# WITHOUT ANY WARRANTY; without even the implied warranties of
17+# MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
18+# PURPOSE. See the GNU General Public License for more details.
19+#
20+# You should have received a copy of the GNU General Public License along
21+# with this program. If not, see <http://www.gnu.org/licenses/>.
22+"""Setup.py: build, distribute, clean."""
23
24 import platform
25 import glob
26@@ -6,10 +21,18 @@
27 from subprocess import call
28 import sys
29
30-from distutils.core import setup
31-from DistUtilsExtra.command import (build_extra, build_i18n, build_help,
32- build_icons)
33-from debian.changelog import Changelog
34+from DistUtilsExtra.auto import setup
35+
36+# The VERSION of software-center
37+VERSION = '5.5.4'
38+
39+# double check that we have the latest distro series and fail if not
40+(distro, release, codename) = platform.dist()
41+if distro == "Ubuntu":
42+ import softwarecenter.distro.ubuntu
43+ if not codename in softwarecenter.distro.ubuntu.Ubuntu.DISTROSERIES:
44+ raise ValueError("Could not find '%s' in ubuntu distro class "
45+ "please add it to DISTROSERIES", codename)
46
47
48 def merge_authors_into_about_dialog():
49@@ -25,32 +48,20 @@
50 def merge_extras_ubuntu_com_channel_file():
51 # update ubuntu-extras.list.in (this will not be part of debian as
52 # its killed of in debian/rules on a non-ubuntu build)
53- DISTROSERIES = platform.dist()[2]
54 channelfile = "data/channels/Ubuntu/ubuntu-extras.list"
55 s = open(channelfile + ".in").read()
56- open(channelfile, "w").write(s.replace("#DISTROSERIES#", DISTROSERIES))
57-
58-
59-# VERSION and DISTRO must be defined here for use in setup()
60-VERSION = None
61-DISTRO = None
62+ open(channelfile, "w").write(s.replace("#DISTROSERIES#", codename))
63
64
65 # update version.py
66 def update_version():
67- changelog = Changelog(open("debian/changelog"), max_blocks=1)
68- # use or upstream_version instead?
69- VERSION = changelog.full_version
70- CODENAME = changelog.distributions
71 # this comes from the build host
72- DISTRO = platform.dist()[0]
73- RELEASE = platform.dist()[1]
74 open("softwarecenter/version.py", "w").write("""
75 VERSION = '%s'
76 CODENAME = '%s'
77 DISTRO = '%s'
78 RELEASE = '%s'
79-""" % (VERSION, CODENAME, DISTRO, RELEASE))
80+""" % (VERSION, codename, distro, release))
81
82
83 # update po4a
84@@ -61,15 +72,6 @@
85 call(["po4a", "po/help/po4a.conf"])
86
87
88-# double check that we have the latest distro series and fail if not
89-(distro, ver, codename) = platform.dist()
90-if distro == "Ubuntu":
91- import softwarecenter.distro.ubuntu
92- if not codename in softwarecenter.distro.ubuntu.Ubuntu.DISTROSERIES:
93- raise ValueError("Could not find '%s' in ubuntu distro class "
94- "please add it to DISTROSERIES")
95-
96-
97 # real setup
98 setup(
99 name="software-center",
100@@ -144,13 +146,7 @@
101 ('share/apport/package-hooks/', ['debian/source_software-center.py']),
102 # extra software channels (can be distro specific)
103 ('share/app-install/channels/',
104- glob.glob("data/channels/%s/*" % DISTRO)),
105+ glob.glob("data/channels/%s/*" % distro)),
106 ('lib/ubuntu-sso-client', ['software-center-sso-gtk']),
107 ],
108- cmdclass={
109- "build": build_extra.build_extra,
110- "build_i18n": build_i18n.build_i18n,
111- "build_help": build_help.build_help,
112- "build_icons": build_icons.build_icons,
113- },
114 )

Subscribers

People subscribed via source and target branches