Skip to content

Commit

Permalink
Merge pull request conda#1163 from mingwandroid/fix_compile_py
Browse files Browse the repository at this point in the history
Compile files ending in `.py` not those ending in `py`
  • Loading branch information
msarahan committed Aug 2, 2016
1 parent 725c792 commit 0e73cb1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions conda_build/post.py
Original file line number Diff line number Diff line change
Expand Up @@ -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__')
Expand All @@ -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)
Expand Down

0 comments on commit 0e73cb1

Please sign in to comment.