On 28/06/2025 19:04, Brian Inglis via Cygwin-apps wrote:
[...]
https://cygwin.com/cgit/cygwin-packages/python-license-expression/tree/ python-license-expression.cygport

(As an aside, I trimmed six other URLs here. For me, this just makes your email more effort to read. If we're talking about the contortions in your current cygport, that's all I need to be looking at...)

PH_URI=https://files.pythonhosted.org/packages
V_URI=bb/79/efb4637d56dcd265cb9329ab502be0e01f4daed80caffdc5065b4b7956df
SHA_URI=sha256=49f439fea91c4d1a642f9f2902b58db1d42396c5e331045f41ce50df9b40b1f2
SRC_DIR=${BASE//-/_}-$VERSION
SRC_URI=$PH_URI/$V_URI/$SRC_DIR.tar.gz # #$SHA_URI

So, fortunately, this doesn't appear to be necessary. Reading the documentation on pypi.org leads me to [1].

[1] https://docs.pypi.org/api/#predictable-urls

e.g.

$ curl -I 
https://files.pythonhosted.org/packages/source/l/license_expression/license_expression-30.4.3.tar.gz
HTTP/2 302
content-type: application/octet-stream
location: 
https://files.pythonhosted.org/packages/bb/79/efb4637d56dcd265cb9329ab502be0e01f4daed80caffdc5065b4b7956df/license_expression-30.4.3.tar.gz
[...]

(Doubly fortunate, I came across this *before* wasting my time writing something to access their API to map a (project, version) to a URL in order to fetch the source distribution, which seems crazy to me) > Could someone who develops in python please have a look and suggest what
we should do about improving how the packaging scripts operate, to be able to support python standard package downloads, installs, and testing, without these complaints and failures?

I am by no means a python expert. But I've made a change in cygport 0.37.1 to use the predicable URL format they specify.

This seems to work, so you should be able to remove the contortions above from your cygport and let the python.org cygclass set the SRC_URI once more.

Please let me know if there are any problems.

On 2024-11-06 10:14, Brian Inglis via Cygwin-apps wrote:
[...]
"It should be noted that legacy URLs are no longer supported and may stop working at an arbitrary time."

I think "legacy" in this context means "URLs based on non-PEP 625-normalized project names"?

Reply via email to