Skip to content

allow installing/using p4a in a virtualenv #1437

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
Nov 9, 2018
Merged
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: 2 additions & 2 deletions pythonforandroid/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -635,8 +635,8 @@ def run_pymodules_install(ctx, modules):
# This bash method is what old-p4a used
# It works but should be replaced with something better
shprint(sh.bash, '-c', (
"source venv/bin/activate && env CC=/bin/false CXX=/bin/false "
"PYTHONPATH={0} pip install --target '{0}' --no-deps -r requirements.txt"
"env CC=/bin/false CXX=/bin/false "
"PYTHONPATH={0} venv/bin/pip install --target '{0}' --no-deps -r requirements.txt"
).format(ctx.get_site_packages_dir()))


Expand Down
7 changes: 0 additions & 7 deletions pythonforandroid/toolchain.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,13 +167,6 @@ 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