JuliaPy / CondaPkg.jl

Add Conda dependencies to your Julia project
MIT License
122 stars 15 forks source link

`conda-build` and `conda skeleton` #110

Open ParadaCarleton opened 1 year ago

ParadaCarleton commented 1 year ago

conda-build includes the conda skeleton command, which lets you build and install conda packages from PyPI and CRAN. It'd be great to have an easy way to do this from inside the package, or even to automatically have conda add X search for X in PyPI and CRAN, then build the package with conda skeleton if it can't be found in other channels.

cjdoris commented 1 year ago

Nice idea but....

This would be really non-trivial to implement - for example the name of a package in PyPI can be different from its name in Conda, so getting dependencies matched up is hard. It also requires you to know exactly which version of the PyPI package you need - which you won't generally know.

If conda itself ever supports an option to directly specify PyPI dependencies then I'll consider supporting that, but conda skeleton as it is is not for automated use.

CondaPkg does allow you to specify packages to install with pip. Is that not enough?

ParadaCarleton commented 1 year ago

CondaPkg does allow you to specify packages to install with pip. Is that not enough?

Unfortunately not, because pip is very bad at avoiding conflicting versions :/

This would be really non-trivial to implement - for example the name of a package in PyPI can be different from its name in Conda, so getting dependencies matched up is hard.

I think trying and failing to find a PyPI message (and returning with an error explaining the package isn't in conda) is fine.

That being said, just having a way to access conda skeleton from inside the Julia REPL would probably be enough for me.

cjdoris commented 1 year ago

FYI you can now do

pkg> conda run conda ...