Skip to content

Spack Setup: Developer Build Tool#7830

Closed
citibeth wants to merge 8 commits intofeatures/contextfrom
features/context_setup
Closed

Spack Setup: Developer Build Tool#7830
citibeth wants to merge 8 commits intofeatures/contextfrom
features/context_setup

Conversation

@citibeth
Copy link
Copy Markdown
Member

@pramodskumbhar @bvanessen
This PR adds spack setup capability and supercedes #5043. It is based on the Spack Environments PR (#4585). Ideally, the two can be merged at the same time.

Setup is a developer tool that makes it easy to configure CMake-based packages to use Spack-built dependencies. When Spack installs a package as "setup", it does not download, build or install that package. Instead, it creates a Python script <package>-config.py that, when run, will call CMake with appropriate configuration options.

Syntax is as follows:

spack install --setup pkg1,pkg2 --setup pkg3 ... spec

This will install the DAG represented by spec, while installing pkg1, pkg2 and pkg3 in setup mode. Most common is to install the top of the DAG only as setup:

spack install --setup spec spec
  1. When a package is installed as "setup", Spack still creates a module and database entry, as it would for any other installation. As far as Spack is concerned, the packages is fully installed. The user is then required to complete the installation. Overall use might be as follows:
spack install --setup mypackage mypackage
cd mypackage-source-dir
mkdir build
cd build
../../mypackage-config.py
make
make install
  1. Because Spack does not actually install packages in "setup" mode, any packages that depend on a setup package must also bee "installed" in "setup" mode. This restriction is not currently checked.

  2. Setup mode currently only works for packages subclassing from CMakePackage. Similar work could be done for other build systems, as well as ad-hoc packages.

NOTES:

  • Setup was added to previous versions of Spack; but was never merged and suffered bitrot. This is the third (!) time the spack setup capability has been added to Spack; and hopefully we can get it merged this time!

  • This PR contains the minimal changes needed to get Spack setup working. The separate spack setup command in previous incarnations has been removed for simplicity.

  • Future commits to this PR will allow for the use of Spack setup in environments.

@citibeth citibeth closed this Apr 20, 2018
@citibeth citibeth deleted the features/context_setup branch April 20, 2018 03:27
omsai added a commit to omsai/spack that referenced this pull request Aug 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant