From bb0d990e88a2120df2150e097dc17795474591e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20L=C3=A9one?= Date: Sat, 7 Nov 2015 11:53:08 +0100 Subject: [PATCH] MAINT: list litteral --- numpy/_build_utils/waf.py | 5 +---- numpy/distutils/mingw32ccompiler.py | 4 +--- numpy/distutils/npy_pkg_config.py | 3 +-- 3 files changed, 3 insertions(+), 9 deletions(-) diff --git a/numpy/_build_utils/waf.py b/numpy/_build_utils/waf.py index 263640d9eef1..f1b6990bbabc 100644 --- a/numpy/_build_utils/waf.py +++ b/numpy/_build_utils/waf.py @@ -268,10 +268,7 @@ def check_type_size(conf, type_name, expected_sizes=None, **kw): @waflib.Configure.conf def check_functions_at_once(self, funcs, **kw): - header = [] - header = ['#ifdef __cplusplus'] - header.append('extern "C" {') - header.append('#endif') + header = ['#ifdef __cplusplus', 'extern "C" {', '#endif'] for f in funcs: header.append("\tchar %s();" % f) # Handle MSVC intrinsics: force MS compiler to make a function diff --git a/numpy/distutils/mingw32ccompiler.py b/numpy/distutils/mingw32ccompiler.py index d22a2818eb14..111653a8294d 100644 --- a/numpy/distutils/mingw32ccompiler.py +++ b/numpy/distutils/mingw32ccompiler.py @@ -244,9 +244,7 @@ def find_python_dll(): # - find it in python main dir # - in system32, # - ortherwise (Sxs), I don't know how to get it. - lib_dirs = [] - lib_dirs.append(sys.prefix) - lib_dirs.append(os.path.join(sys.prefix, 'lib')) + lib_dirs = [sys.prefix, os.path.join(sys.prefix, 'lib')] try: lib_dirs.append(os.path.join(os.environ['SYSTEMROOT'], 'system32')) except KeyError: diff --git a/numpy/distutils/npy_pkg_config.py b/numpy/distutils/npy_pkg_config.py index 6156439e1f26..1c801fd9c069 100644 --- a/numpy/distutils/npy_pkg_config.py +++ b/numpy/distutils/npy_pkg_config.py @@ -141,8 +141,7 @@ def libs(self, section="default"): return _escape_backslash(val) def __str__(self): - m = ['Name: %s' % self.name] - m.append('Description: %s' % self.description) + m = ['Name: %s' % self.name, 'Description: %s' % self.description] if self.requires: m.append('Requires:') else: