conda / ceps

Conda Enhancement Proposals
Creative Commons Zero v1.0 Universal
19 stars 24 forks source link

add recipe extension cep #72

Open wolfv opened 3 months ago

wolfv commented 3 months ago

Discussion:

Technically, it would be nicer to solve this with a flexible script. Challenge: we only want to run over the new files in the prefix.

Should we leak "rust" regex features? Would be easy to use them from Python as well. We can also turn off the regex feature where capture groups can be referenced easily with $....

Example from Rust docs:

string: "Springsteen, Bruce"
regex: (?<last>[^,\s]+),\s+(?<first>\S+)
replacement: "$first $last"
result: "Bruce Springsteen"
jaimergp commented 3 months ago

Python has \g<name> and \g<number> for that. So maybe there's a way to convert things more or less easily. The $ syntax is reasonable enough to me.

jaimergp commented 3 months ago

Challenge: we only want to run over the new files in the prefix.

Can that be injected in the post_build namespace? A \0 separated list of paths in an env var or something? Maybe it overflows 😬. Maybe a file can be placed somewhere strategically which, upon parsing, returns the newly detected files.

wolfv commented 2 months ago

TODO: