old_contents: #!/usr/bin/env python
  
  from distutils.core import setup
  
  setup(name='wiimote',
        version='1.9.0',
        packages=['wiimote'],
        package_dir = {'wiimote':'src'})
  
  
new_contents: #!/usr/bin/env python
  
  from distutils.core import setup
  from catkin_pkg.package import parse_package_for_distutils
  
  d = parse_package_for_distutils()
  d['packages'] = ['wiimote']
  d['package_dir'] = {'wiimote': 'src'}
  d['install_requires'] = []
  
  setup(**d)
  
subject: use catkin_pkg for parsing the package.xml