Skip to content

spack envs + uberenv python issues #120

@cyrush

Description

@cyrush

Two issues with using uberenv + spack envs that we still need to resolve to restore parity with pre spack env uberenv.

These are both related to the requirement that after we use spack to build, we can develop without extra env vars by just using a spack generated host-config.

If you are using python modules for your project, an external python will not produce an env view that has a working python w/ spack built modules. Also, uberenv calling spack external find will almost always find a system python.

Both of together these mean a default invocation of uberenv will fail.

Solution? Make sure uberenv excludes looking for python, or add an option to do so.

Chicken vs Egg with views to support python use outside of spack.

Assuming you are not using a system python, at the end of the env build, spack will create view that provides python layout that works with all of your requested modules.

This is great, however we capture the path to python and write it to our host configs during the spack package build process -- this view does not exist yet,

It works during spack package build b/c spack will provide the proper env vars etc, but the captured host config python path will not work.

Solution? Add an option to modify the final host config post build to inject the proper python path.
Feels messy, but w/o a fix development using python modules is broken w/o other post spack steps.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions