@@ -593,7 +593,8 @@ def project_has_setup_py(project_dir):
593593 return False
594594
595595
596- def run_pymodules_install (ctx , modules , project_dir , ignore_setup_py = False ):
596+ def run_pymodules_install (ctx , modules , project_dir = None ,
597+ ignore_setup_py = False ):
597598 """ This function will take care of all non-recipe things, by:
598599
599600 1. Processing them from --requirements (the modules argument)
@@ -610,6 +611,7 @@ def run_pymodules_install(ctx, modules, project_dir, ignore_setup_py=False):
610611 # Bail out if no python deps and no setup.py to process:
611612 if not modules and (
612613 ignore_setup_py or
614+ project_dir is None or
613615 not project_has_setup_py (project_dir )
614616 ):
615617 info ('No Python modules and no setup.py to process, skipping' )
@@ -621,7 +623,8 @@ def run_pymodules_install(ctx, modules, project_dir, ignore_setup_py=False):
621623 'install them with pip' .format (', ' .join (modules )))
622624 info ('If this fails, it may mean that the module has compiled '
623625 'components and needs a recipe.' )
624- if project_has_setup_py (project_dir ) and not ignore_setup_py :
626+ if project_dir is not None and \
627+ project_has_setup_py (project_dir ) and not ignore_setup_py :
625628 info ('Will process project install, if it fails then the '
626629 'project may not be compatible for Android install.' )
627630
@@ -694,7 +697,9 @@ def run_pymodules_install(ctx, modules, project_dir, ignore_setup_py=False):
694697 _env = copy .copy (env ))
695698
696699 # Afterwards, run setup.py if present:
697- if project_has_setup_py (project_dir ) and not ignore_setup_py :
700+ if project_dir is not None and (
701+ project_has_setup_py (project_dir ) and not ignore_setup_py
702+ ):
698703 with current_directory (project_dir ):
699704 info ('got setup.py or similar, running project install. ' +
700705 '(disable this behavior with --ignore-setup-py)' )
0 commit comments