spack: introduce dependency types

deptypes: allow for different queries

For things like Python modules, they are required for the build and
runtime, but rather than adding a new parameter for what to query across
the dependency DAG, just expose the recursive query parameter.
This commit is contained in:
Ben Boeckel
2016-01-25 10:26:35 -05:00
parent bae97d17d0
commit 45c675fe7f
34 changed files with 697 additions and 182 deletions

View File

@@ -38,7 +38,7 @@ class CmakeClient(Package):
version('1.0', '4cb3ff35b2472aae70f542116d616e63')
depends_on('cmake')
depends_on('cmake', type='build')
def setup_environment(self, spack_env, run_env):

View File

@@ -0,0 +1,18 @@
from spack import *
class Dtbuild1(Package):
"""Package for use as a build tool for deptypes testing which has its own
deptree"""
homepage = "http://www.example.com"
url = "http://www.example.com/dtbuild1-1.0.tar.gz"
version('1.0', '0123456789abcdef0123456789abcdef')
depends_on('dtbuild2', type='build')
depends_on('dtlink2')
depends_on('dtrun2', type='run')
def install(self, spec, prefix):
pass

View File

@@ -0,0 +1,13 @@
from spack import *
class Dtbuild2(Package):
"""Simple package which acts as a build dependency"""
homepage = "http://www.example.com"
url = "http://www.example.com/dtbuild2-1.0.tar.gz"
version('1.0', '0123456789abcdef0123456789abcdef')
def install(self, spec, prefix):
pass

View File

@@ -0,0 +1,13 @@
from spack import *
class Dtbuild3(Package):
"""Simple package which acts as a build dependency"""
homepage = "http://www.example.com"
url = "http://www.example.com/dtbuild3-1.0.tar.gz"
version('1.0', '0123456789abcdef0123456789abcdef')
def install(self, spec, prefix):
pass

View File

@@ -0,0 +1,15 @@
from spack import *
class Dtlink1(Package):
"""Simple package which acts as a link dependency"""
homepage = "http://www.example.com"
url = "http://www.example.com/dtlink1-1.0.tar.gz"
version('1.0', '0123456789abcdef0123456789abcdef')
depends_on('dtlink3')
def install(self, spec, prefix):
pass

View File

@@ -0,0 +1,13 @@
from spack import *
class Dtlink2(Package):
"""Simple package which acts as a link dependency"""
homepage = "http://www.example.com"
url = "http://www.example.com/dtlink2-1.0.tar.gz"
version('1.0', '0123456789abcdef0123456789abcdef')
def install(self, spec, prefix):
pass

View File

@@ -0,0 +1,16 @@
from spack import *
class Dtlink3(Package):
"""Simple package which acts as a link dependency"""
homepage = "http://www.example.com"
url = "http://www.example.com/dtlink3-1.0.tar.gz"
version('1.0', '0123456789abcdef0123456789abcdef')
depends_on('dtbuild2', type='build')
depends_on('dtlink4')
def install(self, spec, prefix):
pass

View File

@@ -0,0 +1,13 @@
from spack import *
class Dtlink4(Package):
"""Simple package which acts as a link dependency"""
homepage = "http://www.example.com"
url = "http://www.example.com/dtlink4-1.0.tar.gz"
version('1.0', '0123456789abcdef0123456789abcdef')
def install(self, spec, prefix):
pass

View File

@@ -0,0 +1,13 @@
from spack import *
class Dtlink5(Package):
"""Simple package which acts as a link dependency"""
homepage = "http://www.example.com"
url = "http://www.example.com/dtlink5-1.0.tar.gz"
version('1.0', '0123456789abcdef0123456789abcdef')
def install(self, spec, prefix):
pass

View File

@@ -0,0 +1,16 @@
from spack import *
class Dtrun1(Package):
"""Simple package which acts as a run dependency"""
homepage = "http://www.example.com"
url = "http://www.example.com/dtrun1-1.0.tar.gz"
version('1.0', '0123456789abcdef0123456789abcdef')
depends_on('dtlink5')
depends_on('dtrun3', type='run')
def install(self, spec, prefix):
pass

View File

@@ -0,0 +1,13 @@
from spack import *
class Dtrun2(Package):
"""Simple package which acts as a run dependency"""
homepage = "http://www.example.com"
url = "http://www.example.com/dtrun2-1.0.tar.gz"
version('1.0', '0123456789abcdef0123456789abcdef')
def install(self, spec, prefix):
pass

View File

@@ -0,0 +1,15 @@
from spack import *
class Dtrun3(Package):
"""Simple package which acts as a run dependency"""
homepage = "http://www.example.com"
url = "http://www.example.com/dtrun3-1.0.tar.gz"
version('1.0', '0123456789abcdef0123456789abcdef')
depends_on('dtbuild3', type='build')
def install(self, spec, prefix):
pass

View File

@@ -0,0 +1,17 @@
from spack import *
class Dttop(Package):
"""Package with a complicated dependency tree"""
homepage = "http://www.example.com"
url = "http://www.example.com/dttop-1.0.tar.gz"
version('1.0', '0123456789abcdef0123456789abcdef')
depends_on('dtbuild1', type='build')
depends_on('dtlink1')
depends_on('dtrun1', type='run')
def install(self, spec, prefix):
pass

View File

@@ -0,0 +1,15 @@
from spack import *
class Dtuse(Package):
"""Simple package which uses dttop"""
homepage = "http://www.example.com"
url = "http://www.example.com/dtuse-1.0.tar.gz"
version('1.0', '0123456789abcdef0123456789abcdef')
depends_on('dttop')
def install(self, spec, prefix):
pass