File tree Expand file tree Collapse file tree 2 files changed +12
-10
lines changed Expand file tree Collapse file tree 2 files changed +12
-10
lines changed Original file line number Diff line number Diff line change @@ -203,16 +203,12 @@ def make_recipe(repo_dir: PathLike, recipe_file: PathLike) -> None:
203203 config ["conda_channels" ],
204204 )
205205
206- numpy_versions = [v . specifier for v in all_requirements if v = = "numpy" ]
206+ requirements_entries = [f" - { req } " for req in all_requirements if req and req ! = "numpy" ]
207207
208- requirements_block = '\n ' .join ([
209- f" - { req } "
210- for req in filter (lambda x : x != "numpy" , all_requirements )
211- if req and req != "numpy" ]
212- )
208+ if [v .specifier for v in all_requirements if v == "numpy" ]:
209+ requirements_entries += " - numpy x.x"
213210
214- if numpy_versions :
215- requirements_block += "\n - numpy x.x"
211+ requirements_block = '\n ' .join (requirements_entries )
216212
217213 templates = jinja2 .Environment ( # nosec: B701
218214 loader = jinja2 .FileSystemLoader (str (template_dir )),
Original file line number Diff line number Diff line change @@ -452,15 +452,21 @@ def brace(string: str) -> str:
452452
453453
454454def set_gh_actions_versions (py_versions : Iterable [str ]) -> List [str ]:
455+ """
456+ Convert development Python versions into the appropriate versions for GitHub Actions.
457+
458+ :param py_versions:
459+ """
460+
455461 py_versions = list (py_versions )
456462
463+ # Keep in sync with https://github.com/actions/python-versions/releases
464+
457465 if "3.10-dev" in py_versions :
458466 py_versions .remove ("3.10-dev" )
459- # Keep in sync with https://github.com/actions/python-versions/releases
460467 py_versions .append ("3.10.0-alpha.3" )
461468 if "3.10" in py_versions :
462469 py_versions .remove ("3.10" )
463- # Keep in sync with https://github.com/actions/python-versions/releases
464470 py_versions .append ("3.10.0-alpha.3" )
465471
466472 return py_versions
You can’t perform that action at this time.
0 commit comments