-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
31 lines (31 loc) · 1.21 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
from setuptools import setup
##from distutils.core import setup
import pip, sys
setup(
name = 'chachet',
packages = ['chachet'], # this must be the same as the name above
version = '0.1.17',
description = 'A web scraper that adapts to any web page structure, and design.',
author = 'Calder White',
author_email = 'calderwhite1@gmail.com',
url = 'https://github.com/team-chachet/jamhacks', # use the URL to the github repo
download_url = 'https://github.com/team-chachet/jamhacks/archive/master.zip', # I'll explain this in a second
keywords = [], # arbitrary keywords
classifiers = [],
include_package_data=True
)
if "install" in sys.argv or "build" in sys.argv or "develop" in sys.argv:
print("Checking dependancies")
#Yes, I know this isn't the best way to do this, but it works.
dep = ["nltk","bs4"]
nltkDep = ["brown","averaged_perceptron_tagger","stopwords","punkt"]
for i in dep:
r = pip.main(["install",i])
# if the package is already installed, attempt to update it.
if r:
r = pip.main(["install",i,"--upgrade"])
# some custom stuff for nltk
import nltk
print("Grabbing required nltk packages")
for i in nltkDep:
nltk.download(i)