Drop Jinja name from PyPI URL (using f-string instead)#548
Drop Jinja name from PyPI URL (using f-string instead)#548jakirkham wants to merge 2 commits intoconda:mainfrom
name from PyPI URL (using f-string instead)#548Conversation
67c4007 to
d037674
Compare
|
It seems like it should be possible to drop this logic as well grayskull/grayskull/strategy/pypi.py Lines 512 to 520 in d23e5ce Though please let me know if I'm missing something |
| "license": info.get("license"), | ||
| "source": { | ||
| "url": config.url_pypi + "/packages/source/{{ name[0] }}/{{ name }}/" | ||
| "url": config.url_pypi + f"/packages/source/{config.name[0]}/{config.name}/" |
There was a problem hiding this comment.
These will always be normalized (even for historic builds), with the most-widely used implementation being packaging.utils.canonicalize_name.
There was a problem hiding this comment.
that is a good idea, grayskull still tries to canonicalize the names, but having that implementation to use out of the box might be better indeed
There was a problem hiding this comment.
Should this be stored as a key for reuse?
|
xref conda-forge/conda-forge.github.io#2712 Looks like the conclusion there is to remove the |
|
Oh, i See #598 is doing the same thing. |
Description
Instead of using Jinja to add
nameinto the PyPI URL. Just use an f-string to template the URL. This removesnamefrom the PyPI URL entirely and lets users more easily change this as needed.Alternative to PR: #460