8000 throw error early if running in venv by kived · Pull Request #742 · kivy/python-for-android · GitHub
[go: up one dir, main page]

Skip to content

throw error early if running in venv #742

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

Merged
merged 1 commit into from
May 12, 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
9 changes: 8 additions & 1 deletion pythonforandroid/toolchain.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
from pythonforandroid.archs import (ArchARM, ArchARMv7_a, Archx86)
from pythonforandroid.logger import (logger, info, warning, setup_color,
Out_Style, Out_Fore, Err_Style, Err_Fore,
info_notify, info_main, shprint)
info_notify, info_main, shprint, error)
from pythonforandroid.util import current_directory, ensure_dir
from pythonforandroid.bootstrap import Bootstrap
from pythonforandroid.distribution import Distribution, pretty_log_dists
Expand Down Expand Up @@ -118,6 +118,13 @@ def build_dist_from_args(ctx, dist, args):
ctx.recipe_build_order = build_order
ctx.python_modules = python_modules

if python_modules and hasattr(sys, 'real_prefix'):
error('virtualenv is needed to install pure-Python modules, but')
error('virtualenv does not support nesting, and you are running')
error('python-for-android in one. Please run p4a outside of a')
error('virtualenv instead.')
exit(1)

info('The selected bootstrap is {}'.format(bs.name))
info_main('# Creating dist with {} bootstrap'.format(bs.name))
bs.distribution = dist
Expand Down
0