diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2021-09-16 22:05:01 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2021-09-16 22:05:01 +0100 |
commit | cc4618c9ba3d974948ebf340b542d8cb01db2f55 (patch) | |
tree | 125ee67bb9e0d548771cf7b61d04bb1f0dc57687 /dev-python/mecab-python | |
parent | 677b7ba5c317778df2ad7e70df94b9b7eec4adbc (diff) |
gentoo resync : 16.09.2021
Diffstat (limited to 'dev-python/mecab-python')
-rw-r--r-- | dev-python/mecab-python/Manifest | 6 | ||||
-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 | ||||
-rw-r--r-- | dev-python/mecab-python/metadata.xml | 2 |
4 files changed, 77 insertions, 11 deletions
diff --git a/dev-python/mecab-python/Manifest b/dev-python/mecab-python/Manifest index cf190eb4a064..eb65173b3d74 100644 --- a/dev-python/mecab-python/Manifest +++ b/dev-python/mecab-python/Manifest @@ -1,4 +1,4 @@ -AUX mecab-python-python3.patch 253 BLAKE2B 979ef7ea020bfb405faa366a2b87a42d5c5e03e6b49b04ffc4ac0586e4e09912e6afe333072a47d676c4c3e7829ae336e61c402da280b6fffca80fc89323c00f SHA512 7937766e44c014149c64a3ad4226110f83868df330e5c0b22b65ce4624d3e6b710db972e18d446e535a76e0b0c763b2245d50280567e1ceebed15bd20c351695 +AUX mecab-python-python3.patch 1935 BLAKE2B 5cae0260ef9bfcebd1ff059c5224b60899d27d00ef2da60ba4cc57b6771738c9ed1f0454a36ce89cdd0c16a1fd3010808ca16a8d6a8eb9189b65da913fc7a478 SHA512 b4612c88d3755fdfd18254efbccff313b1b750aea0cf6a31393ccc4479580628fec66da871d5cc630379e13ef74e1fe0c49e73bccd6db377c2ea722ee086d143 DIST mecab-python-0.996.tar.gz 62338 BLAKE2B d2f8749bf4ea0b30b9f7ee68a4210a3af600803296197f48091d1c9fe90f5baaff3eb94ecb3aa04d994771512c1ef5b68a62e0a045da95992bffd1710725e832 SHA512 08954ed801419fd7f65d055244227364bc37b063f8d21babb6ceeb02ca40e0146fa4401d1426255f3656ac1a5e51439bde981414613153dca5972f624289447e -EBUILD mecab-python-0.996.ebuild 608 BLAKE2B f14d12adaf6cf92f1dcb5fa61e9e60e5ed6f02833abe01d24491a2f77ed8bdb57d6f48ff4b494ad68846ec8a346d5b348996c58035ccff3a4f23c750ac383958 SHA512 aac49d3e2fdac945e4bbcd09ff970df19ec0b43ee699bc41045a7af1e03a8afd7776e48968c7c25cb79444a291db58930ddb7344c230bbe43e67be9f26d2c933 -MISC metadata.xml 462 BLAKE2B 1341dd7d469fcbb4e817571363e5a7dfd6c2be1732512e034c485af4f0e7f1afca98762fdb940c65e29bffa5ce3bb33f385bb5b5a42ccbb37975b7a96ca5121c SHA512 8ca5e0936fd23b1e2aed226d570e90d0b9004ab2b21fe360dabfc8ee39a50d868ad7ac848cb824f5df91c281b3e67cc8f42d5c2d8a285585d6fa49c9790a847c +EBUILD mecab-python-0.996.ebuild 708 BLAKE2B 9fe608ed7d4050a63de9e1f16cc10a79aa03143eb77c3ba32e7e003a69e6af754673b08d2afb7521574423f6b3798636740b313d3b343abf79dd1a88e5ca680c SHA512 7d077de11bf4307b64a644757293dc2ba064728226104890b5f2b5b3ab76bd4aa806dc5a8821d51729ed47106905eb028a16912665b9ef0197107037b5c97c61 +MISC metadata.xml 463 BLAKE2B 8ca58f73d76674f74b0ac942279515c58b6da3ca6bd2b876916d03660e04358d65ad2e31f7ab0e812b66de2f379c977482c89bd2acc3c0ee63ef693e894a3430 SHA512 3397bc6c050faf0633b320f39ed8bd9c4f242117e72436851f2f301cb1e042672c49c9ea17c27d88b282c233ce69ac671e7671a61e993ae3817199ba6b048c68 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 e9ff194d7f77..7dc9d9c84bf3 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_{7,8} ) +EAPI=7 +PYTHON_COMPAT=( python3_{8..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}" +} diff --git a/dev-python/mecab-python/metadata.xml b/dev-python/mecab-python/metadata.xml index 0f7251470f3a..4774a1c1506b 100644 --- a/dev-python/mecab-python/metadata.xml +++ b/dev-python/mecab-python/metadata.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> <pkgmetadata> <maintainer type="project"> <email>cjk@gentoo.org</email> |