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

Turn off compilation #715

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
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: 3 additions & 1 deletion conda_build/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -517,7 +517,9 @@ def build(m, get_src=True, post=None, include_recipe=True, keep_old_work=False):
assert not exists(config.info_dir)
files2 = prefix_files()

post_process(sorted(files2 - files1), preserve_egg_dir=bool(m.get_value('build/preserve_egg_dir')))
post_process(sorted(files2 - files1),
preserve_egg_dir=bool(m.get_value('build/preserve_egg_dir')),
pyc_compilation=bool(m.get_value('build/pyc_compilation', True)))

# The post processing may have deleted some files (like easy-install.pth)
files2 = prefix_files()
Expand Down
3 changes: 2 additions & 1 deletion conda_build/metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,8 @@ def _git_clean(source_meta):
'has_prefix_files', 'binary_has_prefix_files', 'script_env',
'detect_binary_files_with_prefix', 'rpaths',
'always_include_files', 'skip', 'msvc_compiler',
'pin_depends' # pin_depends is experimental still
'pin_depends', # pin_depends is experimental still
'pyc-compilation'
],
'requirements': ['build', 'run', 'conflicts'],
'app': ['entry', 'icon', 'summary', 'type', 'cli_opts',
Expand Down
4 changes: 2 additions & 2 deletions conda_build/post.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,10 +157,10 @@ def compile_missing_pyc():
'-q', '-x', 'port_v3', sp_dir])


def post_process(files, preserve_egg_dir=False):
def post_process(files, preserve_egg_dir=False, pyc_compilation=True):
remove_easy_install_pth(files, preserve_egg_dir=preserve_egg_dir)
rm_py_along_so()
if config.CONDA_PY < 30:
if config.CONDA_PY < 30 and pyc_compilation:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is compilation only done for Python 2? @ivoflipse you're perhaps not the right one to ask, since you're only maintaining this behavior, but maybe @ilanschnell or @groutr know?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know, but it probably has to with Python 3 stuff compiled files in a __pycache__ folder

I haven't been able to use Python 3 much until recently, so now a lot of these Python 2/3 issues start creeping up on me :-)

compile_missing_pyc()


Expand Down