From 0e73cb1ed61430e44b55cd828db3145e88311a6e Mon Sep 17 00:00:00 2001 From: Mike Sarahan Date: Tue, 2 Aug 2016 10:14:38 -0500 Subject: [PATCH] Merge pull request #1163 from mingwandroid/fix_compile_py Compile files ending in `.py` not those ending in `py` --- conda_build/post.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/conda_build/post.py b/conda_build/post.py index f7b61283fe..9355e6b295 100644 --- a/conda_build/post.py +++ b/conda_build/post.py @@ -151,7 +151,7 @@ def coerce_pycache_to_old_style(files, cwd): for f in files: if not os.path.exists(f): f = os.path.join(cwd, f) - if not os.path.isfile(f) or not f.endswith('py'): + if not os.path.isfile(f) or not f.endswith('.py'): continue if '/' in f or '\\' in f: folder = os.path.join(cwd, os.path.dirname(f), '__pycache__') @@ -168,7 +168,7 @@ def coerce_pycache_to_old_style(files, cwd): def compile_missing_pyc(files, cwd=config.build_prefix, python_exe=config.build_python): - compile_files = [f for f in files if f.endswith('py') and f + 'c' not in files] + compile_files = [f for f in files if f.endswith('.py') and f + 'c' not in files] if compile_files: print('compiling .pyc files...') call([python_exe, '-Wi', '-m', 'py_compile'] + compile_files, cwd=cwd)