Summary: | dev-python/empy - ebuild enhancements | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | René 'Necoro' Neumann <gentoo> |
Component: | Current packages | Assignee: | Python Gentoo Team <python> |
Status: | RESOLVED FIXED | ||
Severity: | trivial | ||
Priority: | High | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | |||
Bug Blocks: | 232575 | ||
Attachments: |
empy-3.3.ebuild.diff #1
empy-3.3.ebuild.diff #2 |
Description
René 'Necoro' Neumann
2008-07-21 20:54:53 UTC
Created attachment 161038 [details, diff] empy-3.3.ebuild.diff #1 This is the first variant: It directly installs the em.py into /usr/bin instead of messing around with distutils and linking. This also removes the necessity of having to deal with the issues in comment #0. Disadvantage: Can't be imported as a module anymore. Though I don't know if this is wanted at all. Created attachment 161042 [details, diff] empy-3.3.ebuild.diff #2 And this is the second approach: It handles everything the same way as the original ebuild, but fixes the issues mentioned in comment #0. Thanks for the patches, Rene. I went with your second way, but by setting PYTHON_MODNAME="em.py" I could remove the python_mod_{optimize,cleanup} bits. The eclass tries to find the module from PN, but if it can't, we can manually set it with PYTHON_MODNAME. Also, I added a src_test() and a doc USE flag. Added to CVS. The PYTHON_MODNAME is not going to work with pkg_postrm ... (it's not like I haven't thought about it before worked on this ebuild ;))... If you look in distutils.eclass -- it will do: for pymod in ${PYTHON_MODNAME}; do for moddir in "`ls -d --color=none -1 ${ROOT}usr/$(get_libdir)/python*/site-packages/${pymod} 2> /dev/null`"; do python_mod_cleanup ${moddir} done done The ls-command will return the file ($SITEDIR/em.py), which is passed to python_mod_cleanup. python_mod_cleanup will do: for obj in $(find ${path} -name '*.py[co]'); do cleanup; done But as $path is a file here - this find-command will return nothing. And thus the files aren't cleaned correctly. (I don't know if this is a big issue - but it exists ;)) Nevermind ... I used your approach --- and it worked. So - obviously I missed something (perhaps some bash magic in the eclasses) |