This repository was archived by the owner on Jun 27, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathsetup.py
More file actions
43 lines (38 loc) · 1.31 KB
/
setup.py
File metadata and controls
43 lines (38 loc) · 1.31 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
from setuptools import setup
from setuptools.command.install import install
import subprocess
from os.path import join, dirname, isfile
import sys
import time
class CompileParser(install):
def run(self):
install.run(self)
sys.path.reverse()
import stanford_parser
pwd = stanford_parser.__path__[0]
subprocess.Popen(['wget', 'https://github.com/banyh/StanfordParserServer/archive/PyStanfordParser.zip'], cwd=pwd)
while not isfile(join(pwd, 'PyStanfordParser.zip')):
time.sleep(0.1)
subprocess.Popen(['unzip', '-o', '-j', 'PyStanfordParser.zip'], cwd=pwd)
while not isfile(join(pwd, 'install.sh')):
time.sleep(0.1)
subprocess.Popen(['./install.sh'], cwd=pwd, shell=True)
setup(name='PyStanfordParser',
version='0.2.0',
description='Wrapping Stanford parser as a python package',
url='https://github.com/banyh/PyStanfordParser',
author='Ping Chu Hung',
author_email='[email protected]',
license='MIT',
packages=['stanford_parser'],
zip_safe=False,
install_requires=[
'numpy',
'jpype1',
],
cmdclass={
'install': CompileParser,
},
test_suite='nose.collector',
tests_require=['nose'],
include_package_data=True,)