Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Make a python script demand a certain version.
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
ConfusedOldMan
n00b
n00b


Joined: 27 Sep 2012
Posts: 6

PostPosted: Mon Oct 01, 2012 4:57 am    Post subject: Make a python script demand a certain version. Reply with quote

I am attempting to adapt magick rotation on a system with both python 2.7 and 3.2. Magick rotation is actually a 2.6 or 2.7 python script with pygtk support (2.7 and below only). By default, magick rotation automatically uses the highest set interpreter (3.2), and of course, fails.

Is there a way I can amend these files to only use my 2.7 interpreter?

If I wanted to make it also usable for other tablet-hybrid owners, how can I make a package out of it?

Thanks in advance.
Back to top
View user's profile Send private message
dmitchell
Veteran
Veteran


Joined: 17 May 2003
Posts: 1159
Location: Austin, Texas

PostPosted: Mon Oct 01, 2012 6:02 am    Post subject: Reply with quote

Code:
#!/usr/bin/env python2.7

Or something like that.
_________________
Your argument is invalid.
Back to top
View user's profile Send private message
dol-sen
Retired Dev
Retired Dev


Joined: 30 Jun 2002
Posts: 2805
Location: Richmond, BC, Canada

PostPosted: Mon Oct 01, 2012 6:51 am    Post subject: Reply with quote

If you make an ebuild for it. It can be made to install to both 2.6 and/or 2.7 automatically, depending on how a users config is set.

Making a pkg out of it, may just be a matter of creating/editing a setup.py script for use by an ebuild. Then making a tarball of it or adding the patches to the ebuild.
_________________
Brian
Porthole, the Portage GUI frontend irc@freenode: #gentoo-guis, #porthole, Blog
layman, gentoolkit, CoreBuilder, esearch...
Back to top
View user's profile Send private message
ConfusedOldMan
n00b
n00b


Joined: 27 Sep 2012
Posts: 6

PostPosted: Tue Oct 02, 2012 1:30 am    Post subject: Reply with quote

Thanks for your replies, I have made progress.
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