From bc01e6715db180ab5e42dfcd2f4379e059401c99 Mon Sep 17 00:00:00 2001 From: Wolf Vollprecht Date: Sat, 21 Sep 2024 10:18:49 +0200 Subject: [PATCH] fix about content in readme --- conda_smithy/configure_feedstock.py | 12 +++++++++++- conda_smithy/utils.py | 2 +- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/conda_smithy/configure_feedstock.py b/conda_smithy/configure_feedstock.py index a5215d6fd..5a0efe9aa 100644 --- a/conda_smithy/configure_feedstock.py +++ b/conda_smithy/configure_feedstock.py @@ -2082,10 +2082,20 @@ def render_readme(jinja_env, forge_config, forge_dir, render_info=None): about = about.copy() # if subpackages do not have about, conda-build would copy the top-level about; # if subpackages have their own about, conda-build would use them as is; - # we discussed in PR #1691 and decided to not show repetitve entries + # we discussed in PR #1691 and decided to not show repetitive entries if about != package_about: subpackages_about.append((name, about)) + # align new style about with old style about + print("subpackages_about", subpackages_about) + for i, (name, about) in enumerate(subpackages_about): + if "repository" in about: + about["dev_url"] = about["repository"] + if "homepage" in about: + about["home"] = about["homepage"] + if "documentation" in about: + about["doc_url"] = about["documentation"] + template = jinja_env.get_template("README.md.tmpl") target_fname = os.path.join(forge_dir, "README.md") forge_config["noarch_python"] = all(meta.noarch for meta in metas) diff --git a/conda_smithy/utils.py b/conda_smithy/utils.py index 229cc672b..4d94461c5 100644 --- a/conda_smithy/utils.py +++ b/conda_smithy/utils.py @@ -57,7 +57,7 @@ def get_feedstock_name_from_meta( def get_feedstock_about_from_meta(meta) -> dict: - """Fetch the feedtstock about from the parsed meta.yaml.""" + """Fetch the feedstock about from the parsed meta.yaml.""" # it turns out that conda_build would not preserve the feedstock about: # - if a subpackage does not have about, it uses the feedstock's # - if a subpackage has about, it's used as is