Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setup File Corrections #16

Merged
merged 2 commits into from
Aug 31, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion rnlp/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
__copyright__ = 'Copyright (c) 2017-2018 StARLinG Lab'
__license__ = 'GPL-v3'

__version__ = '0.3.1'
__version__ = '0.3.2'
__status__ = 'Beta'
__maintainer__ = 'Alexander L. Hayes (@batflyer)'
__email__ = '[email protected]'
Expand Down
41 changes: 30 additions & 11 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
"""

from setuptools import setup, find_packages
from setuptools.command.install import install as _install

from codecs import open
from os import path

Expand All @@ -12,20 +14,27 @@
with open(path.join(here, 'README.rst'), encoding='utf-8') as f:
long_description = f.read()

# rnlp needs a few additional nltk packages to function properly.
import nltk
nltk.download('punkt')
nltk.download('stopwords')
#nltk.download('wordnet')
nltk.download('averaged_perceptron_tagger')

# Import the package and assign metadata as appropriate
import rnlp
# https://stackoverflow.com/questions/26799894/installing-nltk-data-in-setup-py-script
class Install(_install):
"""
Overwriting the base class to additionally install nltk packages.
"""

def run(self):
_install.do_egg_install(self)

# Install the additional required nltk packages
import nltk
nltk.download('punkt')
nltk.download('stopwords')
nltk.download('averaged_perceptron_tagger')


setup(
name='rnlp',
version=rnlp.__version__,
license=rnlp.__license__,
version='0.3.2',
license='GPL-v3',

description='Converts text corpora into a set of relational facts.',
long_description=long_description,
Expand Down Expand Up @@ -61,5 +70,15 @@
'Tracker': 'https://github.com/starling-lab/rnlp/issues'
},

packages=find_packages(exclude=['tests'])
packages=find_packages(exclude=['tests']),

cmdclass={'install': Install},

install_requires=[
'nltk',
'tqdm',
'joblib'
],

setup_requires=['nltk']
)