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

`file_name` runtime bug in v1 spec conda-forge feedstock

Open jeremyleung521 opened this issue 10 months ago • 3 comments

Hi!

When I tried to run a feedstock using v1 spec recipe for conda-forge feedstocks, the file_name keyword (example) is actually preventing pip from finding the source files (example). It is reproducible locally on different feedstocks (mdtraj-feedstock, westpa-feedstock) and removing that option from the yaml config solves the problem. @wolfv mentioned on Zulipchat that it's because the file is not untarred when there is a file_name with a .tar.gz but it is untarred when that option absent. This is counterintuitive and wasn't the case in v0.

It would be great if it's clarified/reversed or (at least) if a warning is emitted.

Thanks!

jeremyleung521 avatar Mar 05 '25 16:03 jeremyleung521

Hi @jeremyleung521 - can you elaborate the use case you have for file_name? If you want the files in a different directory, you can use the target_directory key.

wolfv avatar Mar 14 '25 07:03 wolfv

Hi @jeremyleung521 - can you elaborate the use case you have for file_name? If you want the files in a different directory, you can use the target_directory key.

This is something before my time as a maintainer, but I think it's mostly a leftover from when it was a necessary field. I'm happy to remove it (which doesn't change anything), but it's just odd that it's not behaving as it should (i.e. same as previous behavior; being explicit with the default shouldn't modify behavior).

Here's the doc about the option: https://docs.conda.io/projects/conda-build/en/stable/resources/define-metadata.html#filename

jeremyleung521 avatar Mar 15 '25 17:03 jeremyleung521

Yeah, we can add that more clearly to the docs ...

wolfv avatar Mar 15 '25 18:03 wolfv