[Python-modules-team] Bug#719466: python-mecab: Please support python3 :-)

Osamu Aoki osamu at debian.org
Mon Aug 12 07:16:28 UTC 2013


Package: python-mecab
Version: 0.99.3-1
Severity: normal

The source of python-mecab is generated by swig (version from 2009) in
the subdirectory of swig in mecab package.

Since upstrean manually copy such previosly generated file to make a
release tar of this package, it is not updated with recent python
changes.

I have reported this to upstream.
  https://code.google.com/p/mecab/issues/detail?id=7

Please note setup.py needs to be patched.

In the mean time, you can update package via patch :-)

Oh, when you do this, please remove debian/pycompat and add XB-...
following https://wiki.debian.org/Python/Packaging

See #538978 and #597105 bugs for how to work around python3.

Attached patch is quick and dirty package I made and working here
(except some dependency entries are not properly generated to be good
enough for upload.  Please fix them before upload.)

FYI:  Here is MeCab working under python3.
      Yes, it is much easier to use interactively under UTF-8!
      No more UTF-8 string encoded into ascii.
$ python3
Python 3.3.2+ (default, Aug  4 2013, 15:50:24) 
[GCC 4.8.1] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys, MeCab
>>> m = MeCab.Tagger ("-Ochasen")
>>> m.parse ("今日もしないとね")
'今日\tキョウ\t今日\t名詞-副詞可能\t\t\nも\tモ\tも\t助詞-係助詞\t\t\nし\tシ\tする\t動詞-自立\tサ変・スル\t未然形\nない\tナイ\tない\t助動詞\t特殊・ナイ\t基本形\nと\tト\tと\t助詞-接続助詞\t\t\nね\tネ\tね\t助詞-終助詞\t\t\nEOS\n'
>>> print(m.parse ("今日もしないとね"))
今日    キョウ  今日    名詞-副詞可能           
も      モ      も      助詞-係助詞             
し      シ      する    動詞-自立       サ変・スル      未然形
ない    ナイ    ない    助動詞  特殊・ナイ      基本形
と      ト      と      助詞-接続助詞           
ね      ネ      ね      助詞-終助詞             
EOS
----------------


-- System Information:
Debian Release: jessie/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'testing'), (500, 'stable'), (100, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.2.0-4-rt-amd64 (SMP w/8 CPU cores; PREEMPT)
Locale: LANG=en_US.utf8, LC_CTYPE=en_US.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages python-mecab depends on:
ii  libc6       2.17-92
ii  libgcc1     1:4.8.1-8
ii  libmecab2   0.99.3-3
ii  libstdc++6  4.8.1-8
ii  python      2.7.5-3

Versions of packages python-mecab recommends:
ii  mecab-ipadic    2.7.0-20070801+main-1
ii  mecab-jumandic  5.1+20070304-3

python-mecab suggests no packages.

-- no debconf information
-------------- next part --------------
A non-text attachment was scrubbed...
Name: python-mecab.patch
Type: text/x-diff
Size: 66740 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/python-modules-team/attachments/20130812/a7b90c5e/attachment-0001.patch>


More information about the Python-modules-team mailing list