@@ -593,7 +593,8 @@ def project_has_setup_py(project_dir):
593
593
return False
594
594
595
595
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 ):
597
598
""" This function will take care of all non-recipe things, by:
598
599
599
600
1. Processing them from --requirements (the modules argument)
@@ -610,6 +611,7 @@ def run_pymodules_install(ctx, modules, project_dir, ignore_setup_py=False):
610
611
# Bail out if no python deps and no setup.py to process:
611
612
if not modules and (
612
613
ignore_setup_py or
614
+ project_dir is None or
613
615
not project_has_setup_py (project_dir )
614
616
):
615
617
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):
621
623
'install them with pip' .format (', ' .join (modules )))
622
624
info ('If this fails, it may mean that the module has compiled '
623
625
'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 :
625
628
info ('Will process project install, if it fails then the '
626
629
'project may not be compatible for Android install.' )
627
630
@@ -694,7 +697,9 @@ def run_pymodules_install(ctx, modules, project_dir, ignore_setup_py=False):
694
697
_env = copy .copy (env ))
695
698
696
699
# 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
+ ):
698
703
with current_directory (project_dir ):
699
704
info ('got setup.py or similar, running project install. ' +
700
705
'(disable this behavior with --ignore-setup-py)' )
0 commit comments