diff options
| author | Liguros - Gitlab CI/CD [develop] <gitlab@liguros.net> | 2021-09-14 13:35:05 +0000 |
|---|---|---|
| committer | Liguros - Gitlab CI/CD [develop] <gitlab@liguros.net> | 2021-09-14 13:35:05 +0000 |
| commit | f91d75e12e94a0a78fe02b44ca98b02cc95c9a4c (patch) | |
| tree | d923a03bdfc6d21cfac611fb3e49b81da6a4341a /dev-python/mecab-python | |
| parent | 786b35b35d3372ebef7753edd7cc1cf922819ed0 (diff) | |
| download | baldeagleos-repo-f91d75e12e94a0a78fe02b44ca98b02cc95c9a4c.tar.gz baldeagleos-repo-f91d75e12e94a0a78fe02b44ca98b02cc95c9a4c.tar.xz baldeagleos-repo-f91d75e12e94a0a78fe02b44ca98b02cc95c9a4c.zip | |
Adding metadata
Diffstat (limited to 'dev-python/mecab-python')
| -rw-r--r-- | dev-python/mecab-python/files/mecab-python-python3.patch | 66 | ||||
| -rw-r--r-- | dev-python/mecab-python/mecab-python-0.996.ebuild | 14 |
2 files changed, 73 insertions, 7 deletions
diff --git a/dev-python/mecab-python/files/mecab-python-python3.patch b/dev-python/mecab-python/files/mecab-python-python3.patch index 33c8d97ebb2b..d8fa167fff17 100644 --- a/dev-python/mecab-python/files/mecab-python-python3.patch +++ b/dev-python/mecab-python/files/mecab-python-python3.patch @@ -2,10 +2,72 @@ +++ b/setup.py @@ -7,7 +7,7 @@ return os.popen(str).readlines()[0][:-1] - + def cmd2(str): - return string.split (cmd1(str)) + return cmd1(str).split() - + setup(name = "mecab-python", version = cmd1("mecab-config --version"), +--- a/test.py ++++ b/test.py +@@ -9,17 +9,17 @@ + + try: + +- print MeCab.VERSION ++ print(MeCab.VERSION) + + t = MeCab.Tagger (" ".join(sys.argv)) + +- print t.parse(sentence) ++ print(t.parse(sentence)) + + m = t.parseToNode(sentence) + while m: +- print m.surface, "\t", m.feature +- m = m.next +- print "EOS" ++ print(m.surface, "\t", m.feature) ++ m = m.next ++ print("EOS") + + lattice = MeCab.Lattice() + t.parse(lattice) +@@ -29,24 +29,24 @@ + b = lattice.begin_nodes(i) + e = lattice.end_nodes(i) + while b: +- print "B[%d] %s\t%s" % (i, b.surface, b.feature) ++ print("B[%d] %s\t%s" % (i, b.surface, b.feature)) + b = b.bnext + while e: +- print "E[%d] %s\t%s" % (i, e.surface, e.feature) ++ print("E[%d] %s\t%s" % (i, e.surface, e.feature)) + e = e.bnext +- print "EOS"; ++ print("EOS"); + + d = t.dictionary_info() + while d: +- print "filename: %s" % d.filename +- print "charset: %s" % d.charset +- print "size: %d" % d.size +- print "type: %d" % d.type +- print "lsize: %d" % d.lsize +- print "rsize: %d" % d.rsize +- print "version: %d" % d.version +- d = d.next ++ print("filename: %s" % d.filename) ++ print("charset: %s" % d.charset) ++ print("size: %d" % d.size) ++ print("type: %d" % d.type) ++ print("lsize: %d" % d.lsize) ++ print("rsize: %d" % d.rsize) ++ print("version: %d" % d.version) ++ d = d.next + +-except RuntimeError, e: +- print "RuntimeError:", e; ++except RuntimeError as e: ++ print("RuntimeError:", e); diff --git a/dev-python/mecab-python/mecab-python-0.996.ebuild b/dev-python/mecab-python/mecab-python-0.996.ebuild index 3f106954d352..1e92484dae6f 100644 --- a/dev-python/mecab-python/mecab-python-0.996.ebuild +++ b/dev-python/mecab-python/mecab-python-0.996.ebuild @@ -1,19 +1,19 @@ -# Copyright 1999-2020 Gentoo Authors +# Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI="7" -PYTHON_COMPAT=( python3_{6,7,8,9,10} ) +EAPI=7 +PYTHON_COMPAT=( python3_{6,7,8,9,10} ) +DISTUTILS_USE_SETUPTOOLS=no inherit distutils-r1 DESCRIPTION="Python binding for MeCab" -HOMEPAGE="http://taku910.github.io/mecab/" +HOMEPAGE="https://taku910.github.io/mecab/" SRC_URI="https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/${PN%-*}/${P}.tar.gz" LICENSE="|| ( BSD LGPL-2.1 GPL-2 )" SLOT="0" KEYWORDS="amd64 ~ia64 ppc64 x86" -IUSE="" DEPEND="~app-text/mecab-${PV}" RDEPEND="${DEPEND}" @@ -21,3 +21,7 @@ RDEPEND="${DEPEND}" PATCHES=( "${FILESDIR}"/${PN}-python3.patch ) DOCS=( AUTHORS README test.py ) HTML_DOCS=( bindings.html ) + +python_test() { + "${EPYTHON}" test.py || die "Tests failed with ${EPYTHON}" +} |
