Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 379987

Summary: distutils and game eclasses don't play together
Product: Gentoo Linux Reporter: Nikos Chantziaras <realnc>
Component: EclassesAssignee: Gentoo Games <games>
Status: RESOLVED INVALID    
Severity: normal CC: python
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: emerge --info

Description Nikos Chantziaras 2011-08-20 17:10:40 UTC
I have a Python application that installs a Python script to /usr/bin by default. However, the application is game-related, so it should go to /usr/games/bin instead.  So my inherit line in the ebuild looks like this:

  inherit distutils games

But during the installation phase, the script still ends up in /usr/bin. The ebuild in question is rather short and does not define any functions (eutils code for  has been removed since it's not relevant):

  EAPI="3"
  PYTHON_DEPEND="2:2.7"

  inherit distutils games

  DESCRIPTION="Interactive Fiction library manager"
  HOMEPAGE="http://grotesque.sourceforge.net"
  SRC_URI="mirror://sourceforge/grotesque/${P}-gtk2.tar.gz"

  LICENSE="GPL-3"
  SLOT="0"
  KEYWORDS="amd64 x86"
  IUSE=""

  DEPEND="dev-python/pygtk"
  RDEPEND="${DEPEND}"

Adding this src_install() function doesn't help either:

  src_install() {
	distutils_src_install
	# This also won't work:
	# gameswrapper distutils_src_install
	prepgamesdirs
  }

Reproducible: Always
Comment 1 Nikos Chantziaras 2011-08-20 17:11:36 UTC
Created attachment 284045 [details]
emerge --info
Comment 2 Mr. Bones. (RETIRED) gentoo-dev 2011-08-22 06:57:02 UTC
So.... where's the error?  Yes, you're using two eclasses and you might have to write more code in the ebuild.  News at 11?
Comment 3 Nikos Chantziaras 2011-08-22 16:36:13 UTC
I thought you inherit this eclass and it takes care of installation paths.  At least that's what happens with anything else that's not using distutils.

News at 12.
Comment 4 Mr. Bones. (RETIRED) gentoo-dev 2011-08-22 19:32:48 UTC
Well you can try to use the games variables with the distutils functions.  I'm still not seeing "the bug" here.  You have to say what you mean in the ebuild or things won't work like you're expecting.  I'm closing this INVALID because I'm not seeing evidence of a bug in the eclasses.
Comment 5 Nikos Chantziaras 2011-08-22 19:48:28 UTC
(In reply to comment #4)
> Well you can try to use the games variables with the distutils functions.  I'm
> still not seeing "the bug" here.  You have to say what you mean in the ebuild
> or things won't work like you're expecting.  I'm closing this INVALID because
> I'm not seeing evidence of a bug in the eclasses.

Well, what I mean is that when I use games.eclass with something else (like automake based), and do:

  emake DESTDIR="${D}" install

everything ends up in the right place.  But how does one do the same with distutils_src_install?
Comment 6 Mr. Bones. (RETIRED) gentoo-dev 2011-08-22 20:11:35 UTC
You might be able to do things like games-board/pychess or check other games that use the distutils eclass.