View previous topic :: View next topic |
Author |
Message |
Thoma HAUC n00b
Joined: 30 May 2011 Posts: 55
|
Posted: Sat May 18, 2013 4:51 pm Post subject: Need help to create an ebuild (Solved) |
|
|
Hello,
I search help for writing an ebuild dedicated to a python package.
I used the mercurial eclass to get the python package.
Here is the current ebuild file content:
Code: | EAPI="4"
DESCRIPTION="MyHDL is a Python package for using Python as a hardware description and verification language."
HOMEPAGE="http://http://www.myhdl.org"
LICENSE="LGPL-2.1"
SLOT="0"
inherit mercurial
EHG_REPO_URI="http://hg.myhdl.org/myhdl"
EHG_REVISION="default"
EHG_QUIET="OFF"
EHG_CLONE_CMD="hg clone ${EHG_QUIET_CMD_OPT} --pull --noupdate" |
This will get the install files from the repository and launch the following command :
Code: | python setup.py install |
But install_lib step failed with the bellow message:
Code: | error: could not create '/usr/lib/python2.7/site-packages/myhdl': Permission denied |
I have probably missed something. What is wrong ?
Thank you in advance for your help.
Regards,
Thoma
Last edited by Thoma HAUC on Sun May 19, 2013 8:01 pm; edited 1 time in total |
|
Back to top |
|
|
mahdi1234 Guru
Joined: 19 Feb 2005 Posts: 559 Location: Being There
|
|
Back to top |
|
|
Thoma HAUC n00b
Joined: 30 May 2011 Posts: 55
|
Posted: Sun May 19, 2013 7:32 am Post subject: |
|
|
Hello,
@ mahdi1234 : I know about this ebuild but it is only available for version 0.7. The one I am trying to write is to get the latest stable release from the repository.
I progressed with the ebuild:
Code: | EAPI="4"
DESCRIPTION="MyHDL is a Python package for using Python as a hardware description and verification language."
HOMEPAGE="http://http://www.myhdl.org"
LICENSE="LGPL-2.1"
SLOT="0"
IUSE="doc"
inherit mercurial distutils
EHG_REPO_URI="http://hg.myhdl.org/myhdl"
EHG_REVISION="default"
EHG_QUIET="OFF"
EHG_CLONE_CMD="hg clone ${EHG_QUIET_CMD_OPT} --pull --noupdate"
src_install() {
distutils_src_install
dodoc *.txt
cp -r doc/* example cosimulation ${D}/usr/share/doc/${PF}
} |
The origin of the permission issue was the missing distutils inclusion.
Now, I have others questions:
1/ The setup.py script of this package is foreseen for Python 2.7 only. But my default Python interpreter is Python 3.2. Is there a way to force emerge to call Python 2.7 for this package only?
2/ If I switch to Python 2.7 then I get an "_python_get_implementation(): Unrecognized Python ABI" error. What is the right way to solve this?
Regards,
Thoma |
|
Back to top |
|
|
steveL Watchman
Joined: 13 Sep 2006 Posts: 5153 Location: The Peanut Gallery
|
Posted: Sun May 19, 2013 1:52 pm Post subject: |
|
|
I'd /join #gentoo-python on IRC: chat.freenode.net and also #gentoo-dev-help to talk to people who write ebuilds all the time. I know there's a few python-related eclasses, but I've never used them, and they've also been changing recently. |
|
Back to top |
|
|
Thoma HAUC n00b
Joined: 30 May 2011 Posts: 55
|
Posted: Sun May 19, 2013 8:00 pm Post subject: |
|
|
Hello,
I got the missing information on the IRC channel as you recommended it to me.
The ebuild is working fine.
Many thanks.
Thoma |
|
Back to top |
|
|
Hu Moderator
Joined: 06 Mar 2007 Posts: 21595
|
Posted: Sun May 19, 2013 8:45 pm Post subject: |
|
|
Thoma HAUC wrote: | I got the missing information on the IRC channel as you recommended it to me.
The ebuild is working fine. | Please post the information here so that anyone who finds this thread may benefit from it. |
|
Back to top |
|
|
|