File: setup.py

package info (click to toggle)
python-ncls 0.0.63-hotfix%2Bds-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 376 kB
  • sloc: ansic: 2,412; python: 205; sh: 18; makefile: 5
file content (96 lines) | stat: -rw-r--r-- 2,747 bytes parent folder | download | duplicates (3)
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
from setuptools import find_packages, Extension, Command
from distutils.core import setup


# try:
#     from Cython.Build import cythonize
# except ImportError:
#      def cythonize(*args, **kwargs):
#          from Cython.Build import cythonize
#          return cythonize(*args, **kwargs)





import os
import sys

CLASSIFIERS = """Development Status :: 5 - Production/Stable
Operating System :: MacOS :: MacOS X
Operating System :: Microsoft :: Windows :: Windows NT/2000
Operating System :: OS Independent
Operating System :: POSIX
Operating System :: POSIX :: Linux
Operating System :: Unix
Programming Language :: Python
Topic :: Scientific/Engineering
Topic :: Scientific/Engineering :: Bio-Informatics"""

# split into lines and filter empty ones
CLASSIFIERS = CLASSIFIERS.split("\n")

# macros = [("CYTHON_TRACE", "1")]

# # extension sources
# macros = []

# if macros:
#     from Cython.Compiler.Options import get_directive_defaults
#     directive_defaults = get_directive_defaults()
#     directive_defaults['linetrace'] = True
#     directive_defaults['binding'] = True

dir_path = os.path.dirname(os.path.realpath(__file__))

include_dirs = [dir_path + "/ncls/src", dir_path]

__version__ = open("ncls/version.py").readline().split(" = ")[1].replace(
    '"', '').strip()



extensions = [
    Extension(
        "ncls.src.ncls", ["ncls/src/ncls.pyx", "ncls/src/intervaldb.c"],
        # define_macros=macros,
        include_dirs=include_dirs),
    Extension(
        "ncls.src.ncls32", ["ncls/src/ncls32.pyx", "ncls/src/intervaldb32.c"],
        # define_macros=macros,
        include_dirs=include_dirs),
    Extension(
        "ncls.src.fncls", ["ncls/src/fncls.pyx", "ncls/src/fintervaldb.c"],
        # define_macros=macros,
        include_dirs=include_dirs)]

# using setuptools to cythonize if cython not found
# not recommended by cython docs, but still
try:
    from cython.Build import cythonize
    ext_modules = cythonize(extensions, language_level=2)
except ImportError:
    ext_modules = extensions


setup(
    name = "ncls",
    version=__version__,
    packages=find_packages(),
    ext_modules = ext_modules,
    setup_requires = ["cython"],
    install_requires = ["numpy"],
    # py_modules=["pyncls"],
    description = \
    'A wrapper for the nested containment list data structure.',
    long_description = __doc__,
    # I am the maintainer; the datastructure was invented by
    # Alexander V. Alekseyenko and Christopher J. Lee.
    author = "Endre Bakken Stovner",
    author_email='endrebak85@gmail.com',
    url = 'https://github.com/endrebak/ncls',
    license = 'New BSD License',
    classifiers = CLASSIFIERS,
    package_data={'': ['*.pyx', '*.pxd', '*.h', '*.c']},
    include_dirs=["."],
)