File tree Expand file tree Collapse file tree 2 files changed +19
-2
lines changed Expand file tree Collapse file tree 2 files changed +19
-2
lines changed Original file line number Diff line number Diff line change @@ -394,8 +394,13 @@ def expand_dependencies(recipes, ctx):
394
394
if not isinstance (entry , (tuple , list )) or len (entry ) == 1 :
395
395
if isinstance (entry , (tuple , list )):
396
396
entry = entry [0 ]
397
- recipe = Recipe .get_recipe (entry , ctx )
398
- recipes_with_deps += recipe .depends
397
+ try :
398
+ recipe = Recipe .get_recipe (entry , ctx )
399
+ recipes_with_deps += recipe .depends
400
+ except ValueError :
401
+ # it's a pure python package without a recipe, so we
402
+ # don't know the dependencies...skipping for now
403
+ pass
399
404
400
405
# Split up lists by available alternatives:
401
406
recipe_lists = [[]]
Original file line number Diff line number Diff line change @@ -171,6 +171,18 @@ def test_expand_dependencies(self):
171
171
expanded_result_2 = expand_dependencies ([("pysdl2" , "kivy" )], self .ctx )
172
172
self .assertEqual ([["pysdl2" ], ["kivy" ]], expanded_result_2 )
173
173
174
+ def test_expand_dependencies_with_pure_python_package (self ):
175
+ """Check that `expanded_dependencies`, with a pure python package as
176
+ one of the dependencies, returns a list of dependencies
177
+ """
178
+ expanded_result = expand_dependencies (
179
+ ["python3" , "kivy" , "peewee" ], self .ctx
180
+ )
181
+ self .assertEqual (len (expanded_result ), 3 )
182
+ self .assertIsInstance (expanded_result , list )
183
+ for i in expanded_result :
184
+ self .assertIsInstance (i , list )
185
+
174
186
def test_get_bootstraps_from_recipes (self ):
175
187
"""A test which will initialize a bootstrap and will check if the
176
188
method :meth:`~pythonforandroid.bootstrap.Bootstrap.
You can’t perform that action at this time.
0 commit comments