Skip to content

Support deployable conda environment without pip #36

Description

@asolis

I started to look a bit about this issue but I have found a couple of blocks. I think it would be nice to continue the initial brainstorm with @goatsweater in an issue, so we could track ideas and possible solution(s). @ToucheSir It will be nice to get your feedback too.

Context:
I believe that we are using a great development tool for managing virtual environment and package management (i.e., Conda).
Unfortunately, setup.cfg install_requires configuration option doesn't understand Conda packages, only pips. Once our package is published or a wheel is created, if install_requires hasn't being declared, package dependencies are not managed when installing our package. That means that we don't have the dependencies needed to run our code solved when installing our package. The environment definition is part of the source code and repository but not distributed nor managed by the pip package management process.

Current Scenario:
After development our package and defining our virtual environment and dependencies using conda, a manual step needs to generate and validate the install requirement dependencies for our package, translate them to pip packages (in the event that they were conda packages) and include them in the setup.cfg file.

Cons:
Manually creating a mirror of dependencies appears to be a burden that could be simplified, hopefully automated, but at least some suggestion could be a good step in the right direction given the fact that we already defined our dev environment.

Ideas:
We would like to have the install_requires configuration automatically generated or maybe assisted from our conda environment definitions.
We could use our default environment.yml (2) file to recreate an initial list of pip packages to include as part of the setup.cfg configuration. Packages such as conda-minify sounds like a great alternative to compute the minimum set of dependencies in a conda environment.
Maybe creating a Makefile rule could extract the current active environment (or the content of environment.yml file), and compute a list of pip packages to include inside the setup.cfg file. This could be later reviewed and published if correct.

Blocks:

  1. Unfortunately our default conda files define mostly or only 'dependencies' (as conda dependencies builds) at this moment not pip dependencies, these might not be pip packages. (Most of the times conda packages are just wrappers around pip, but names and versioning could be different).
  2. The package conda-minify doesn't seem to be working correctly, it gives me an exception every time I try to use it (Mac). It might be a really immature package.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions