← Back to team overview

quickly-talk team mailing list archive

Re: ANNOUNCE: ubuntu-qt-template ubuntu-qtquick-template

 

Hi Jibo
 Making a deb installer for a working python project is easy with
quickly. You need to use the ubuntu-cli template and drop you files
into the folder it creates. This template uses only 4 files. Assume
you want to create the foo project

quickly create ubuntu-cli foo

then you get a loader file foo -  don't touch this. It will become
/usr/bin/foo after installation

A directory foo containing __init__.py and foo_config.py. If you want
you can ignore foo_config.py

The interesting file is __init__.py which contains def main()

the loader file will call main() and you are up and running.
Lastly a setup.py file, edit this to contain a project description.

Assuming your project contains a file like this

def do_ this():
     # do something

def do_ that():
     # do something else

if __name__=="__main__":
    do_ this()
    do_ that()

change it to

def do_ this():
     # do something

def do_ that():
     # do something else

def main():
    do_ this()
    do_ that()

and rename it __init__.py




> 2012/5/23 He Jibo <hejibo@xxxxxxxxx>
>
>> I have already port my software to ubuntu, and compile it to an
>> executable
>> in ubuntu. I just wish to make  a .deb or .rpm installer. I love quickly
>> because it is pretty simple to build .deb. For all the tutorial on the
>> web,
>> it is tedious to make a .deb.
>> Thanks. I will look at your stdeb module.
>>
>> Jibo


Follow ups

References