You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
The following motivating example is one way that auto-generation of pypi recipe urls recently broke for me, but I guess other things might break this in the future (for example, URL redirects might change or break, or be discontinued, or ...):
For packages that contain - or . in their package name and are packaged via poetry for upload to pypi, this means that their package name and their sdist file name will differ and the standard pypi.io link generated by grayskull will not work (and the respective (bio-)conda packages silently broke). Take this example:
{% set name = "snakemake-wrapper-utils" %}
{% set version = "0.5.2" %}
source:
url: "https://pypi.io/packages/source/{{ name[0] }}/{{ name }}/{{ name }}-{{ version }}.tar.gz"
Instead, this now has to be:
{% set name = "snakemake-wrapper-utils" %}
{% set version = "0.5.2" %}
source:
url: "https://pypi.io/packages/source/{{ name[0] }}/{{ name }}/{{ name|replace("-", "_") }}-{{ version }}.tar.gz"
{% set name = "snakemake-wrapper-utils" %}
{% set version = "0.5.2" %}
source:
url: "https://files.pythonhosted.org/packages/52/e1/449dcfcba437f9bda6cd232664182dcf7acee78c3fe77a238078c84ec7b7/snakemake_wrapper_utils-0.5.2.tar.gz"
The auto-update bots for conda-forge and bioconda would need to be updated accordingly, to also query the pypi JSON API for the url. As a result, version update commits would have a larger footprint of change in the URL, but everything should nevertheless be automated.
Describe alternatives you've considered
The above example gives a workaround solution, using the jinja2 filter |replace("-","_"). However, this is not a generic solution and instead of covering such a specific case with code in grayskull, I would instead suggest to go for the more generic solution via the JSON API.
Additional context
Code that might be helpful in the implementation of this can be found here:
For now I would rather go for the jinja replace, because if I put the full url to the python hosted url that will generate more problems in Conda-forge.
Is your feature request related to a problem? Please describe.
The following motivating example is one way that auto-generation of pypi recipe urls recently broke for me, but I guess other things might break this in the future (for example, URL redirects might change or break, or be discontinued, or ...):
poetry
recently moved to enforcing thatsdist
files (tar.gz
) created by itsbuild
command conform to the respective naming specs:The
sdist
naming spec points to thewheel
/ binary naming specs, which state that all-_.
symbols are to be replaced by_
(underscore).For packages that contain
-
or.
in their package name and are packaged viapoetry
for upload topypi
, this means that their package name and theirsdist
file name will differ and the standardpypi.io
link generated by grayskull will not work (and the respective (bio-)conda packages silently broke). Take this example:Instead, this now has to be:
Also see this respective pull request in the package used as an example here:
bioconda/bioconda-recipes#39979
Describe the solution you'd like
The official guidance of
pypi
for determining download URLs is to "query PyPI’s JSON API". Thus, I would like to suggest to make this the new default behaviour forpypi
packages, in the hope that this will make the resulting recipes more robust.In the above example, this would lead to:
The auto-update bots for conda-forge and bioconda would need to be updated accordingly, to also query the pypi JSON API for the url. As a result, version update commits would have a larger footprint of change in the URL, but everything should nevertheless be automated.
Describe alternatives you've considered
The above example gives a workaround solution, using the jinja2 filter
|replace("-","_")
. However, this is not a generic solution and instead of covering such a specific case with code in grayskull, I would instead suggest to go for the more generic solution via the JSON API.Additional context
Code that might be helpful in the implementation of this can be found here:
The text was updated successfully, but these errors were encountered: