forked from sloria/TextBlob
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Working with Pytnon 3.3 using nltk3.0a
- Loading branch information
Showing
5 changed files
with
30 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
language: python | ||
python: | ||
- "2.7" | ||
- "3.3" | ||
# Install dependencies | ||
install: | ||
- "pip install -U . --use-mirrors" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,7 @@ | |
import os | ||
|
||
import text | ||
from distutils.util import convert_path | ||
|
||
try: | ||
from setuptools import setup | ||
|
@@ -32,6 +33,31 @@ | |
sys.exit() | ||
|
||
|
||
def find_packages(where='.', exclude=()): | ||
"""Return a list all Python packages found within directory 'where' | ||
'where' should be supplied as a "cross-platform" (i.e. URL-style) path; it | ||
will be converted to the appropriate local path syntax. 'exclude' is a | ||
sequence of package names to exclude; '*' can be used as a wildcard in the | ||
names, such that 'foo.*' will exclude all subpackages of 'foo' (but not | ||
'foo' itself). | ||
""" | ||
out = [] | ||
stack = [(convert_path(where), '')] | ||
while stack: | ||
where, prefix = stack.pop(0) | ||
for name in os.listdir(where): | ||
fn = os.path.join(where, name) | ||
if ('.' not in name and os.path.isdir(fn) and | ||
os.path.isfile(os.path.join(fn, '__init__.py'))): | ||
out.append(prefix+name) | ||
stack.append((fn, prefix + name + '.')) | ||
for pat in list(exclude)+['ez_setup', 'distribute_setup']: | ||
from fnmatch import fnmatchcase | ||
out = [item for item in out if not fnmatchcase(item, pat)] | ||
return out | ||
|
||
|
||
def cheeseshopify(rst): | ||
'''Since PyPI doesn't support the `code-block` or directive, this replaces | ||
all `code-block` directives with `::`. | ||
|
@@ -52,10 +78,7 @@ def cheeseshopify(rst): | |
author_email='[email protected]', | ||
url='https://github.com/sloria/TextBlob', | ||
install_requires=['PyYAML'], | ||
packages=[ | ||
'text', | ||
'nltk' | ||
], | ||
packages=find_packages(), | ||
package_data={ | ||
"text": ["*.txt", "*.xml"], | ||
}, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,7 +17,6 @@ | |
from .mixins import ComparableMixin | ||
|
||
|
||
|
||
class WordList(list): | ||
|
||
'''A list-like collection of words.''' | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,3 +15,4 @@ | |
basestring = str | ||
else: | ||
unicode = unicode | ||
|