Added script front-end for primer-design code
[htsworkflow.git] / htswanalysis / MACS / setup.py
1 #!/usr/bin/env python
2 # Time-stamp: <2008-05-28 13:57:25 Tao Liu>
3
4 """Description
5
6 Setup script for MACS -- Model Based Analysis for ChIP-Seq data
7
8 Copyright (c) 2008 Tao Liu <taoliu@jimmy.harvard.edu>
9
10 This code is free software; you can redistribute it and/or modify it
11 under the terms of the Artistic License (see the file COPYING included
12 with the distribution).
13
14 @status:  beta
15 @version: $Revision$
16 @author:  Tao Liu
17 @contact: taoliu@jimmy.harvard.edu
18 """
19
20 import os
21 import sys
22 from distutils.core import setup, Extension
23
24 def main():
25     if not float(sys.version[:3])>=2.4:
26         sys.stderr.write("CRITICAL: Python version must be greater than or equal to 2.4!\n")
27         sys.exit(1)
28     sys.stderr.write("Making GSL...\n")
29     os.chdir("lib/gsl/gsl-1.11")
30     os.system("./configure --enable-shared")
31     os.system("make")
32     os.system("mkdir lib")
33     os.system("cp .libs/libgsl.a lib/")
34     os.chdir("../../../")
35     sys.stderr.write("Done.\n")
36     setup(name="MACS",
37           version="1.1",
38           description="Model Based Analysis for ChIP-Seq data",
39           author='Yong Zhang; Tao (Foo) Liu',
40           author_email='zy@jimmy.harvard.edu; taoliu@jimmy.harvard.edu',
41           url='http://liulab.dfci.harvard.edu/MACS/',
42           package_dir={'MACS' : 'lib'},
43           packages=['MACS', 'MACS.TabIO', 'MACS.gsl'],
44           scripts=['bin/macs'],
45           ext_modules=[
46             Extension('MACS.gsl.cdf',['lib/gsl/cdf.c'],
47                       include_dirs=['lib/gsl/gsl-1.11/gsl/'],
48                       library_dirs=['lib/gsl/gsl-1.11/lib/'],
49                       libraries=['gsl','m'])],
50           classifiers=[
51             'Development Status :: 5 - productive',
52             'Environment :: Console',
53             'Intended Audience :: Developers',
54             'License :: OSI Approved :: Artistic License',
55             'Operating System :: MacOS :: MacOS X',
56             'Operating System :: Microsoft :: Windows',
57             'Operating System :: POSIX',
58             'Programming Language :: Python',
59             ],
60           )
61     os.chdir("lib/gsl/gsl-1.11")
62     os.system("rm -f lib/libgsl.a")
63     os.system("rmdir lib")
64     os.chdir("../../../")
65
66 if __name__ == '__main__':
67     main()