diff options
author | Sylvain Th?nault <sylvain.thenault@logilab.fr> | 2014-04-18 14:57:46 +0200 |
---|---|---|
committer | Sylvain Th?nault <sylvain.thenault@logilab.fr> | 2014-04-18 14:57:46 +0200 |
commit | 393973024fa7984cc7efdcb96197c76f32a5e82b (patch) | |
tree | 23f984d8a48084ec32e75dfa0ae5ced1d5b990d3 /setup.py | |
parent | 5e39be38b66d9063bbfb68e1b4fc61b32a5b0a66 (diff) | |
download | pylint-393973024fa7984cc7efdcb96197c76f32a5e82b.tar.gz |
[packaging] attempt to skip byte-compilation for tests files
This doesn't occurs when using bare distutils but does when using setuptools (eg
from easy_install/pip). As setuptools seems broken on my box, I've not been able
to test that.
(Hopefuly) closes #171
Diffstat (limited to 'setup.py')
-rw-r--r-- | setup.py | 12 |
1 files changed, 9 insertions, 3 deletions
@@ -132,15 +132,13 @@ class MyInstallLib(install_lib.install_lib): exclude = set() shutil.rmtree(dest, ignore_errors=True) shutil.copytree(directory, dest) - # since python2.5's copytree doesn't support the ignore + # since python2.5's copytree doesn't support the ignore # parameter, the following loop to remove the exclude set # was added for (dirpath, dirnames, filenames) in os.walk(dest): for n in filenames: if n in exclude: os.remove(os.path.join(dirpath, n)) - - if sys.version_info >= (3, 0): # process manually python file in include_dirs (test data) # pylint: disable=no-name-in-module @@ -148,6 +146,14 @@ class MyInstallLib(install_lib.install_lib): print('running 2to3 on', dest) run_2to3([dest]) + # override this since pip/easy_install attempt to byte compile test data + # files, some of them being syntactically wrong by design, and this scares + # the end-user + def byte_compile(self, files): + print 'files', files + testdir = join('pylint', 'test') + files = [f for f in files if testdir not in f] + install_lib.install_lib.byte_compile(self, files) def install(**kwargs): """setup entry point""" |