Small PyPI generation improvements
I found two small issues when generating the recipe for zarr:
- [ ] Upstream uses
MIT Licensewhich is not valid SPDX. We should maybe make a HashMap or other lookup to associate the right SPDX license if possible. - [ ] Upstream uses a dependency with an extra for
numcodecswhich gets wrongly translated tonumcodecs [crc32c]>=0.14
Also, the description is printed as a really long single line string but IDK if we can change this with serde_yaml.
- [ ] When I generated a recipe for
bagels, I noticed that we are not detectingnoarch: python. If we detect that no compiler is needed, or that there arepy-nonewheels we should automatically insert thenoarch: pythonoption in the build section.
When generating a recipe for quantity-array, the URL / filename should be normalized to quantity_array. Also, any non-alphanumeric character sequences should be reduced to - before normalizing I believe.
https://packaging.python.org/en/latest/specifications/binary-distribution-format/#escaping-and-unicode
https://packaging.python.org/en/latest/specifications/name-normalization/#name-normalization
# Additionally, non-alphanumeric values in the distribution are
# normalized to underscores (_), meaning hyphens can never occur
# before `-{version}`.
gh-1373 addressed the url formatting somewhat, but it seems like the edge cases mentioned in https://github.com/prefix-dev/rattler-build/issues/1363#issuecomment-2607786942 require a bit more work
It might be nice to figure out if we can / should add build_requirements to the host dependencies.
E.g. I tried to generate a recipe for truststore and it was missing flit-core as a host dep.
It will probably be tricky to figure out the right compilers needed.