rattler-build icon indicating copy to clipboard operation
rattler-build copied to clipboard

Small PyPI generation improvements

Open wolfv opened this issue 11 months ago • 3 comments

I found two small issues when generating the recipe for zarr:

  • [ ] Upstream uses MIT License which 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 numcodecs which gets wrongly translated to numcodecs [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 detecting noarch: python. If we detect that no compiler is needed, or that there are py-none wheels we should automatically insert the noarch: python option in the build section.

wolfv avatar Jan 20 '25 19:01 wolfv

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}`.

wolfv avatar Jan 22 '25 17:01 wolfv

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

lucascolley avatar Jan 23 '25 20:01 lucascolley

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.

wolfv avatar Feb 08 '25 10:02 wolfv