~smoser/cloud-init/azure_dhcp

« back to all changes in this revision

Viewing changes to setup.py

  • Committer: Brent Baude
  • Date: 2016-08-04 12:48:46 UTC
  • Revision ID: bbaude@redhat.com-20160804124846-tt1gybhdqpy8zkim
Rather than having the python executable for obtaining and storing the
dhclient information as its own executable, it is integrated into
cloud-init as a sub-command 'dhclient_hook'.

Show diffs side-by-side

added added

removed removed

Lines of Context:
171
171
        self.distribution.reinitialize_command('install_data', True)
172
172
 
173
173
 
174
 
def set_python_version(files):
175
 
    for file in files:
176
 
        tmpl = file + '.tmpl'
177
 
        with open(file, "wt") as file_out:
178
 
            with open(tmpl, "rt") as t:
179
 
                for line in t:
180
 
                    file_out.write(line.replace('%%PYTHON_BINARY%%', PYTHON_BINARY))
181
 
    return files
182
 
 
183
 
 
184
174
if in_virtualenv():
185
175
    data_files = []
186
176
    cmdclass = {}
189
179
        (ETC + '/cloud', glob('config/*.cfg')),
190
180
        (ETC + '/cloud/cloud.cfg.d', glob('config/cloud.cfg.d/*')),
191
181
        (ETC + '/cloud/templates', glob('templates/*')),
192
 
        (ETC + '/NetworkManager/dispatcher.d/', set_python_version(['tools/hook-network-manager'])),
193
 
        (ETC + '/dhcp/dhclient-exit-hooks.d/', set_python_version(['tools/hook-dhclient'])),
 
182
        (ETC + '/NetworkManager/dispatcher.d/', ['tools/hook-network-manager']),
 
183
        (ETC + '/dhcp/dhclient-exit-hooks.d/', ['tools/hook-dhclient']),
194
184
        (USR_LIB_EXEC + '/cloud-init', ['tools/uncloud-init',
195
185
                                        'tools/write-ssh-key-fingerprints']),
196
186
        (USR + '/share/doc/cloud-init', [f for f in glob('doc/*') if is_f(f)]),