Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compile files ending in .py not those ending in py #1163

Merged
merged 1 commit into from
Aug 2, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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