1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
|
# Copyright 2013-2022 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)
import os
from spack.package import *
class Sonlib(MakefilePackage):
"""sonLib is a compact C/Python library for
sequence analysis in bioinformatics."""
# This is sonlib as needed by the hal package which expects
# a side by side compilation
#
# If you need to use sonlib then you want py-sonlib
homepage = "https://github.com/ComparativeGenomicsToolkit"
url = "https://github.com/ComparativeGenomicsToolkit/sonLib"
git = "https://github.com/ComparativeGenomicsToolkit/sonLib.git"
version('master', branch='master')
version('2020-04-01', commit='7ebe2ede05a6ee366d93a7a993db69a99943a68f')
def setup_build_environment(self, env):
binpath = os.path.join(self.stage.source_path, 'bin')
libpath = os.path.join(self.stage.source_path, 'lib')
env.set('BINDIR', binpath)
env.set('LIBDIR', libpath)
def build(self, spec, prefix):
binpath = os.path.join(self.stage.source_path, 'bin')
libpath = os.path.join(self.stage.source_path, 'lib')
mkdir(binpath)
mkdir(libpath)
make()
def install(self, spec, prefix):
install_tree('bin', prefix.bin)
install_tree('lib', prefix.lib)
|