# HG changeset patch
# User FELD Boris <lothiraldan@gmail.com>
# Date 1343295475 -3600
# Thu Jul 26 10:37:55 2012 +0100
# Node ID 55150181702ed410b611791f2145c43e9d1d1e2d
# Parent 61dae5b525a894fac1093a66518c0f53218da373
Do not include tests files for installation in setup.py. Clean setup.py for python3. Closes #72022. Closes #82417. Closes #76910.
# User FELD Boris <lothiraldan@gmail.com>
# Date 1343295475 -3600
# Thu Jul 26 10:37:55 2012 +0100
# Node ID 55150181702ed410b611791f2145c43e9d1d1e2d
# Parent 61dae5b525a894fac1093a66518c0f53218da373
Do not include tests files for installation in setup.py. Clean setup.py for python3. Closes #72022. Closes #82417. Closes #76910.
@@ -36,13 +36,10 @@
1 except ImportError: 2 from distutils.core import setup 3 from distutils.command import install_lib 4 USE_SETUPTOOLS = 0 5 6 -# pylint needs to filter some test files expected to be wrong 7 -P3K_FILES_TO_IGNORE= ('test/input/func_noerror_encoding.py', 8 - 'test/input/func_unknown_encoding.py',) 9 try: 10 # python3 11 from distutils.command.build_py import build_py_2to3 as build_py 12 def run(self): 13 self.updated_files = []
@@ -50,13 +47,10 @@
14 if self.py_modules: 15 self.build_modules() 16 if self.packages: 17 self.build_packages() 18 self.build_package_data() 19 - # filter test files 20 - self.updated_files = [f for f in self.updated_files 21 - if not f.endswith(P3K_FILES_TO_IGNORE)] 22 # 2to3 23 self.run_2to3(self.updated_files) 24 # Remaining base class code 25 self.byte_compile(self.get_outputs(include_bytecode=0)) 26 build_py.run = run
@@ -102,12 +96,11 @@
27 """return a list of subpackages for the given directory""" 28 result = [] 29 for package in os.listdir(directory): 30 absfile = join(directory, package) 31 if isdir(absfile): 32 - if exists(join(absfile, '__init__.py')) or \ 33 - package in ('test', 'tests'): 34 + if exists(join(absfile, '__init__.py')): 35 if prefix: 36 result.append('%s.%s' % (prefix, package)) 37 else: 38 result.append(package) 39 result += get_packages(absfile, result[-1])