-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathsetup.py
More file actions
71 lines (61 loc) · 2.62 KB
/
setup.py
File metadata and controls
71 lines (61 loc) · 2.62 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
#!/usr/bin/env python3
# Set this to True to enable building extensions using Cython.
# Set it to False to build extensions from the C file (that
# was previously created using Cython).
# Set it to 'auto' to build with Cython if available, otherwise
# from the C file.
USE_CYTHON = False
# https://stackoverflow.com/questions/49471084/prepare-c-based-cython-package-to-publish-on-pypi
import sys
import numpy
from setuptools import setup, Extension, find_packages
# from setuptools import Extension
from Cython.Distutils import build_ext
from Cython.Build import cythonize
import os.path
ext = '.pyx' if USE_CYTHON else '.c'
cmdclass = { }
if USE_CYTHON:
ext_modules = [Extension("boostdiff.differential_trees.arandom", ["boostdiff/differential_trees/arandom.pyx"]),
Extension("boostdiff.differential_trees.splitter", ["boostdiff/differential_trees/splitter.pyx"]),
Extension("boostdiff.differential_trees.utils", ["boostdiff/differential_trees/utils.pyx"]),
Extension("boostdiff.differential_trees.diff_tree", ["boostdiff/differential_trees/diff_tree.pyx"]),]
cmdclass = { 'build_ext': build_ext }
else:
ext_modules = [Extension("boostdiff.differential_trees.arandom", ["boostdiff/differential_trees/arandom.c"]),
Extension("boostdiff.differential_trees.splitter", ["boostdiff/differential_trees/splitter.c"]),
Extension("boostdiff.differential_trees.utils", ["boostdiff/differential_trees/utils.c"]),
Extension("boostdiff.differential_trees.diff_tree", ["boostdiff/differential_trees/diff_tree.c"]),]
if sys.version_info[0] == 2:
raise Exception('Python 2.x is not supported')
setup(
name='boostdiff',
version="0.0.1",
description='Boosted differential trees algorithm',
author='Gihanna Galindez',
author_email='gihanna.galindez@plri.de',
url='http://github.com/gihannagalindez/boostdiff_inference',
packages=find_packages(),
package_dir={
'boostdiff':'boostdiff',
},
cmdclass = cmdclass,
ext_modules=ext_modules,
include_dirs=[numpy.get_include()],
license="GPLv3",
classifiers=[
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
"Topic :: Scientific/Engineering :: Bio-Informatics",
],
install_requires=[
'numpy',
'pandas',
'matplotlib',
'cython',
'networkx',
],
keywords='differential network inference',
)