Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Need help to create an ebuild (Solved)
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
Thoma HAUC
n00b
n00b


Joined: 30 May 2011
Posts: 35

PostPosted: Sat May 18, 2013 4:51 pm    Post subject: Need help to create an ebuild (Solved) Reply with quote

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
View user's profile Send private message
mahdi1234
Guru
Guru


Joined: 19 Feb 2005
Posts: 491
Location: far from new world orderia

PostPosted: Sat May 18, 2013 5:04 pm    Post subject: Reply with quote

Not really direct answer to your question, but ... there's an ebuild existing for the package - http://gentoo.mahdi.cz/sci-electronics:myhdl.html so you can either use it or have a look if it helps you

cheers
_________________
http://gentoo.mahdi.cz <-- gentoo package search engine
Back to top
View user's profile Send private message
Thoma HAUC
n00b
n00b


Joined: 30 May 2011
Posts: 35

PostPosted: Sun May 19, 2013 7:32 am    Post subject: Reply with quote

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
View user's profile Send private message
steveL
Advocate
Advocate


Joined: 13 Sep 2006
Posts: 2592
Location: The Peanut Gallery

PostPosted: Sun May 19, 2013 1:52 pm    Post subject: Reply with quote

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
View user's profile Send private message
Thoma HAUC
n00b
n00b


Joined: 30 May 2011
Posts: 35

PostPosted: Sun May 19, 2013 8:00 pm    Post subject: Reply with quote

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
View user's profile Send private message
Hu
Watchman
Watchman


Joined: 06 Mar 2007
Posts: 9009

PostPosted: Sun May 19, 2013 8:45 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum