2 # Time-stamp: <2019-12-12 13:04:02 taoliu>
6 Setup script for MACS -- Model Based Analysis for ChIP-Seq data
8 This code is free software; you can redistribute it and/or modify it
9 under the terms of the BSD License (see the file LICENSE included with
14 from setuptools
import setup
, Extension
16 from numpy
import get_include
as numpy_get_include
17 numpy_include_dir
= [numpy_get_include()]
20 if float(sys
.version
[:3])<3.6:
21 sys
.stderr
.write("CRITICAL: Python version must >= 3.6!\n")
24 # I intend to use -Ofast, however if gcc version < 4.6, this option is unavailable so...
25 extra_c_args
= ["-w","-O3","-ffast-math","-g0"] # for C, -Ofast implies -O3 and -ffast-math
27 ext_modules
= [Extension("MACS2.Prob", ["MACS2/Prob.pyx"], libraries
=["m"], include_dirs
=numpy_include_dir
, extra_compile_args
=extra_c_args
),
28 Extension("MACS2.IO.Parser",["MACS2/IO/Parser.pyx"], include_dirs
=numpy_include_dir
, extra_compile_args
=extra_c_args
),
29 Extension("MACS2.Pileup", ["MACS2/Pileup.pyx","MACS2/cPosValCalculation.c"], include_dirs
=numpy_include_dir
, extra_compile_args
=extra_c_args
),
30 Extension("MACS2.PeakModel", ["MACS2/PeakModel.pyx"], include_dirs
=numpy_include_dir
, extra_compile_args
=extra_c_args
),
31 Extension("MACS2.PeakDetect", ["MACS2/PeakDetect.pyx"], extra_compile_args
=extra_c_args
),
32 Extension("MACS2.Signal", ["MACS2/Signal.pyx"], include_dirs
=numpy_include_dir
, extra_compile_args
=extra_c_args
),
33 Extension("MACS2.IO.PeakIO", ["MACS2/IO/PeakIO.pyx"], extra_compile_args
=extra_c_args
),
34 Extension("MACS2.IO.BedGraphIO", ["MACS2/IO/BedGraphIO.pyx"], extra_compile_args
=extra_c_args
),
35 Extension("MACS2.IO.FixWidthTrack", ["MACS2/IO/FixWidthTrack.pyx"], include_dirs
=numpy_include_dir
, extra_compile_args
=extra_c_args
),
36 Extension("MACS2.IO.PairedEndTrack", ["MACS2/IO/PairedEndTrack.pyx"], include_dirs
=numpy_include_dir
, extra_compile_args
=extra_c_args
),
37 Extension("MACS2.IO.BedGraph", ["MACS2/IO/BedGraph.pyx"], libraries
=["m"], extra_compile_args
=extra_c_args
),
38 Extension("MACS2.IO.ScoreTrack", ["MACS2/IO/ScoreTrack.pyx"], include_dirs
=numpy_include_dir
, extra_compile_args
=extra_c_args
),
39 Extension("MACS2.IO.CallPeakUnit", ["MACS2/IO/CallPeakUnit.pyx"], include_dirs
=numpy_include_dir
, extra_compile_args
=extra_c_args
),
40 Extension("MACS2.Statistics", ["MACS2/Statistics.pyx"], libraries
=["m"], include_dirs
=["MACS2/",numpy_get_include()], extra_compile_args
=extra_c_args
),
43 with
open("README.md", "r") as fh
:
44 long_description
= fh
.read()
48 description
="Model Based Analysis for ChIP-Seq data",
49 long_description
= long_description
,
50 long_description_content_type
="text/markdown",
52 author_email
='vladimir.liu@gmail.com',
53 url
='http://github.com/taoliu/MACS/',
54 package_dir
={'MACS2' : 'MACS2'},
55 packages
=['MACS2', 'MACS2.IO'],
56 package_data
={'MACS2':['*.pxd']},
57 scripts
=['bin/macs2', ],
59 'Development Status :: 5 - Production/Stable',
60 'Environment :: Console',
61 'Intended Audience :: Developers',
62 'Intended Audience :: Science/Research',
63 'License :: OSI Approved :: BSD License',
64 'Operating System :: MacOS :: MacOS X',
65 'Operating System :: POSIX',
66 'Topic :: Scientific/Engineering :: Bio-Informatics',
67 'Programming Language :: Python :: 3.6',
68 'Programming Language :: Python :: 3.7',
69 'Programming Language :: Python :: 3.8',
70 'Programming Language :: Cython',
72 install_requires
=['numpy>=1.17'],
73 ext_modules
= ext_modules
76 if __name__
== '__main__':