Changelog entry marking the package released.
[tabix.git] / python / setup.py
1 #!/usr/bin/env python
2 #
3 # The MIT License
4 #
5 # Copyright (c) 2011 Seoul National University.
6 #
7 # Permission is hereby granted, free of charge, to any person obtaining
8 # a copy of this software and associated documentation files (the
9 # "Software"), to deal in the Software without restriction, including
10 # without limitation the rights to use, copy, modify, merge, publish,
11 # distribute, sublicense, and/or sell copies of the Software, and to
12 # permit persons to whom the Software is furnished to do so, subject to
13 # the following conditions:
14 #
15 # The above copyright notice and this permission notice shall be
16 # included in all copies or substantial portions of the Software.
17 #
18 # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
19 # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
20 # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
21 # NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
22 # BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
23 # ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
24 # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
25 # SOFTWARE.
26 #
27 # Contact: Hyeshik Chang <hyeshik@snu.ac.kr>
28
29 from distutils.core import setup, Extension
30
31 # Change this to True when you need the knetfile support.
32 USE_KNETFILE = False
33
34 TABIX_SOURCE_FILES = [
35     '../bgzf.c', '../bgzip.c', '../index.c', '../knetfile.c', '../kstring.c'
36 ]
37
38 define_options = [('_FILE_OFFSET_BITS', 64)]
39 if USE_KNETFILE:
40     define_options.append(('_USE_KNETFILE', 1))
41
42 ext_modules = [Extension("tabix", ["tabixmodule.c"] + TABIX_SOURCE_FILES,
43                          include_dirs=['..'],
44                          libraries=['z'],
45                          define_macros=define_options)]
46
47 setup (name = 'tabix',
48        version = '1.0',
49        description = 'Python interface to tabix, a generic indexer '
50                      'for TAB-delimited genome position files',
51        author = 'Hyeshik Chang',
52        author_email = 'hyeshik@snu.ac.kr',
53        license = 'MIT',
54        ext_modules = ext_modules
55 )