File: setup.py

package info (click to toggle)
libedlib 1.2.7-7
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 14,532 kB
  • sloc: cpp: 2,002; sh: 304; python: 131; makefile: 89; ansic: 7
file content (47 lines) | stat: -rw-r--r-- 1,840 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
from setuptools import setup, Extension
from codecs import open
import os

cmdclass = {}
long_description = ""

# Build directly from cython source file(s) if user wants so (probably for some experiments).
# Otherwise, pre-generated c source file(s) are used.
# User has to set environment variable EDLIB_USE_CYTHON.
# e.g.: EDLIB_USE_CYTHON=1 python setup.py install
USE_CYTHON = os.getenv('EDLIB_USE_CYTHON', False)
if USE_CYTHON:
    from Cython.Build import build_ext
    edlib_module_src = "edlib.pyx"
    cmdclass['build_ext'] = build_ext
else:
    edlib_module_src = "edlib.bycython.cpp"

# Load README.rst into long description.
# User can skip using README.rst as long description: EDLIB_OMIT_README_RST=1 python setup.py install
OMIT_README_RST = True # os.getenv('EDLIB_OMIT_README_RST', False)
if not OMIT_README_RST:
    here = os.path.abspath(os.path.dirname(__file__))
    with open(os.path.join(here, 'README.rst'), encoding='utf-8') as f:
        long_description = f.read()

setup(
    # Information
    name = "edlib",
    description = "Lightweight, super fast library for sequence alignment using edit (Levenshtein) distance.",
    long_description = long_description,
    version = "1.3.8.post2",
    url = "https://github.com/Martinsos/edlib",
    author = "Martin Sosic",
    author_email = "sosic.martin@gmail.com",
    license = "MIT",
    keywords = "edit distance levenshtein align sequence bioinformatics",
    # Build instructions
    ext_modules = [Extension("edlib",
                             [edlib_module_src, "edlib/src/edlib.cpp"],
                             include_dirs=["edlib/include"],
                             depends=["edlib/include/edlib.h"],
                             language="c++",
                             extra_compile_args=["-O3", "-std=c++11"])],
    cmdclass = cmdclass
)