py-sip: remove custom phases
This commit is contained in:
parent
2bb9eeac28
commit
fd724fb38d
@ -27,28 +27,27 @@ class PySip(PythonPackage):
|
|||||||
values=str, multi=False)
|
values=str, multi=False)
|
||||||
|
|
||||||
depends_on('python@3.6:', when='@6:', type=('build', 'run'))
|
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
|
with when('@5:'):
|
||||||
phases = ['configure', 'build', 'install']
|
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):
|
def url_for_version(self, version):
|
||||||
if version < Version('5.0.0'):
|
if version < Version('5.0.0'):
|
||||||
return "https://www.riverbankcomputing.com/hg/sip/archive/{0}.tar.gz".format(version.dotted)
|
return "https://www.riverbankcomputing.com/hg/sip/archive/{0}.tar.gz".format(version.dotted)
|
||||||
return super(PySip, self).url_for_version(version)
|
return super(PySip, self).url_for_version(version)
|
||||||
|
|
||||||
@run_before('configure')
|
@when('@:4')
|
||||||
def prepare(self):
|
def install(self, spec, prefix):
|
||||||
if self.spec.satisfies('@:4') and not os.path.exists('configure.py'):
|
if not os.path.exists('configure.py'):
|
||||||
python('build.py', 'prepare')
|
python('build.py', 'prepare')
|
||||||
|
|
||||||
def configure(self, spec, prefix):
|
|
||||||
if self.spec.satisfies('@:4'):
|
|
||||||
args = [
|
args = [
|
||||||
'--sip-module={0}'.format(spec.variants['module'].value),
|
'--sip-module={0}'.format(spec.variants['module'].value),
|
||||||
'--bindir={0}'.format(prefix.bin),
|
'--bindir={0}'.format(prefix.bin),
|
||||||
@ -58,19 +57,8 @@ def configure(self, spec, prefix):
|
|||||||
'--sipdir={0}'.format(prefix.share.sip),
|
'--sipdir={0}'.format(prefix.share.sip),
|
||||||
'--stubsdir={0}'.format(python_platlib),
|
'--stubsdir={0}'.format(python_platlib),
|
||||||
]
|
]
|
||||||
|
|
||||||
python('configure.py', *args)
|
python('configure.py', *args)
|
||||||
|
|
||||||
@when('@5:')
|
|
||||||
def build(self, spec, prefix):
|
|
||||||
pass
|
|
||||||
|
|
||||||
@when('@:4')
|
|
||||||
def build(self, spec, prefix):
|
|
||||||
make()
|
make()
|
||||||
|
|
||||||
@when('@:4')
|
|
||||||
def install(self, spec, prefix):
|
|
||||||
make('install')
|
make('install')
|
||||||
|
|
||||||
@run_after('install')
|
@run_after('install')
|
||||||
|
Loading…
Reference in New Issue
Block a user