diff options
| author | Torsten Marek <shlomme@gmail.com> | 2014-11-22 15:05:09 +0100 |
|---|---|---|
| committer | Torsten Marek <shlomme@gmail.com> | 2014-11-22 15:05:09 +0100 |
| commit | aef95ea6d23becf6e4374a08fe37d07968e75822 (patch) | |
| tree | 9bfeaf259e519702b76936f5c11a7074b12142c9 /setup.py | |
| parent | dea26008de9647b7fb8d31149f45b2dd3e9c81fa (diff) | |
| download | astroid-git-aef95ea6d23becf6e4374a08fe37d07968e75822.tar.gz | |
Do not byte-compile test files on install. Fixes #58.
Diffstat (limited to 'setup.py')
| -rw-r--r-- | setup.py | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -18,7 +18,9 @@ # You should have received a copy of the GNU Lesser General Public License along # with astroid. If not, see <http://www.gnu.org/licenses/>. """Setup script for astroid.""" +import os from setuptools import setup, find_packages +from setuptools.command import install_lib pkginfo = 'astroid/__pkginfo__.py' @@ -28,6 +30,13 @@ with open(pkginfo, 'rb') as fobj: with open('README') as fobj: long_description = fobj.read() +class AstroidInstallLib(install_lib.install_lib): + def byte_compile(self, files): + test_datadir = os.path.join('astroid', 'tests', 'testdata') + files = [f for f in files if test_datadir not in f] + install_lib.install_lib.byte_compile(self, files) + + def install(): return setup(name = distname, @@ -42,6 +51,7 @@ def install(): include_package_data = True, install_requires = install_requires, packages = find_packages(), + cmdclass={'install_lib': AstroidInstallLib} ) |
