From e8f4f6f9c4affc8fbeebc29695eedf06613d198a Mon Sep 17 00:00:00 2001 From: David Laehnemann Date: Sat, 18 Mar 2023 19:27:56 +0100 Subject: [PATCH 1/4] update snakemake-wrapper-utils to 0.5.2 --- recipes/snakemake-wrapper-utils/meta.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/snakemake-wrapper-utils/meta.yaml b/recipes/snakemake-wrapper-utils/meta.yaml index f04cc58cf31b3..8bcc78a13ef77 100644 --- a/recipes/snakemake-wrapper-utils/meta.yaml +++ b/recipes/snakemake-wrapper-utils/meta.yaml @@ -1,5 +1,5 @@ {% set name = "snakemake-wrapper-utils" %} -{% set version = "0.5.0" %} +{% set version = "0.5.2" %} package: name: "{{ name|lower }}" @@ -7,7 +7,7 @@ package: source: url: "https://pypi.io/packages/source/{{ name[0] }}/{{ name }}/{{ name }}-{{ version }}.tar.gz" - sha256: f6533334a0ff53133727cf2a95eff915d101b773e53866ecad4d4b94009bf5f5 + sha256: 9de956c8c191e382772be24cccd15be1e72d2a81048aaf5778ae662ce06552d3 build: number: 0 From d0ddba895aec32524b2199ded9d415c646d6941a Mon Sep 17 00:00:00 2001 From: David Laehnemann Date: Mon, 20 Mar 2023 15:05:44 +0100 Subject: [PATCH 2/4] make package name in sdist `.tar.gz` filename conform to specs (using underscores) The official specs for sdist file names require that the package name is in snake case, see these places: * https://peps.python.org/pep-0625/#specification * https://packaging.python.org/en/latest/specifications/binary-distribution-format/#escaping-and-unicode * https://peps.python.org/pep-0491/#escaping-and-unicode [`poetry` switched to conforming to these specs with version `1.2.2`](https://github.com/python-poetry/poetry/releases/tag/1.2.2), see: * poetry-core pull request with the actual code changes: https://github.com/python-poetry/poetry-core/pull/484 * poetry pull request pulling them in: https://github.com/python-poetry/poetry/pull/6621 Thus, all (bio-)conda recipes whose sources are built with `poetry` and uploaded to pypi are likely to face the same issue. As `snakemake-wrapper-utils` only contains hyphens (`-`) as non-word characters, the suggested `replace("-","_")` should be safe and enough. But a thorough solution should be implemented in `grayskull` (that does conda recipe templating for pypi packages), and in the tooling of `conda-forge` and `bioconda`. One solution to make such recipes more future-proof would be to make tooling respect the [official guidance to query the pypi JSON API to get download urls](https://warehouse.pypa.io/api-reference/integration-guide.html#official-guidance). Examples of how to do this are here: * [stackoverflow answer with example code of querying the pypi JSON API for a download URL](https://stackoverflow.com/a/48327216) * [link to the pypi code for generating the currently used standardized redirect links at `pypi.io`, that also uses the JSON API](https://github.com/pypi/warehouse/issues/13240#issuecomment-1475983414) --- recipes/snakemake-wrapper-utils/meta.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/snakemake-wrapper-utils/meta.yaml b/recipes/snakemake-wrapper-utils/meta.yaml index 8bcc78a13ef77..f2565535d0481 100644 --- a/recipes/snakemake-wrapper-utils/meta.yaml +++ b/recipes/snakemake-wrapper-utils/meta.yaml @@ -6,7 +6,7 @@ package: version: "{{ version }}" source: - url: "https://pypi.io/packages/source/{{ name[0] }}/{{ name }}/{{ name }}-{{ version }}.tar.gz" + url: "https://pypi.io/packages/source/{{ name[0] }}/{{ name }}/{{ name.replace("-", "_" }}-{{ version }}.tar.gz" sha256: 9de956c8c191e382772be24cccd15be1e72d2a81048aaf5778ae662ce06552d3 build: From cc0e2d5d4c7de3f1911efad64e6c488223ba0f85 Mon Sep 17 00:00:00 2001 From: David Laehnemann Date: Mon, 20 Mar 2023 19:26:42 +0100 Subject: [PATCH 3/4] closing bracket; use jinja2 `replace()` filter instead of python `str.replace()` --- recipes/snakemake-wrapper-utils/meta.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/snakemake-wrapper-utils/meta.yaml b/recipes/snakemake-wrapper-utils/meta.yaml index f2565535d0481..497110da59fd5 100644 --- a/recipes/snakemake-wrapper-utils/meta.yaml +++ b/recipes/snakemake-wrapper-utils/meta.yaml @@ -6,7 +6,7 @@ package: version: "{{ version }}" source: - url: "https://pypi.io/packages/source/{{ name[0] }}/{{ name }}/{{ name.replace("-", "_" }}-{{ version }}.tar.gz" + url: "https://pypi.io/packages/source/{{ name[0] }}/{{ name }}/{{ name|replace("-", "_") }}-{{ version }}.tar.gz" sha256: 9de956c8c191e382772be24cccd15be1e72d2a81048aaf5778ae662ce06552d3 build: From e98512b4e212da046cb02515f1b081acaeeb135f Mon Sep 17 00:00:00 2001 From: David Laehnemann Date: Mon, 20 Mar 2023 19:29:34 +0100 Subject: [PATCH 4/4] update sha256 according to https://pypi.org/pypi/snakemake-wrapper-utils/0.5.2/json --- recipes/snakemake-wrapper-utils/meta.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/snakemake-wrapper-utils/meta.yaml b/recipes/snakemake-wrapper-utils/meta.yaml index 497110da59fd5..abd23cdfc0798 100644 --- a/recipes/snakemake-wrapper-utils/meta.yaml +++ b/recipes/snakemake-wrapper-utils/meta.yaml @@ -7,7 +7,7 @@ package: source: url: "https://pypi.io/packages/source/{{ name[0] }}/{{ name }}/{{ name|replace("-", "_") }}-{{ version }}.tar.gz" - sha256: 9de956c8c191e382772be24cccd15be1e72d2a81048aaf5778ae662ce06552d3 + sha256: e23057a16b1acd2534b50e41583124a3155792f9c42e94c5bd40bc009c0a481a build: number: 0