Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 482578 - games-puzzle/monsterz fails to start with system python3
Summary: games-puzzle/monsterz fails to start with system python3
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Games (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Games
URL:
Whiteboard:
Keywords: PATCH, STABLE
Depends on:
Blocks:
 
Reported: 2013-08-26 17:11 UTC by Samuel Bauer
Modified: 2015-02-18 22:52 UTC (History)
0 users

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


Attachments
monsterz-0.7.1-r3.ebuild (monsterz-0.7.1-r3.ebuild,1.18 KB, text/plain)
2013-08-26 17:11 UTC, Samuel Bauer
Details
monsterz.py run specifically with Python 2.7 (monsterz-0.7.1-pyversion.patch,201 bytes, patch)
2013-10-21 04:31 UTC, Gary HUnt
Details | Diff
monsterz-0.7.1-r2.patch (monsterz-0.7.1-r2.patch,437 bytes, patch)
2013-10-21 04:34 UTC, Gary HUnt
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Samuel Bauer 2013-08-26 17:11:56 UTC
Created attachment 357096 [details]
monsterz-0.7.1-r3.ebuild

monsterz executable fails to run when python active interpreter is python3

I joined a quick and dirty fix to make this working. It doesn't use the python-r1 eclass when should.
Comment 1 Jeroen Roovers (RETIRED) gentoo-dev 2013-08-26 18:32:22 UTC
Comment on attachment 357096 [details]
monsterz-0.7.1-r3.ebuild

--- monsterz-0.7.1-r2.ebuild    2012-09-24 03:39:09.000000000 +0200
+++ -   2013-08-26 20:32:10.382950486 +0200
@@ -2,7 +2,8 @@
 # Distributed under the terms of the GNU General Public License v2
 # $Header: /var/cvsroot/gentoo-x86/games-puzzle/monsterz/monsterz-0.7.1-r2.ebuild,v 1.6 2012/09/19 02:01:24 mr_bones_ Exp $
 
-EAPI=2
+EAPI=5
+
 inherit eutils games
 
 DESCRIPTION="a little puzzle game, similar to the famous Bejeweled or Zookeeper"
@@ -14,7 +15,8 @@
 KEYWORDS="amd64 hppa ppc sparc x86"
 IUSE=""
 
-DEPEND="dev-python/pygame
+DEPEND="<dev-lang/python-3
+       dev-python/pygame
        media-libs/sdl-image[png]
        media-libs/sdl-mixer[mod]"
 
@@ -26,6 +28,7 @@
        sed -i \
                -e "s:GENTOO_DATADIR:${GAMES_DATADIR}/${PN}:" \
                monsterz.py || die "sed failed"
+       sed -i -e '1s/python/python2/' monsterz.py || die "sed failed"
        rm -f Makefile
 }
Comment 2 Julian Ospald 2013-08-26 22:57:46 UTC
no, this needs proper conversion to python-r1

I have done that locally, but I get segfault instead:
Fatal Python error: (pygame parachute) Segmentation Fault
Aborted
Comment 3 Julian Ospald 2013-08-26 23:35:45 UTC
I comitted anyway

+*monsterz-0.7.1-r3 (26 Aug 2013)
+
+  26 Aug 2013; Julian Ospald <hasufell@gentoo.org> +monsterz-0.7.1-r3.ebuild:
+  fix python handling wrt #482578


will close if it ever(?) hits stable
Comment 4 Gary HUnt 2013-10-21 04:31:56 UTC
Created attachment 361486 [details, diff]
monsterz.py run specifically with Python 2.7

Would if be wrong to just tell it to run a specific python interpreter?

attached patch for monsterz.py and patch for ebuild.
Comment 5 Gary HUnt 2013-10-21 04:34:15 UTC
Created attachment 361488 [details, diff]
monsterz-0.7.1-r2.patch
Comment 6 Mr. Bones. (RETIRED) gentoo-dev 2013-10-21 04:57:35 UTC
use monsterz-0.7.1-r3