Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 398625 - app-emulation/virt-manager-0.9.0-r1 is not byte-compiling
Summary: app-emulation/virt-manager-0.9.0-r1 is not byte-compiling
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Virtualization Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-01-12 08:17 UTC by Justin Lecher (RETIRED)
Modified: 2012-01-20 09:33 UTC (History)
2 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Justin Lecher (RETIRED) gentoo-dev 2012-01-12 08:17:21 UTC
Please byte-compile you .py files.
Comment 1 Justin Lecher (RETIRED) gentoo-dev 2012-01-12 08:19:07 UTC
Probably you should also install into sitedir instead of /usr/share
Comment 2 Doug Goldstein (RETIRED) gentoo-dev 2012-01-16 21:17:05 UTC
That's just what gnome2_src_install is doing. Please submit patches.
Comment 3 Justin Lecher (RETIRED) gentoo-dev 2012-01-17 08:14:26 UTC
(In reply to comment #2)
> That's just what gnome2_src_install is doing. Please submit patches.

it is calling emake DESTDIR=$D install. So you should fix the buildsystem if it should go to site-dir. This would also reduce the number of rebuilds when changing python versions.

At least you should call python_mod_optimize on that dir.
Comment 4 Justin Lecher (RETIRED) gentoo-dev 2012-01-17 08:15:45 UTC
I will add the byte-compilation. What about changing the location? What is your opinion about this?
Comment 5 Justin Lecher (RETIRED) gentoo-dev 2012-01-17 08:29:14 UTC
I like to apply following patch. This fixes
* Correct usage of python.eclass
* removed extra doins calls because the icons are installed directly and the pixmaps aren't present anymore
* byte-compile python stuff (EAPI=4 is needed for this, as EAPI < 3 are deprecated for this.)

Is this fine with you?


cvs diff: Diffing .
cvs diff: Diffing files
Index: virt-manager-0.9.0-r1.ebuild
===================================================================
RCS file: /var/cvsroot/gentoo-x86/app-emulation/virt-manager/virt-manager-0.9.0-r1.ebuild,v
retrieving revision 1.2
diff -u -B -b -u -p -r1.2 virt-manager-0.9.0-r1.ebuild
--- virt-manager-0.9.0-r1.ebuild  12 Aug 2011 15:42:53 -0000      1.2
+++ virt-manager-0.9.0-r1.ebuild  17 Jan 2012 08:26:10 -0000
@@ -4,7 +4,7 @@
 
 BACKPORTS=1
 
-EAPI=2
+EAPI=4
 
 if [[ ${PV} = *9999* ]]; then
   EGIT_REPO_URI="http://git.fedorahosted.org/git/virt-manager.git"
@@ -52,9 +52,13 @@ DEPEND="${RDEPEND}
   app-text/rarian
   dev-util/intltool"
 
-# The TUI (terminal UI) requires newt_syrup which is not packaged on
-# Gentoo. bug #356711
-G2CONF="--without-tui"
+pkg_setup() {
+ # The TUI (terminal UI) requires newt_syrup which is not packaged on
+ # Gentoo. bug #356711
+ G2CONF="--without-tui"
+ python_set_active_version 2
+ python_pkg_setup
+}
 
 src_prepare() {
   sed -e "s/python/python2/" -i src/virt-manager.in || \
@@ -80,22 +84,12 @@ src_prepare() {
   gnome2_src_prepare
 }
 
-src_install() {
- gnome2_src_install
-
- insinto /usr/share/virt-manager/pixmaps/
- doins "${S}"/pixmaps/*.png
- doins "${S}"/pixmaps/*.svg
-
- insinto /usr/share/virt-manager/pixmaps/hicolor/16x16/actions/
- doins "${S}"/pixmaps/hicolor/16x16/actions/*.png
-
- insinto /usr/share/virt-manager/pixmaps/hicolor/22x22/actions/
- doins "${S}"/pixmaps/hicolor/22x22/actions/*.png
-
- insinto /usr/share/virt-manager/pixmaps/hicolor/24x24/actions/
- doins "${S}"/pixmaps/hicolor/24x24/actions/*.png
+pkg_postinst() {
+ python_mod_optimize /usr/share/${PN}
+ gnome2_pkg_postinst
+}
 
- insinto /usr/share/virt-manager/pixmaps/hicolor/32x32/actions/
- doins "${S}"/pixmaps/hicolor/32x32/actions/*.png
+pkg_postrm() {
+ python_mod_cleanup /usr/share/${PN}
+ gnome2_pkg_postrm
 }
Comment 6 Justin Lecher (RETIRED) gentoo-dev 2012-01-20 09:33:21 UTC
+  20 Jan 2012; Justin Lecher <jlec@gentoo.org> virt-manager-0.9.0-r3.ebuild,
+  virt-manager-9999.ebuild:
+  move to EAPI=4, byte compile python code, #398625
+