minimap2, py-mappy: change dependency and build on ARM (#12127)

* minimap2: remove py-mappy dependency and build on ARM
py-mappy: Change URL and new version.

* merge py-mappy to minimap2.

* 1. add type in depends_on.
2. remove unneeded which.
This commit is contained in:
Toyohisa Kameyama 2019-08-03 09:21:33 +09:00 committed by Adam J. Stewart
parent 0c1496896d
commit 50b90ed2bf
2 changed files with 15 additions and 22 deletions

View file

@ -6,9 +6,10 @@
from spack import * from spack import *
class Minimap2(MakefilePackage): class Minimap2(PythonPackage):
"""Minimap2 is a versatile sequence alignment program that aligns DNA or """Minimap2 is a versatile sequence alignment program that aligns DNA or
mRNA sequences against a large reference database.""" mRNA sequences against a large reference database.
Mappy provides a convenient interface to minimap2."""
homepage = "https://github.com/lh3/minimap2" homepage = "https://github.com/lh3/minimap2"
url = "https://github.com/lh3/minimap2/releases/download/v2.2/minimap2-2.2.tar.bz2" url = "https://github.com/lh3/minimap2/releases/download/v2.2/minimap2-2.2.tar.bz2"
@ -17,9 +18,18 @@ class Minimap2(MakefilePackage):
version('2.10', '52b36f726ec00bfca4a2ffc23036d1a2b5f96f0aae5a92fd826be6680c481c20') version('2.10', '52b36f726ec00bfca4a2ffc23036d1a2b5f96f0aae5a92fd826be6680c481c20')
version('2.2', '5b68e094f4fa3dfbd9b37d5b654b7715') version('2.2', '5b68e094f4fa3dfbd9b37d5b654b7715')
depends_on('py-mappy', type=('build', 'run')) conflicts('target=aarch64', when='@:2.10')
depends_on('zlib') depends_on('zlib', type='link')
depends_on('py-cython', type='build')
def install(self, spec, prefix): @run_after('install')
def install_minimap2(self):
make_arg = []
if self.spec.satisfies("target=aarch64"):
make_arg.extend([
'arm_neon=1',
'aarch64~1'
])
make(*make_arg)
mkdirp(prefix.bin) mkdirp(prefix.bin)
install('minimap2', prefix.bin) install('minimap2', prefix.bin)

View file

@ -1,17 +0,0 @@
# Copyright 2013-2019 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
class PyMappy(PythonPackage):
"""Mappy provides a convenient interface to minimap2."""
homepage = "https://pypi.python.org/pypi/mappy"
url = "https://pypi.io/packages/source/m/mappy/mappy-2.2.tar.gz"
version('2.2', 'dfc2aefe98376124beb81ce7dcefeccb')
depends_on('zlib')