-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsetup.py
62 lines (52 loc) · 2.15 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
# Copyright (C) 2013 Wesley Baugh
from distutils import log
from setuptools import setup, find_packages
from setuptools.command.install import install
PROGRAM_NAME = 'infertweet'
VERSION = '0.3'
DESCRIPTION = ('Infer information from Tweets. Useful for human-centered '
'computing tasks, such as sentiment analysis, location '
'prediction, authorship profiling and more!')
with open('requirements.txt') as f:
REQUIREMENTS = f.read()
with open('dependency_links.txt') as f:
DEPENDENCY_LINKS = [x.strip() for x in f]
with open('README.md') as f:
LONG_DESCRIPTION = f.read()
NLTK_DEPENDENCIES = [] # None yet.
class InstallWithPostCommand(install):
def run(self):
install.run(self)
log.info('running post install function')
post_install()
def post_install():
import nltk
for resource in NLTK_DEPENDENCIES:
if not nltk.download(resource):
log.error('ERROR: Could not download required NLTK resource: '
'{0}'.format(resource))
setup(
name=PROGRAM_NAME,
version=VERSION,
packages=find_packages(),
install_requires=REQUIREMENTS,
dependency_links=DEPENDENCY_LINKS,
cmdclass={'install': InstallWithPostCommand},
author="Wesley Baugh",
author_email="[email protected]",
url="http://www.github.com/bwbaugh/{0}".format(PROGRAM_NAME),
description=DESCRIPTION,
long_description=LONG_DESCRIPTION,
license='Creative Commons Attribution-NonCommercial-ShareAlike 3.0 '
'Unported License',
classifiers=["Intended Audience :: Developers",
"Intended Audience :: Science/Research",
"Natural Language :: English",
"Programming Language :: Python",
"Programming Language :: Python :: 2.7",
"Programming Language :: Python :: Implementation :: PyPy",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
"Topic :: Scientific/Engineering :: Information Analysis",
"Topic :: Software Development :: Libraries :: Python Modules",
"Topic :: Text Processing :: Linguistic"],
)