-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
44 lines (40 loc) · 1.63 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
try:
from setuptools import setup, find_packages, Extension
except ImportError:
from ez_setup import use_setuptools
use_setuptools()
from setuptools import setup, find_packages, Extension
from distutils.command.install import INSTALL_SCHEMES
for scheme in INSTALL_SCHEMES.values():
scheme['data'] = scheme['purelib']
import os
import platform
if platform.platform().startswith('Darwin'):
if '64bit' in platform.platform():
os.environ['ARCHFLAGS'] = "-arch x86_64"
libraries = ['boost_python-mt', 'boost_filesystem-mt', 'boost_thread-mt', 'boost_regex-mt', 'boost_system-mt', 'icuio', 'icuuc']
else:
libraries=['boost_python', 'boost_filesystem', 'boost_thread', 'boost_regex', 'boost_system', 'icuio']
setup(
name='pfp',
version='0.0.5',
description='pretty fast statistical parser for natural languages',
author='Wavii',
author_email='[email protected]',
url='https://github.com/wavii/pfp',
packages=find_packages(exclude=['ez_setup', 'tests*', 'integration*']),
include_package_data=True,
zip_safe=False,
ext_modules=[
Extension('pfp',
['src/pfp/config.cpp',
'src/pfp/tokenizer.yy.cpp',
'src/pypfp/pypfp.cpp'],
include_dirs=['include'],
libraries=libraries,
extra_compile_args=['-g']
),
],
data_files=[('share', ['share/pfp/americanizations', 'share/pfp/binary_rules', 'share/pfp/sigs', 'share/pfp/sig_state',
'share/pfp/states', 'share/pfp/unary_rules', 'share/pfp/words', 'share/pfp/word_state'])]
)