-
Notifications
You must be signed in to change notification settings - Fork 9
/
setup.py
83 lines (72 loc) · 2.14 KB
/
setup.py
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
import os
import re
from setuptools import setup, find_packages, Extension
from distutils.version import LooseVersion
from pybind11.setup_helpers import Pybind11Extension, build_ext
# from docs import conf as docs_conf
with open("README.md") as f:
long_description = f.read()
extras = {}
# Packages required for installing docs.
extras["docs"] = ["recommonmark", "nbsphinx", "sphinx-autobuild", "sphinx-rtd-theme"]
# Packages required for formatting code & running tests.
extras["test"] = [
"black==20.8b1",
"docformatter",
"isort==5.6.4",
"flake8",
"pytest",
"pytest-xdist",
]
# For developers, install development tools along with all optional dependencies.
extras["dev"] = extras["docs"] + extras["test"]
def get_cpp_sources():
return sorted(
[
"src/fastsk/_fastsk/bindings.cpp",
"src/fastsk/_fastsk/fastsk.cpp",
"src/fastsk/_fastsk/fastsk_kernel.cpp",
"src/fastsk/_fastsk/shared.cpp",
"src/fastsk/_fastsk/libsvm-code/svm.cpp",
"src/fastsk/_fastsk/libsvm-code/eval.cpp",
]
)
ext_modules = [
Pybind11Extension(name="fastsk._fastsk", sources=get_cpp_sources()),
]
setup(
name="fastsk",
version="0.0.2",
author="QData Lab at the University of Virginia",
author_email="yanjun@virginia.edu",
description="A library for generating gkm-svm faster",
include_package_data=False,
license="MIT",
long_description=long_description,
long_description_content_type="text/markdown",
url="https://github.com/QData/FastSk",
package_dir={"": "src"},
packages=find_packages(where="src"),
ext_modules=ext_modules,
cmdclass={"build_ext": build_ext},
extras_require=extras,
classifiers=[
"Programming Language :: Python :: 3",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
],
python_requires=">=3.6",
install_requires=[
"certifi",
"joblib",
"numpy",
"pandas",
"python-dateutil",
"pytz",
"scikit-learn",
"scipy",
"six",
"tqdm",
],
zip_safe=False,
)