forked from pyranges/bamread
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.py
More file actions
71 lines (61 loc) · 2.2 KB
/
Copy pathsetup.py
File metadata and controls
71 lines (61 loc) · 2.2 KB
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
import os
import sys
from distutils.core import setup
from setuptools import find_packages, Extension, Command
from Cython.Build import cythonize
__version__ = open("bamread/version.py").readline().split(" = ")[1].replace(
'"', '').strip()
macros = []
install_requires = ["scipy", "numpy", "natsort", "cython", "pysam", "pandas"]
compile_options = [
"-Ofast", "-Wall"
# , "-stdlib=libc++"
] #, "-frename-registers", "-funroll-loops"] # , "-lgzstream", "-lz"
dir_path = os.path.dirname(os.path.realpath(__file__))
lib_dirs = []
include_dirs = [dir_path + "/bamread/src", dir_path]
from subprocess import check_output
# conda_path = check_output("which conda", shell=True).decode().strip()
# conda_include = []
# conda_lib = []
# if conda_path:
# conda_base = conda_path.replace("bin/conda", "")
# conda_include.append(os.path.join(conda_base, "include"))
# conda_lib.append(os.path.join(conda_base, "lib"))
# lib_dirs.extend(conda_lib)
# include_dirs.extend(conda_include)
extensions = [
Extension(
"bamread.src.bamread",
["bamread/src/bamread.pyx"],
# language="c++",
include_dirs=include_dirs,
library_dirs=lib_dirs,
extra_compile_args=compile_options)
]
# libraries=["z"])]
setup(
name="bamread",
packages=find_packages(),
ext_modules=cythonize(extensions, annotate=True, language_level='3'),
scripts=["bin/bamread"],
package_data={'': ['*.pyx', '*.pxd', '*.h', '*.c']},
version=__version__,
description="Read bam files quickly into dataframes in Python",
author="Endre Bakken Stovner",
author_email="endrebak85@gmail.com",
url="http://github.com/endrebak/bamread",
license=["MIT"],
install_requires=install_requires,
classifiers=[
"Programming Language :: Python :: 3",
"Development Status :: 4 - Beta", "Environment :: Other Environment",
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: MIT License",
"Operating System :: POSIX :: Linux",
"Operating System :: MacOS :: MacOS X",
"Topic :: Scientific/Engineering"
],
include_dirs=["."],
long_description=open("README.md").read())