-
Notifications
You must be signed in to change notification settings - Fork 206
/
Copy pathsetup.py
41 lines (32 loc) · 1.17 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
# coding: utf-8
import os
from setuptools.command.install import install
from setuptools import setup
with open('README.rst') as f:
LONG_DESCRIPTION = f.read()
class MakeCommand(install):
def run(self):
os.system('make')
common_dir = 'tgrocery/learner'
target_dir = '%s/%s' % (self.build_lib, common_dir)
self.mkpath(target_dir)
os.system('cp %s/util.so.1 %s' % (common_dir, target_dir))
common_dir = 'tgrocery/learner/liblinear'
target_dir = '%s/%s' % (self.build_lib, common_dir)
self.mkpath(target_dir)
os.system('cp %s/liblinear.so.1 %s' % (common_dir, target_dir))
install.run(self)
setup(
name='tgrocery',
version='0.1.3',
packages=['tgrocery', 'tgrocery.learner', 'tgrocery.learner.liblinear.python'],
url='https://github.com/2shou/TextGrocery',
license='BSD',
author='2shou',
author_email='gavin.zgz@gmail.com',
description='A simple short-text classification tool based on LibLinear',
long_description=LONG_DESCRIPTION,
install_requires=['jieba'],
keywords='text classification svm liblinear libshorttext',
cmdclass={'install': MakeCommand}
)