1psutil: 2 description: 3 "resolve platform specific imports at compile time" 4 context: 5 - "import psutil" 6 replacements: 7 "from ._common import AIX" : "'AIX = %r' % psutil.AIX" 8 "from ._common import BSD" : "'BSD = %r' % psutil.BSD" 9 "from ._common import FREEBSD" : "'FREEBSD = %r' % + psutil.FREEBSD" 10 "from ._common import LINUX" : "'LINUX = %r' % + psutil.LINUX" 11 "from ._common import MACOS" : "'MACOS = %r' % + psutil.MACOS" 12 "from ._common import NETBSD" : "'NETBSD = %r' % + psutil.NETBSD" 13 "from ._common import OPENBSD" : "'OPENBSD = %r' % + psutil.OPENBSD" 14 "from ._common import OSX" : "'OSX = %r' % psutil.OSX" 15 "from ._common import POSIX" : "'POSIX = %r' % psutil.POSIX" 16 "from ._common import SUNOS" : "'SUNOS = %r' % psutil.SUNOS" 17 "from ._common import WINDOWS" : "'WINDOWS = %r' % psutil.WINDOWS" 18 19cffi.ffiplatform: 20 description: 21 "disable distutils hacks" 22 replacements: 23 "import setuptools" : "'pass'" 24 25skimage: 26 description: 27 "remove pytest testing framework" 28 replacements: 29 "imp.find_module('pytest')" : "'None'" 30 change_function: 31 "_test": "'(lambda: None)'" 32 33sklearn.random_projection: 34 description: 35 "remove numpy testing framework" 36 replacements: 37 "from numpy.testing import assert_equal" : "r'assert_equal = (lambda actual, desired, err_msg=None, verbose=True: True)'" 38 39matplotlib: 40 description: 41 "remove pytest testing framework" 42 replacements: 43 "test.__test__ = False" : "" 44 change_function: 45 "_init_tests": "'None'" 46 "test": "'None'" 47 48pandas: 49 description: 50 "remove pandas testing framework" 51 replacements: 52 "import pandas.testing" : "" 53 "from pandas.util._tester import test" : "" 54 55jinja2.defaults: 56 description: 57 "remove jinja2 testing framework" 58 replacements: 59 "from .tests import TESTS as DEFAULT_TESTS" : "" 60 61numpy.ctypeslib: 62 description: 63 "remove numpy.distutils references" 64 context: 65 - "import numpy.distutils.misc_util" 66 replacements: 67 "from numpy.distutils.misc_util import get_shared_lib_extension" : "" 68 "get_shared_lib_extension()" : "repr(numpy.distutils.misc_util.get_shared_lib_extension())" 69 "get_shared_lib_extension(is_python_ext=True)" : "repr(numpy.distutils.misc_util.get_shared_lib_extension(is_python_ext=True))" 70 71numpy.testing: 72 description: 73 "remove numpy testing framework" 74 module_code: | 75 from contextlib import contextmanager 76 class Tester: 77 test = None 78 bench = None 79 80 def assert_allclose(*args, **kwargs): 81 return True 82 83 @contextmanager 84 def suppress_warnings(forwarding_rule="always"): 85 yield 86 87numpy._pytesttester: 88 description: 89 "remove numpy testing framework" 90 module_code: | 91 class PytestTester: 92 def __init__(self, name): 93 pass 94 95numpy.testing._private.pytesttester: 96 description: 97 "remove numpy testing framework" 98 module_code: | 99 class PytestTester: 100 def __init__(self, name): 101 pass 102 103numpy.core.overrides: 104 # see #1189, apparently an upstream problem hard to grasp 105 description: 106 "workaround for numpy and python flag 'no_docstrings'" 107 replacements: 108 "add_docstring(implementation, dispatcher.__doc__)" : "'''add_docstring(implementation, dispatcher.__doc__ or '')'''" 109 110scipy.stats.morestats: 111 description: 112 "remove numpy testing framework" 113 replacements: 114 "from numpy.testing.decorators import setastest" : "" 115 "@setastest(False)" : "" 116 117scipy.lib.numpy_compat: 118 description: 119 "remove numpy testing framework" 120 replacements: 121 "from numpy.testing import suppress_warnings" : "r'suppress_warnings = __import__(\"contextmanager\").contextmanager(lambda : (yield))'" 122 "NumpyVersion(np.__version__) > '1.7.0.dev'" : "'0'" 123 124scipy._lib._numpy_compat: 125 description: 126 "remove numpy testing framework" 127 replacements: 128 "from numpy.testing import suppress_warnings" : "r'suppress_warnings = __import__(\"contextmanager\").contextmanager(lambda : (yield))'" 129 "NumpyVersion(np.__version__) > '1.7.0.dev'" : "'0'" 130 131scipy._lib._testutils: 132 description: 133 "remove numpy testing framework" 134 module_code: | 135 class PytestTester: 136 def __init__(self, name): 137 pass 138