DiamondLightSource / python3-pip-skeleton

Archived in favour of https://github.com/DiamondLightSource/python-copier-template
Apache License 2.0
5 stars 5 forks source link

Allow installation with Conda #87

Closed garryod closed 1 year ago

garryod commented 1 year ago

In the data analysis sphere, Conda is quite often used for virtual environments & packaging; As such, external collaborators expect that our packages will be conda installable. I thought it would be worth opening up discussion regarding how we should set out to achieve this. There are a few options I am currently aware of, including:

  1. Publish pypa install media & suggest using pip install in a conda environment
    • This is considered a last resort by the conda devs & should be avoided due to the likelihood of breaking the environment
  2. Include conda build recipie in the repo (e.g. python3-pip-skeleton/python3-pip-skeleton/meta.yaml) and build with conda build
    • This gives maximum flexibility, but requires additional effort
  3. Generate the conda build recipie with grayskull and build with conda build
    • This should require zero additional effort, but makes no guarantee of always working
  4. Mix 2 & 3, i.e. use 2 if files are included and fall back on 3 if not

What are folks thoughts?

GDYendell commented 1 year ago

For 2, can we just expand (or sed) a template and it just works or will the developer have to do things?

garryod commented 1 year ago

The developer would have to do things, including adding dependencies. grayskull provides a way of doing this translation from a dist + wheel and is a bit more complicated than sed

garryod commented 1 year ago

From in-person discussion with @coretl @gilesknap & @GDYendell:

Supporting conda builds would be good provided it can be relatively transparent - ideally requiring only the addition of a repo token. Management of such tokens requires investigation - particularly support for personal, repo or organisation level keys. @garryod will develop sample CI for further discussion