~kelemeng/checkbox/bug868571

« back to all changes in this revision

Viewing changes to setup.py

  • Committer: Marc Tardif
  • Date: 2008-08-13 20:04:12 UTC
  • Revision ID: marc.tardif@canonical.com-20080813200412-52u3d6fs6ulnxlgv
Renamed hwtest to checkbox.

Show diffs side-by-side

added added

removed removed

Lines of Context:
32
32
        f_out.write(line)
33
33
 
34
34
 
35
 
class hwtest_install_data(install_data, object):
 
35
class checkbox_install_data(install_data, object):
36
36
 
37
37
    def finalize_options(self):
38
38
        """Add wildcard support for filenames."""
39
 
        super(hwtest_install_data, self).finalize_options()
 
39
        super(checkbox_install_data, self).finalize_options()
40
40
 
41
41
        for f in self.data_files:
42
42
            if type(f) != str:
52
52
 
53
53
    def run(self):
54
54
        """Run substitutions on files."""
55
 
        super(hwtest_install_data, self).run()
 
55
        super(checkbox_install_data, self).run()
56
56
 
57
57
        examplesfiles = [o for o in self.outfiles if "examples" in o]
58
58
        if not examplesfiles:
59
59
            return
60
60
 
61
61
        # Create etc directory
62
 
        etcdir = convert_path("/etc/hwtest.d")
 
62
        etcdir = convert_path("/etc/checkbox.d")
63
63
        if not os.path.isabs(etcdir):
64
64
            etcdir = os.path.join(self.install_dir, etcdir)
65
65
        elif self.root:
83
83
                    "version = dev": "version = %s" % version})
84
84
 
85
85
 
86
 
class hwtest_install_scripts(install_scripts, object):
 
86
class checkbox_install_scripts(install_scripts, object):
87
87
 
88
88
    def run(self):
89
89
        """Run substitutions on files."""
90
 
        super(hwtest_install_scripts, self).run()
 
90
        super(checkbox_install_scripts, self).run()
91
91
 
92
92
        # Substitute directory in defaults.py
93
93
        for outfile in self.outfiles:
94
94
            infile = os.path.join("bin", os.path.basename(outfile))
95
95
            substitute_variables(infile, outfile, {
96
 
                "HWTEST_DIRECTORY=.": "HWTEST_DIRECTORY=/usr/share/hwtest"})
 
96
                "CHECKBOX_DIRECTORY=.": "CHECKBOX_DIRECTORY=/usr/share/checkbox"})
97
97
 
98
98
 
99
99
setup(
100
 
    name = "hwtest",
 
100
    name = "checkbox",
101
101
    version = changelog_version(),
102
102
    author = "Marc Tardif",
103
103
    author_email = "marc.tardif@canonical.com",
104
104
    license = "GPL",
105
 
    description = "Hardware Testing",
 
105
    description = "Checkbox System Testing",
106
106
    long_description = """
107
 
This project provides an interfaces for gathering hardware details
108
 
and prompting the user for tests. This information can then be sent
109
 
to Launchpad.
 
107
This project provides an extensible interface for system testing. The
 
108
results can then be sent to Launchpad.
110
109
""",
111
110
    data_files = [
112
 
        ("share/pixmaps/", ["gtk/hwtest-gtk.xpm"]),
113
 
        ("share/hwtest/", ["run"]),
114
 
        ("share/hwtest/data/", ["data/*"]),
115
 
        ("share/hwtest/examples/", ["examples/*"]),
116
 
        ("share/hwtest/install/", ["install/*"]),
117
 
        ("share/hwtest/plugins/", ["plugins/*.py"]),
118
 
        ("share/hwtest/registries/", ["registries/*.py"]),
119
 
        ("share/hwtest/scripts/", ["scripts/*"]),
120
 
        ("share/hwtest/gtk/", ["gtk/hwtest-gtk.glade", "gtk/*.png"])],
121
 
    scripts = ["bin/hwtest-gtk", "bin/hwtest-cli"],
122
 
    packages = ["hwtest", "hwtest.contrib", "hwtest.lib", "hwtest.reports",
123
 
        "hwtest.registries", "hwtest_cli", "hwtest_gtk"],
 
111
        ("share/pixmaps/", ["gtk/checkbox-gtk.xpm"]),
 
112
        ("share/checkbox/", ["run"]),
 
113
        ("share/checkbox/data/", ["data/*"]),
 
114
        ("share/checkbox/examples/", ["examples/*"]),
 
115
        ("share/checkbox/install/", ["install/*"]),
 
116
        ("share/checkbox/plugins/", ["plugins/*.py"]),
 
117
        ("share/checkbox/registries/", ["registries/*.py"]),
 
118
        ("share/checkbox/scripts/", ["scripts/*"]),
 
119
        ("share/checkbox/gtk/", ["gtk/checkbox-gtk.glade", "gtk/*.png"])],
 
120
    scripts = ["bin/checkbox-gtk", "bin/checkbox-cli"],
 
121
    packages = ["checkbox", "checkbox.contrib", "checkbox.lib", "checkbox.reports",
 
122
        "checkbox.registries", "checkbox_cli", "checkbox_gtk"],
124
123
    cmdclass = {
125
 
        "install_data": hwtest_install_data,
126
 
        "install_scripts": hwtest_install_scripts,
 
124
        "install_data": checkbox_install_data,
 
125
        "install_scripts": checkbox_install_scripts,
127
126
        "build" : build_extra,
128
127
        "build_i18n" :  build_i18n }
129
128
)