Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 506722 - dev-python/cangjie-1.1 - The Python bindings to libcangjie
Summary: dev-python/cangjie-1.1 - The Python bindings to libcangjie
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: Normal enhancement (vote)
Assignee: CJK Team
URL: https://github.com/Cangjians/ibus-can...
Whiteboard:
Keywords: EBUILD
Depends on:
Blocks: 506718
  Show dependency tree
 
Reported: 2014-04-04 02:15 UTC by Brendan Horan
Modified: 2014-04-16 02:00 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
cangjie-1.1-r0.ebuild (cangjie-1.1-r0.ebuild,545 bytes, text/plain)
2014-04-04 02:16 UTC, Brendan Horan
Details
cangjie-1.1-r0.ebuild (cangjie-1.1-r0.ebuild,526 bytes, text/plain)
2014-04-04 08:40 UTC, Brendan Horan
Details
cangjie-1.1.ebuild (cangjie-1.1.ebuild,431 bytes, text/plain)
2014-04-05 06:38 UTC, Brendan Horan
Details
cangjie-1.1.ebuild (cangjie-1.1.ebuild,414 bytes, text/plain)
2014-04-06 07:53 UTC, Brendan Horan
Details
cangjie-1.1.ebuild (cangjie-1.1.ebuild,461 bytes, text/plain)
2014-04-07 01:25 UTC, Brendan Horan
Details
cangjie-1.1.ebuild (cangjie-1.1.ebuild,492 bytes, text/plain)
2014-04-08 05:15 UTC, Brendan Horan
Details
cangjie-1.1.ebuild (cangjie-1.1.ebuild,476 bytes, text/plain)
2014-04-09 12:51 UTC, Brendan Horan
Details
cangjie-1.1.ebuild (cangjie-1.1.ebuild,722 bytes, text/plain)
2014-04-15 09:14 UTC, Brendan Horan
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Brendan Horan 2014-04-04 02:15:59 UTC
Hi,

Please find attached the first cangjie-1.1-r0.ebuild.

This is an IBus engine for users of the Cangjie and Quick input methods.
It is primarily intended to Hong Kong people who want to input Traditional Chinese, as they are (by far) the majority of Cangjie and Quick users.
However, it should work for others as well (e.g to input Simplified Chinese).
Note that the actual input logic is handled by libcangjie.

I am suggesting "dev-python/cangjie"
Comment 1 Brendan Horan 2014-04-04 02:16:37 UTC
Created attachment 374220 [details]
cangjie-1.1-r0.ebuild
Comment 2 Brendan Horan 2014-04-04 08:40:57 UTC
Created attachment 374232 [details]
cangjie-1.1-r0.ebuild

updated ebuild to pass repoman checks.
Comment 3 Jeroen Roovers (RETIRED) gentoo-dev 2014-04-05 00:36:51 UTC
Comment on attachment 374232 [details]
cangjie-1.1-r0.ebuild

Shouldn't:

>		sys-devel/gcc"

Defaults:

>src_configure() {
>		econf
>}
>
>src_install() {
>		emake DESTDIR="${D}" install
>}

Also, -r0 is implicit - no need to add it.
Comment 4 Brendan Horan 2014-04-05 06:38:49 UTC
Created attachment 374276 [details]
cangjie-1.1.ebuild

Removed system GCC dependency.
Removed defaults sections.
Attached new ebuild.
Repoman passed
Comment 5 Brendan Horan 2014-04-05 06:41:44 UTC
Also update the title, this is a python package.
Comment 6 Brendan Horan 2014-04-05 06:49:54 UTC
I am also able to maintain this package.
Comment 7 Brendan Horan 2014-04-06 07:53:10 UTC
Created attachment 374360 [details]
cangjie-1.1.ebuild

Fixed Licence.
Fixed homepage.
Fixed licence.
Added new ebuild.
Comment 8 Brendan Horan 2014-04-07 01:25:02 UTC
Created attachment 374438 [details]
cangjie-1.1.ebuild

Added RDEPEND to ebuild.
Comment 9 Brendan Horan 2014-04-07 01:27:12 UTC
I have checked this via repoman, equery and a full emerge of the package.
Will email proxy maintainers as well.
Comment 10 Naohiro Aota gentoo-dev 2014-04-08 00:36:07 UTC
First of all, it's named "dev-python/cangjie" but the github repo is "Cangjians/pycangjie".

You have "PYTHON_DEPEND" in the ebuild, but no inherit from python.eclass. Any way please use python-r1 for fresh ebuild.
http://wiki.gentoo.org/wiki/Python-r1

trivial: DESCRIPTION is different from one on github  https://github.com/Cangjians/pycangjie Is there some reason for it?
Comment 11 Brendan Horan 2014-04-08 05:14:12 UTC
In Reply to :

First of all, it's named "dev-python/cangjie" but the github repo is "Cangjians/pycangjie".

trivial: DESCRIPTION is different from one on github  https://github.com/Cangjians/pycangjie Is there some reason for it?

This was done because release tarball found at :
http://cangjians.github.io/downloads/pycangjie/
Is named "cangjie-X.X.tar.xz and not "pycangjie-X.X.tar.xz
So I named the ebuild after the file it needs to download.

If this is not correct, please advise best way.
Comment 12 Brendan Horan 2014-04-08 05:15:58 UTC
Created attachment 374514 [details]
cangjie-1.1.ebuild

In reply to :
You have "PYTHON_DEPEND" in the ebuild, but no inherit from python.eclass. Any way please use python-r1 for fresh ebuild.
http://wiki.gentoo.org/wiki/Python-r1

I have uploaded anew ebuild using the "python-r1 syntax and options.
Thanks for the information.
Comment 13 Brendan Horan 2014-04-08 14:18:30 UTC
Also the "DESCRIPTION" line was taken from the official home page :
http://cangjians.github.io/
Comment 14 Tom Wijsman (TomWij) (RETIRED) gentoo-dev 2014-04-09 10:36:49 UTC
Is the dev-db/sqlite dependency necessary? Might be due to copy/paste from other. app-i18n/libcangjie could be refactred to a common variable like COMMON_DEPEND (or as a shorter version CDEPEND); other than those two things, looks good to me.
Comment 15 Brendan Horan 2014-04-09 12:51:48 UTC
Created attachment 374598 [details]
cangjie-1.1.ebuild

In reply to :
Is the dev-db/sqlite dependency necessary? Might be due to copy/paste from other. app-i18n/libcangjie could be refactred to a common variable like COMMON_DEPEND (or as a shorter version CDEPEND); other than those two things, looks good to me.

Sorry that was a copy and paste error. This package has no dependency on "dev-db/sqlite"
I have attached a new ebuild.
Comment 16 Yixun Lan archtester gentoo-dev 2014-04-09 21:25:52 UTC
(In reply to Tom Wijsman (TomWij) from comment #14)
> Is the dev-db/sqlite dependency necessary? Might be due to copy/paste from
> other. app-i18n/libcangjie could be refactred to a common variable like
> COMMON_DEPEND (or as a shorter version CDEPEND); other than those two
> things, looks good to me.
COMMON_DEPEND would be good. Do *not* use CDEPEND, this variable may be preserved for future EAPI.. (this is not a policy?! but kind of a convention)
Comment 17 Brendan Horan 2014-04-11 05:38:45 UTC
(In reply to Yixun Lan from comment #16)
> (In reply to Tom Wijsman (TomWij) from comment #14)
> > Is the dev-db/sqlite dependency necessary? Might be due to copy/paste from
> > other. app-i18n/libcangjie could be refactred to a common variable like
> > COMMON_DEPEND (or as a shorter version CDEPEND); other than those two
> > things, looks good to me.
> COMMON_DEPEND would be good. Do *not* use CDEPEND, this variable may be
> preserved for future EAPI.. (this is not a policy?! but kind of a convention)

No need for for COMMON_DEPEND.
Dependency was removed. However thanks for the information :)
Comment 18 Naohiro Aota gentoo-dev 2014-04-12 23:44:10 UTC
The ebuild inherit and have PYTHON_COMPAT, but it's not using it properly. e.g. 

$ eix dev-python/cangjie
[I] dev-python/cangjie [1]
     Available versions:  (~)1.1 {PYTHON_TARGETS="python3_2 python3_3"}
     Installed versions:  1.1(02:55:50 PM 04/12/2014)(PYTHON_TARGETS="python3_2 python3_3")
     Homepage:            http://cangjians.github.io
     Description:         The Python bindings to libcangjie

This dev-python/cangjie is built with PYTHON_TARGETS="python3_2 python3_3"

but

$ qlist dev-python/cangjie
/usr/lib64/python3.2/site-packages/cangjie/__init__.py
/usr/lib64/python3.2/site-packages/cangjie/__pycache__/__init__.cpython-32.pyc
/usr/lib64/python3.2/site-packages/cangjie/__pycache__/__init__.cpython-32.pyo
/usr/lib64/python3.2/site-packages/cangjie/versions.la
/usr/lib64/python3.2/site-packages/cangjie/filters.la
/usr/lib64/python3.2/site-packages/cangjie/errors.la
/usr/lib64/python3.2/site-packages/cangjie/_core.la
/usr/lib64/python3.2/site-packages/cangjie/filters.so
/usr/lib64/python3.2/site-packages/cangjie/versions.so
/usr/lib64/python3.2/site-packages/cangjie/errors.so
/usr/lib64/python3.2/site-packages/cangjie/_core.so
/usr/share/doc/cangjie-1.1/AUTHORS.bz2
/usr/share/doc/cangjie-1.1/README.md.bz2

It's just install python3.2 variants.
Comment 19 Brendan Horan 2014-04-15 01:06:34 UTC
(In reply to Naohiro Aota from comment #18)

I don't see that?


--- Current python versions :
# eselect python list
Available Python interpreters:
  [1]   python2.7
  [2]   python3.3 *


--- Eix of the ebuild showing python 3.2 and 3.3 :
# eix dev-python/cangjie
[D] dev-python/cangjie [1]
     Available versions:  ~1.1 {PYTHON_TARGETS="python3_2 python3_3"}
     Installed versions:  1.1[?](01:13:45 PM 04/08/2014)(PYTHON_TARGETS="python3_3 -python3_2")
     Homepage:            http://cangjians.github.io
     Description:         The Python bindings to libcangjie

[1] /usr/local/portage


--- Qlist of the files installed :
# qlist dev-python/cangjie
/usr/share/doc/cangjie-1.1/AUTHORS.bz2
/usr/share/doc/cangjie-1.1/README.md.bz2
/usr/lib64/python3.3/site-packages/cangjie/_core.la
/usr/lib64/python3.3/site-packages/cangjie/versions.la
/usr/lib64/python3.3/site-packages/cangjie/filters.la
/usr/lib64/python3.3/site-packages/cangjie/__pycache__/__init__.cpython-33.pyo
/usr/lib64/python3.3/site-packages/cangjie/__pycache__/__init__.cpython-33.pyc
/usr/lib64/python3.3/site-packages/cangjie/versions.so
/usr/lib64/python3.3/site-packages/cangjie/errors.so
/usr/lib64/python3.3/site-packages/cangjie/filters.so
/usr/lib64/python3.3/site-packages/cangjie/__init__.py
/usr/lib64/python3.3/site-packages/cangjie/_core.so
/usr/lib64/python3.3/site-packages/cangjie/errors.la


I may be missing something hear, but from my understanding I am using python 3.3 and the package gets installed into 3.3?

Happy to fix what needs to be fixed, but I just simply don't know what the issue is.
Comment 20 Brendan Horan 2014-04-15 01:10:15 UTC
Package also works with python3.2. So I assume if someone has 3.2 it will get installed into 3.2.
Comment 21 Naohiro Aota gentoo-dev 2014-04-15 02:46:58 UTC
(In reply to Brendan Horan from comment #19)
> (In reply to Naohiro Aota from comment #18)
> 
> I don't see that?
> I may be missing something hear, but from my understanding I am using python
> 3.3 and the package gets installed into 3.3?
>
> ...
> 
> Happy to fix what needs to be fixed, but I just simply don't know what the
> issue is.

That difference is the problem. If you have PYTHON_TARGETS="python3_2 python3_3", then it should install both variants 3.2 and 3.3. Try PYTHON_TARGETS="python3_2 python3_3" emerge dev-python/cangjie . Is the ebuild pulling dev-lang/python:3.2? If not, it fails to pull proper dependency. 

Please read this page carefully: http://wiki.gentoo.org/wiki/Project:Python/python-r1
Comment 22 Brendan Horan 2014-04-15 08:53:09 UTC
(In reply to Naohiro Aota from comment #21)
> (In reply to Brendan Horan from comment #19)
> > (In reply to Naohiro Aota from comment #18)
> > 
> > I don't see that?
> > I may be missing something hear, but from my understanding I am using python
> > 3.3 and the package gets installed into 3.3?
> >
> > ...
> > 
> > Happy to fix what needs to be fixed, but I just simply don't know what the
> > issue is.
> 
> That difference is the problem. If you have PYTHON_TARGETS="python3_2
> python3_3", then it should install both variants 3.2 and 3.3. Try
> PYTHON_TARGETS="python3_2 python3_3" emerge dev-python/cangjie . Is the
> ebuild pulling dev-lang/python:3.2? If not, it fails to pull proper
> dependency. 
> 
> Please read this page carefully:
> http://wiki.gentoo.org/wiki/Project:Python/python-r1

I have read the wiki, thank you.
However I am still not clear how I need to get my outcome.

The package works with 3.2 and 3.3
How can I get it to build for 3.2 and 3.3? 
Depending on what version of python the user has on there system.

I will keep reading and working on this in the meantime. 

Thanks for your help.
Comment 23 Brendan Horan 2014-04-15 09:11:34 UTC
I think I have it...
# PYTHON_TARGETS="python3_2 python3_3" emerge -av dev-python/cangjie
... 
snipped all
...

# qlist dev-python/cangjie
/usr/share/doc/cangjie-1.1/AUTHORS.bz2
/usr/share/doc/cangjie-1.1/README.md.bz2
/usr/lib64/python3.3/site-packages/cangjie/_core.la
/usr/lib64/python3.3/site-packages/cangjie/versions.la
/usr/lib64/python3.3/site-packages/cangjie/filters.la
/usr/lib64/python3.3/site-packages/cangjie/__pycache__/__init__.cpython-33.pyo
/usr/lib64/python3.3/site-packages/cangjie/__pycache__/__init__.cpython-33.pyc
/usr/lib64/python3.3/site-packages/cangjie/versions.so
/usr/lib64/python3.3/site-packages/cangjie/errors.so
/usr/lib64/python3.3/site-packages/cangjie/filters.so
/usr/lib64/python3.3/site-packages/cangjie/__init__.py
/usr/lib64/python3.3/site-packages/cangjie/_core.so
/usr/lib64/python3.3/site-packages/cangjie/errors.la
/usr/lib64/python3.2/site-packages/cangjie/_core.la
/usr/lib64/python3.2/site-packages/cangjie/versions.la
/usr/lib64/python3.2/site-packages/cangjie/filters.la
/usr/lib64/python3.2/site-packages/cangjie/__pycache__/__init__.cpython-32.pyc
/usr/lib64/python3.2/site-packages/cangjie/__pycache__/__init__.cpython-32.pyo
/usr/lib64/python3.2/site-packages/cangjie/versions.so
/usr/lib64/python3.2/site-packages/cangjie/errors.so
/usr/lib64/python3.2/site-packages/cangjie/filters.so
/usr/lib64/python3.2/site-packages/cangjie/__init__.py
/usr/lib64/python3.2/site-packages/cangjie/_core.so
/usr/lib64/python3.2/site-packages/cangjie/errors.la

Also python 3.2 was pulled in :
# eselect python list
Available Python interpreters:
  [1]   python2.7
  [2]   python3.2
  [3]   python3.3 *
Comment 24 Brendan Horan 2014-04-15 09:14:36 UTC
Created attachment 374962 [details]
cangjie-1.1.ebuild

Added new ebuild to address python versions.
Comment 25 Naohiro Aota gentoo-dev 2014-04-16 02:00:24 UTC
(In reply to Brendan Horan from comment #24)
> Created attachment 374962 [details]
> cangjie-1.1.ebuild
> 
> Added new ebuild to address python versions.

Great! I just picked it into tree with some tiny style fix (and also DEPEND on ${PYTHON_DEPS})