improve setup
authorymh <ymh.work@gmail.com>
Sun, 07 Jun 2015 22:54:08 +0200
changeset 119 3922b186a5b2
parent 118 fea47f1054e2
child 120 6746ea102e2d
improve setup
server/setup.py
--- a/server/setup.py	Sat Jun 06 22:47:54 2015 +0200
+++ b/server/setup.py	Sun Jun 07 22:54:08 2015 +0200
@@ -4,7 +4,6 @@
 from distutils.command.install import INSTALL_SCHEMES
 import sys
 
-
 class osx_install_data(install_data):
     # On MacOS, the platform-specific lib dir is /System/Library/Framework/Python/.../
     # which is wrong. Python 2.5 supplied with MacOS 10.5 has an Apple-specific fix
@@ -60,12 +59,12 @@
             # Ignore dirnames that start with '.'
             for i, dirname in enumerate(dirnames):
                 if dirname.startswith('.'): del dirnames[i]
+                if dirname.startswith('__pycache__'): del dirnames[i]
             if '__init__.py' in filenames:
                 packages.append('.'.join(fullsplit(dirpath)))
             elif filenames:
                 data_files.append([dirpath, [os.path.join(dirpath, f) for f in filenames]])
 
-
     # Tell distutils to put the data_files in platform-specific installation
     # locations. See here for an explanation:
     # http://groups.google.com/group/comp.lang.python/browse_thread/thread/35ec7b2fed36eaec/2105ee4d9e8042cb