Guest User

Untitled

a guest
Oct 17th, 2017
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.80 KB | None | 0 0
  1. from setuptools import setup
  2. from setuptools.dist import Distribution
  3. from distutils.extension import Extension
  4. import os
  5.  
  6. class BinaryDistribution(Distribution):
  7. def is_pure(self):
  8. return False
  9.  
  10. data_files = []
  11.  
  12. def accept_file(f):
  13. f = f.lower()
  14. for ext in '.py .dll .so .dylib .txt .cpp .h .bat .c .sh .md .txt'.split():
  15. if f.endswith(ext):
  16. return True
  17.  
  18. return f in ['readme', 'makefile']
  19.  
  20. data_files.append(('pydevd_attach_to_process', [os.path.join('pydevd_attach_to_process', f) for f in os.listdir('pydevd_attach_to_process') if accept_file(f)]))
  21. for root, dirs, files in os.walk("pydevd_attach_to_process"):
  22. for d in dirs:
  23. data_files.append((os.path.join(root, d), [os.path.join(root, d, f) for f in os.listdir(os.path.join(root, d)) if accept_file(f)]))
Add Comment
Please, Sign In to add comment