From 11cfbcc0f23eb65edf588cdd558254c3cafd92aa Mon Sep 17 00:00:00 2001 From: isnowfy Date: Mon, 9 Dec 2013 19:22:11 +0800 Subject: [PATCH] python3 --- MANIFEST.in | 2 +- README.md | 1 + setup.py | 16 +++++++++------- 3 files changed, 11 insertions(+), 8 deletions(-) diff --git a/MANIFEST.in b/MANIFEST.in index e098ce9..3f00795 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,2 +1,2 @@ include *.md -recursive-include snownlp *.txt *.marshal +recursive-include snownlp *.txt *.marshal *.marshal.3 diff --git a/README.md b/README.md index 81ad23a..35b912c 100644 --- a/README.md +++ b/README.md @@ -67,6 +67,7 @@ s.sim([u'文章'])# [0.3756070762985226, 0, 0] * tf,idf * Tokenization(分割成句子) * 文本相似([BM25](http://en.wikipedia.org/wiki/Okapi_BM25)) +* 支持python3(感谢[erning](https://github.com/erning)) ## Get It now diff --git a/setup.py b/setup.py index ead7da7..d6fc594 100644 --- a/setup.py +++ b/setup.py @@ -1,3 +1,4 @@ +import os import sys import subprocess @@ -10,11 +11,11 @@ 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). + '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), '')] @@ -36,6 +37,7 @@ def _find_packages(where='.', exclude=()): status = subprocess.call(PUBLISH_CMD, shell=True) sys.exit(status) + def read(fname): with open(fname) as fp: content = fp.read() @@ -43,7 +45,7 @@ def read(fname): setup( name='snownlp', - version='0.9', + version='0.9.3', description='Python library for processing Chinese text', author='isnowfy', url='https://github.com/isnowfy/snownlp', @@ -55,6 +57,6 @@ def read(fname): 'Programming Language :: Python', ], - package_data={'': ['*.md', '*.txt', '*.marshal']}, + package_data={'': ['*.md', '*.txt', '*.marshal', '*.marshal.3']}, include_package_data=True, )