-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathsetup.py
51 lines (45 loc) · 1.35 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
from setuptools import setup, Extension
NAME = 'dartsclone'
VERSION = '0.10.2'
EXTENSIONS = [
Extension(
'{0}._{0}'.format(NAME),
language='c++',
sources=[
'{0}/_{0}.pyx'.format(NAME),
'csrc/src/darts.cc'
],
include_dirs=['./csrc/include']
)
]
if __name__ == '__main__':
import os
from os import path
import glob
[os.remove(f) for f in glob.glob('%s/*cpp' % NAME)]
with open(path.join(path.dirname(__file__), 'README.md'), encoding='utf-8') as f:
readme = f.read()
setup(
packages=[NAME],
name=NAME,
version=VERSION,
description='Python binding of Darts Clone',
author='@rixwew',
author_email='[email protected]',
url='https://github.com/rixwew/darts-clone-python',
setup_requires=[
'cython>=0.28',
],
ext_modules=EXTENSIONS,
zip_safe=False,
long_description=readme,
long_description_content_type='text/markdown',
classifiers=[
'License :: OSI Approved :: Apache Software License',
'Programming Language :: Cython',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 3',
'Topic :: Text Processing :: Linguistic'
],
install_requires=['Cython']
)