diff options
author | Massimiliano Culpo <massimiliano.culpo@gmail.com> | 2022-04-11 17:16:49 +0200 |
---|---|---|
committer | Massimiliano Culpo <massimiliano.culpo@gmail.com> | 2022-04-12 08:39:15 +0200 |
commit | fd724fb38da4b5c357fd48aa22304f9f721c9ea1 (patch) | |
tree | 802d21ec3530fb52ae99683f7adc394b11649980 | |
parent | 2bb9eeac283421429d7c77decbce356b981b3863 (diff) | |
download | spack-fd724fb38da4b5c357fd48aa22304f9f721c9ea1.tar.gz spack-fd724fb38da4b5c357fd48aa22304f9f721c9ea1.tar.bz2 spack-fd724fb38da4b5c357fd48aa22304f9f721c9ea1.tar.xz spack-fd724fb38da4b5c357fd48aa22304f9f721c9ea1.zip |
py-sip: remove custom phases
-rw-r--r-- | var/spack/repos/builtin/packages/py-sip/package.py | 56 |
1 files changed, 22 insertions, 34 deletions
diff --git a/var/spack/repos/builtin/packages/py-sip/package.py b/var/spack/repos/builtin/packages/py-sip/package.py index f0560f429b..427e450aba 100644 --- a/var/spack/repos/builtin/packages/py-sip/package.py +++ b/var/spack/repos/builtin/packages/py-sip/package.py @@ -27,50 +27,38 @@ class PySip(PythonPackage): values=str, multi=False) depends_on('python@3.6:', when='@6:', type=('build', 'run')) - depends_on('python@3.5.1:', when='@5:', type=('build', 'run')) - depends_on('py-packaging', when='@5:', type='build') - depends_on('py-setuptools@30.3:', when='@5:', type='build') - depends_on('py-toml', when='@5:', type='build') - depends_on('flex', when='@:4', type='build') - depends_on('bison', when='@:4', type='build') - # needed for @:4 - phases = ['configure', 'build', 'install'] + with when('@5:'): + depends_on('python@3.5.1:', type=('build', 'run')) + depends_on('py-packaging', type='build') + depends_on('py-setuptools@30.3:', type='build') + depends_on('py-toml', type='build') + + with when('@:4'): + depends_on('flex', type='build') + depends_on('bison', type='build') def url_for_version(self, version): if version < Version('5.0.0'): return "https://www.riverbankcomputing.com/hg/sip/archive/{0}.tar.gz".format(version.dotted) return super(PySip, self).url_for_version(version) - @run_before('configure') - def prepare(self): - if self.spec.satisfies('@:4') and not os.path.exists('configure.py'): + @when('@:4') + def install(self, spec, prefix): + if not os.path.exists('configure.py'): python('build.py', 'prepare') - def configure(self, spec, prefix): - if self.spec.satisfies('@:4'): - args = [ - '--sip-module={0}'.format(spec.variants['module'].value), - '--bindir={0}'.format(prefix.bin), - '--destdir={0}'.format(python_platlib), - '--incdir={0}'.format(join_path( - prefix, spec['python'].package.include)), - '--sipdir={0}'.format(prefix.share.sip), - '--stubsdir={0}'.format(python_platlib), - ] - - python('configure.py', *args) - - @when('@5:') - def build(self, spec, prefix): - pass - - @when('@:4') - def build(self, spec, prefix): + args = [ + '--sip-module={0}'.format(spec.variants['module'].value), + '--bindir={0}'.format(prefix.bin), + '--destdir={0}'.format(python_platlib), + '--incdir={0}'.format(join_path( + prefix, spec['python'].package.include)), + '--sipdir={0}'.format(prefix.share.sip), + '--stubsdir={0}'.format(python_platlib), + ] + python('configure.py', *args) make() - - @when('@:4') - def install(self, spec, prefix): make('install') @run_after('install') |