-
Notifications
You must be signed in to change notification settings - Fork 12
uberenv updates to support dev with python in spack envs #124
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Looks like i need to fix the view dir patching logic. |
| # pick the first in the list. | ||
| if l.startswith(pkg_name) and len(l.split()) > 1: | ||
| return {"name": pkg_name, "path": l.split()[-1]} | ||
| pkg_path = l.split()[-1] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
part of a fix for #123
| # pick the first in the list. | ||
| if l.startswith(pkg_name) and len(l.split()) > 1: | ||
| return {"name": pkg_name, "path": l.split()[-1]} | ||
| pkg_path = l.split()[-1] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
part of a fix for #123
|
I removed the logic that tried to present a better default view by hacking yaml, and instead opt-ed to symlink whatever the view directory is under the prefix. This should be more robust and work with any view setup even if it was customized in an input spack.yaml |
|
I need to test why we can't inspect and symlink the view for the |
|
@white238 @kennyweiss @chapman39 This branch has been tested and is now in use for both conduit and ascent CI. |
| open(spack_lib_config_src,"w").write(cfg_script) | ||
|
|
||
| # disable user cache dir | ||
| spack_cache_path_dir = pjoin(self.dest_dir,"spack_cache") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had to add this to avoid any read / write of ~/.spack, disabling the local config is not sufficient.
|
|
||
| def patch(self): | ||
| # force spack to use only "defaults" config scope | ||
| self.disable_spack_config_scopes() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we have to disable this first and for most, b/c w/o this -- any command may read/write to~/.spack
|
|
||
| # setup clingo (unless specified not to) | ||
| if "spack_setup_clingo" in self.project_args and self.project_args["spack_setup_clingo"] == False: | ||
| if "spack_setup_clingo" in self.project_args and self.project_args["spack_setup_clingo"].lower() == "false": |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed this statement, prior logic would never work.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this really should be called spack_boostrap_now() or something similar -- its not setup clingo any more
|
closing #155 should be used instead. |
Updates that adjust uberenv spack env setup so that folks can develop using python modules installed to a spack view.
Addresses most challenges outlined #120.
May still need some cleanup, so comments welcome.
Details:
Uses patterns from
.uberenv_config.jsonspack_host_config_patches` entry to drive what is patched:Example input:
Creates a
-patchd.cmakefile in the prefix dir (does not modify original host config)--spack-skip-externalsoptionThis is mostly driven by the limitations of using an external python, but is generally useful for cases where system libs undermine you.
{prefix}/spack_viewfor easy access.- patch spack.yaml to create theviewdir underspack_env, instead of a hidden file deeper in the dir hierarchyThis should only happen in cases where spack.yaml lacks view customization.