Reply
Thread Tools
Posts: 631 | Thanked: 837 times | Joined on May 2007 @ Milton, Ontario, Canada
#11
Originally Posted by qole View Post
Hey, Khertan quietly added a section to the py2deb wiki article about how to add your pre / post install scripts to the build_myapp.py program. I'm not entirely clear on how this works (enclose the entire script in triple quotes? That's all?) but that is good news. I can probably use that script to package my Easy Debian stuff now... And with Fremantle coming, that's something I want to do.
Postinst/preinst/etc are very easy, all you need to do is make sure that your scripts are set to executable and stored somewhere, then add them directly as arguments to the p object. For example, in flipClock I've got:
Code:
p.postinst = "control/postinst"
the extra code in the wiki just seems to be to make sure that the script gets the execute permission set on it; if you've already done that first then you don't need the extra stuff...
 

The Following User Says Thank You to jolouis For This Useful Post:
qole's Avatar
Moderator | Posts: 7,109 | Thanked: 8,820 times | Joined on Oct 2007 @ Vancouver, BC, Canada
#12
the "control/postinst" corresponds to a text file called "postinst" in a "control" directory?
__________________
qole.org --- twitter --- Easy Debian wiki page
Please don't send me a private message, post to the appropriate thread.
Thank you all for your donations!
 
Posts: 631 | Thanked: 837 times | Joined on May 2007 @ Milton, Ontario, Canada
#13
Originally Posted by qole View Post
the "control/postinst" corresponds to a text file called "postinst" in a "control" directory?
Yup exactly.
 
qole's Avatar
Moderator | Posts: 7,109 | Thanked: 8,820 times | Joined on Oct 2007 @ Vancouver, BC, Canada
#14
Bad news, guys.
When using Maemo py2deb, putting
p.postinst = "control/postinst"
in my script puts a literal string "control/postinst" as my postinst script, not the contents of that file.

jolouis, what version of py2deb are you using? I'm using the one from Diablo Extras.

The good news is that the control scripts are the only broken thing with the package... Oh, and the .png file for my icon doesn't seem to show up in App Manager...
__________________
qole.org --- twitter --- Easy Debian wiki page
Please don't send me a private message, post to the appropriate thread.
Thank you all for your donations!
 
qole's Avatar
Moderator | Posts: 7,109 | Thanked: 8,820 times | Joined on Oct 2007 @ Vancouver, BC, Canada
#15
OK, update.

This worked for me. I'll update the wiki when I get a chance.

Code:
     qolepostinst = open("control/postinst", "r")
     p.postinstall=qolepostinst.read()
     qolepostrm = open("control/postrm", "r")
     p.postremove=qolepostrm.read()
I had to look that up, but it works, so I'm happy.
__________________
qole.org --- twitter --- Easy Debian wiki page
Please don't send me a private message, post to the appropriate thread.
Thank you all for your donations!
 
Khertan's Avatar
Posts: 1,012 | Thanked: 817 times | Joined on Jul 2007 @ France
#16
with py2deb i use the postinstall like that :

p.postinstall="""#!/bin/sh
chmod +x /usr/bin/pygtkeditor"""

as this way i keep all the package information in my make.py script
 
qole's Avatar
Moderator | Posts: 7,109 | Thanked: 8,820 times | Joined on Oct 2007 @ Vancouver, BC, Canada
#17
Khertan, any hints as to why the p.icon isn't working in the App Manager? I'm using the full path, should I be using just a relative path? Does the icon need to be a certain size or something?
__________________
qole.org --- twitter --- Easy Debian wiki page
Please don't send me a private message, post to the appropriate thread.
Thank you all for your donations!
 
Posts: 605 | Thanked: 137 times | Joined on Nov 2005 @ La Rochelle, France
#18
shouldn't you use the uuencode (text) version of the icon ?
 
qole's Avatar
Moderator | Posts: 7,109 | Thanked: 8,820 times | Joined on Oct 2007 @ Vancouver, BC, Canada
#19
Py2Deb should do the uuencode for you, shouldn't it?
__________________
qole.org --- twitter --- Easy Debian wiki page
Please don't send me a private message, post to the appropriate thread.
Thank you all for your donations!
 
qole's Avatar
Moderator | Posts: 7,109 | Thanked: 8,820 times | Joined on Oct 2007 @ Vancouver, BC, Canada
#20
Just a bump to an old thread:

Thanks to Khertan and twaelti (and thp for pushing me), I have managed to use py2deb to package all of my stuff for Extras.

You can browse my source in my project's git repository, and see what my py2deb build scripts look like.
__________________
qole.org --- twitter --- Easy Debian wiki page
Please don't send me a private message, post to the appropriate thread.
Thank you all for your donations!
 

The Following 2 Users Say Thank You to qole For This Useful Post:
Reply

Tags
traveller python


 
Forum Jump


All times are GMT. The time now is 20:47.