source: software-center/trunk/fuentes/setup.py @ 408

Last change on this file since 408 was 401, checked in by mabarracus, 5 years ago

Added 16.01+16.04.20160119 sources

  • Property svn:executable set to *
File size: 4.0 KB
Line 
1#!/usr/bin/python
2#
3# Copyright 2009-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"""Setup.py: build, distribute, clean."""
17
18import platform
19import glob
20import sys
21
22from DistUtilsExtra.auto import setup
23
24# The VERSION of software-center
25VERSION = '15.12'
26
27# Get the distribution information for various functions.
28(distro, release, codename) = platform.dist()
29
30# update version.py
31def update_version():
32    # TODO: Move this to a build command.
33    # this comes from the build host
34    open("softwarecenter/version.py", "w").write("""
35VERSION = '%s'
36CODENAME = '%s'
37DISTRO = '%s'
38RELEASE = '%s'
39""" % (VERSION, codename, distro, release))
40
41# update po4a
42if sys.argv[1] == "build":
43    update_version()
44
45
46# real setup
47setup(
48    name="software-center",
49    version=VERSION,
50    scripts=[
51        "bin/software-center",
52        "bin/software-center-dbus",
53        # gtk3
54        "utils/submit_review_gtk3.py",
55        "utils/report_review_gtk3.py",
56        "utils/submit_usefulness_gtk3.py",
57        "utils/delete_review_gtk3.py",
58        "utils/modify_review_gtk3.py",
59        # db helpers
60        "utils/update-software-center",
61        "utils/update-software-center-channels",
62        "utils/update-software-center-agent",
63        # generic helpers
64        "utils/expunge-cache.py",
65    ] + glob.glob("utils/piston-helpers/*.py"),
66    packages=[
67        'softwarecenter',
68        'softwarecenter.backend',
69        'softwarecenter.backend.installbackend_impl',
70        'softwarecenter.backend.channel_impl',
71        'softwarecenter.backend.oneconfhandler',
72        'softwarecenter.backend.login_impl',
73        'softwarecenter.backend.piston',
74        'softwarecenter.backend.reviews',
75        'softwarecenter.db',
76        'softwarecenter.db.pkginfo_impl',
77        'softwarecenter.db.history_impl',
78        'softwarecenter.distro',
79        'softwarecenter.plugins',
80        'softwarecenter.ui',
81        'softwarecenter.ui.gtk3',
82        'softwarecenter.ui.gtk3.dialogs',
83        'softwarecenter.ui.gtk3.models',
84        'softwarecenter.ui.gtk3.panes',
85        'softwarecenter.ui.gtk3.session',
86        'softwarecenter.ui.gtk3.views',
87        'softwarecenter.ui.gtk3.widgets',
88        'softwarecenter.ui.qml',
89    ],
90    data_files=[
91        # gtk3
92        ('share/software-center/ui/gtk3/', glob.glob("data/ui/gtk3/*.ui")),
93        ('share/software-center/ui/gtk3/css/',
94         glob.glob("data/ui/gtk3/css/*.css")),
95        ('share/software-center/ui/gtk3/art/',
96         glob.glob("data/ui/gtk3/art/*.png")),
97        ('share/software-center/ui/gtk3/art/icons',
98         glob.glob("data/ui/gtk3/art/icons/*.png")),
99        ('share/software-center/default_banner',
100         glob.glob("data/default_banner/*")),
101        # dbus
102        ('../etc/dbus-1/system.d/',
103         ["data/dbus/com.ubuntu.SoftwareCenter.conf"]),
104        ('share/dbus-1/services',
105         ["data/dbus/com.ubuntu.SoftwareCenterDataProvider.service"]),
106        # images
107        ('share/software-center/images/',
108         glob.glob("data/images/*.png") + glob.glob("data/images/*.gif")),
109        ('share/software-center/icons/', glob.glob("data/emblems/*.png")),
110        # xapian
111        ('share/apt-xapian-index/plugins',
112         glob.glob("apt_xapian_index_plugin/*.py")),
113        # apport
114        # TODO: Move this over from the packaging
115        # ('share/apport/package-hooks/', ['debian/source_software-center.py']),
116        # extra software channels (can be distro specific)
117        ('share/app-install/channels/',
118         glob.glob("data/channels/%s/*.{eula,list}" % distro)),
119    ],
120)
Note: See TracBrowser for help on using the repository browser.