forked from quadrismegistus/prosodic
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
79 lines (63 loc) · 2.09 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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
import os,sys
from setuptools import setup
from setuptools.command.install import install
from setuptools.command.develop import develop
from distutils.dir_util import copy_tree
from os.path import expanduser
_here = os.path.abspath(os.path.dirname(__file__))
#dir_mtree = os.path.join(_here,'metricaltree')
home = expanduser("~")
default_dir_prosodic_home=os.path.join(home,'prosodic_data')
path_prosodic_home_dir_var = os.path.join(home,'.path_prosodic_data')
import sys,os,imp
path_to_tools = os.path.join(_here,'prosodic','lib','tools.py')
tools = imp.load_source('tools',path_to_tools)
class PostDevelopCommand(develop):
"""Post-installation for development mode."""
def run(self):
tools.configure_home_dir(force=True)
develop.run(self)
class PostInstallCommand(install):
"""Post-installation for installation mode."""
def run(self):
tools.configure_home_dir(force=True)
install.do_egg_install(self)
if __name__ == '__main__':
with open("README.md", "r", encoding="utf8") as fh:
long_description = fh.read()
with open("requirements.txt", "r") as fh:
requirements = [x.strip() for x in fh.read().split('\n') if x.strip()]
setup(
name='prosodic',
version='1.5.0',
description=('PROSODIC: a metrical-phonological parser, written in Python. For English and Finnish, with flexible language support.'),
long_description=long_description,
long_description_content_type="text/markdown",
author='Ryan Heuser',
author_email='[email protected]',
url='https://github.com/quadrismegistus/prosodic',
license='MPL-2.0',
packages=['prosodic','metricaltree'],
install_requires=requirements,
include_package_data=True,
cmdclass={
'develop': PostDevelopCommand,
'install': PostInstallCommand,
},
# scripts=['bin/prosodic'],
entry_points = {
'console_scripts': [
'prosodic=prosodic.prosodic:start_interactive_mode'
]
},
classifiers=[
#'Development Status :: 3 - Alpha',
#'Intended Audience :: Science/Research',
#'Programming Language :: Python :: 2.7',
#'Programming Language :: Python :: 3.6'
],
)
#
# nltk==3.4
# numpy==1.15.4
# Pyphen==0.9.5