install_data.py 848 B

123456789101112131415161718192021222324
  1. import sys
  2. have_setuptools = ('setuptools' in sys.modules)
  3. from distutils.command.install_data import install_data as old_install_data
  4. #data installer with improved intelligence over distutils
  5. #data files are copied into the project directory instead
  6. #of willy-nilly
  7. class install_data (old_install_data):
  8. def run(self):
  9. old_install_data.run(self)
  10. if have_setuptools:
  11. # Run install_clib again, since setuptools does not run sub-commands
  12. # of install automatically
  13. self.run_command('install_clib')
  14. def finalize_options (self):
  15. self.set_undefined_options('install',
  16. ('install_lib', 'install_dir'),
  17. ('root', 'root'),
  18. ('force', 'force'),
  19. )