Extract installation of dependencies from PackageBase.do_install#6833
Closed
alalazo wants to merge 2 commits intospack:developfrom
Closed
Extract installation of dependencies from PackageBase.do_install#6833alalazo wants to merge 2 commits intospack:developfrom
alalazo wants to merge 2 commits intospack:developfrom
Conversation
Member
|
Member
Author
|
@adamjstewart I can't reproduce this locally $ spack configure xz
==> Checking dependencies for ['xz']
==> Installing xz
==> Using cached archive: /home/mculpo/PycharmProjects/spack/var/spack/cache/xz/xz-5.2.3.tar.bz2
==> Staging archive: /home/mculpo/PycharmProjects/spack/var/spack/stage/xz-5.2.3-dfdm7dysz7f3odzyrtpe6nc65uerxgre/xz-5.2.3.tar.bz2
==> Created stage in /home/mculpo/PycharmProjects/spack/var/spack/stage/xz-5.2.3-dfdm7dysz7f3odzyrtpe6nc65uerxgre
==> No patches needed for xz
==> Building xz [AutotoolsPackage]
==> Executing phase: 'autoreconf'
==> Executing phase: 'configure'
==> Stopping at 'configure' phaseEDIT: I am exactly at 48ef453 |
Member
|
@alalazo Looks like it works for Python 2 but crashes for Python 3. |
Member
Author
|
@adamjstewart Confirmed. The bug though is not specific to this PR, but is also on develop. |
Member
Author
|
I am looking for a reliable source to check this, but it seems python3 exceptions don't have the |
Member
Author
|
Ok, seems something quite old - PEP 352 |
alalazo
added a commit
to epfl-scitas/spack
that referenced
this pull request
Jan 5, 2018
adamjstewart
pushed a commit
that referenced
this pull request
Jan 5, 2018
48ef453 to
fa6eb40
Compare
Up to this commit PackageBase.do_install was installing the root package of a DAG unconditionally and its dependencies conditionally (depending on the value of the boolean argument 'install_deps'). However, a sensible operation in many contexts is to install *only* the dependencies. This was not possible via API, and the code to do that was replicated in the implementation of PackageBase.do_install and of the 'spack install' command. Further, the code in those two places was not doing *exactly* the same thing. This commit extracts a new function that is used in both places, and is external to PackageBase. This choice has been preferred over extending PackageBase.do_install API because the method was already complex enough (10-15 arguments) and needed to be simplified + having a method on an instance that installs anything but that instance spec didn't seem a sensible choice.
fa6eb40 to
8df7be1
Compare
ch741
pushed a commit
to ch741/spack
that referenced
this pull request
Apr 20, 2018
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Up to this commit
PackageBase.do_installwas installing the root package of a DAG unconditionally and its dependencies conditionally (depending on the value of the boolean argumentinstall_deps).However, a sensible operation in many contexts is to install only the dependencies. This was not possible via API, and the code to do that was replicated in the implementation of
PackageBase.do_installand of thespack installcommand. Further, the code in those two places was not doing exactly the same thing.This commit extracts a new function that is used in both places, and is external to
PackageBase. This choice has been preferred over extendingPackageBase.do_installAPI because: