/
setup.py
54 lines (49 loc) · 1.38 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
import os
import sys
from setuptools import setup
from distutils.extension import Extension
import libsvm
DESCRIPTION = 'Pre-built LibSVM packages for Python.'
LICENSE = 'Apache 2.0'
DIST_NAME = 'libsvm'
ROOT_PATH = os.path.dirname(os.path.abspath(__file__))
AUTHOR_EMAIL = 'me@ocampor.ai'
AUTHOR = 'Ricardo Ocampo'
URL = 'https://github.com/ocampor/libsvm'
VERSION = libsvm.__version__
with open(os.path.join(ROOT_PATH, 'README.rst'), 'r') as readme:
LONG_DESCRIPTION = readme.read()
if sys.platform == 'win32':
EXT_MODULES = []
else:
libsvm = Extension(
'libsvm',
sources=['src/libsvm/svm.cpp'])
EXT_MODULES = [libsvm]
setup(
name=DIST_NAME,
packages=['libsvm'],
version=VERSION,
license=LICENSE,
description=DESCRIPTION,
long_description=LONG_DESCRIPTION,
author=AUTHOR,
author_email=AUTHOR_EMAIL,
url=URL,
extras_require={
'dev': [
'pytest',
'pytest-pep8',
'pytest-cov'
]
},
classifiers=[
'Intended Audience :: Developers',
'Topic :: Scientific/Engineering :: Artificial Intelligence',
'Topic :: Scientific/Engineering :: Image Recognition',
'License :: OSI Approved :: Apache Software License',
'Programming Language :: Python :: 3.7',
],
include_package_data=True,
python_requires=">=3.4",
ext_modules=EXT_MODULES)