Skip to content

Commit

Permalink
Merge pull request #346 from kived/venv-error
Browse files Browse the repository at this point in the history
throw error early if running in venv
  • Loading branch information
kived committed May 18, 2016
2 parents 3959993 + 5a1d002 commit be33b75
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions buildozer/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -461,6 +461,14 @@ def check_application_requirements(self):
requirements = [x for x in requirements if onlyname(x) not in
target_available_packages]

if requirements and hasattr(sys, 'real_prefix'):
e = self.error
e('virtualenv is needed to install pure-Python modules, but')
e('virtualenv does not support nesting, and you are running')
e('buildozer in one. Please run buildozer outside of a')
e('virtualenv instead.')
exit(1)

# did we already installed the libs ?
if exists(self.applibs_dir) and \
self.state.get('cache.applibs', '') == requirements:
Expand Down

0 comments on commit be33b75

Please sign in to comment.