Re: Distributing Python-programs to Ubuntu users

Discussion in 'Python' started by Donn, Sep 25, 2009.

  1. Donn

    Donn Guest

    On Friday 25 September 2009 08:15:18 Olof Bjarnason wrote:
    > Does anyone have any hint on a more economic way of creating
    > single-file distribution packages

    You could use distutils (setup.py) and include a readme that explains what
    apt-get commands to use to install pygame, etc. Generally it's better to *not*
    include the kitchen-sink with your apps; rather expect the user to have those
    libraries already or be able to fetch them with ease.
    I did my best at explaining that deeply confusing setup.py process here:
    http://wiki.python.org/moin/Distutils/Tutorial

    I have also seen two other approaches:
    1. A new app called 'Quickly' which is some kind of magical auto-do-
    everything-ubuntu connected to Launchpad. From what I hear it sounds very
    cool. https://wiki.ubuntu.com/DesktopTeam/Specs/Karmic/Quickly
    2. The Ubuntu PPA repositories -- google around. (Seems Quickly does this too)

    hth,
    \d
    --
    home: http://otherwise.relics.co.za/
    2D vector animation : https://savannah.nongnu.org/projects/things/
    Font manager : https://savannah.nongnu.org/projects/fontypython/
     
    Donn, Sep 25, 2009
    #1
    1. Advertising

  2. Donn

    Paul Boddie Guest

    On 25 Sep, 09:26, Donn <> wrote:
    >
    > You could use distutils (setup.py) and include a readme that explains what
    > apt-get commands to use to install pygame, etc. Generally it's better to *not*
    > include the kitchen-sink with your apps; rather expect the user to have those
    > libraries already or be able to fetch them with ease.


    The various package installers and dpkg will probably complain about
    missing packages, but one could go all the way and set up a repository
    which works with apt-get. I did something elementary of this nature
    with some Shed Skin packages:

    http://packages.boddie.org.uk/

    There will undoubtedly be things I haven't quite done right here, but
    it would give a reasonable installation experience, although there
    would need to be a number of packages available through the repository
    for the configuration exercise to be worthwhile.

    > I did my best at explaining that deeply confusing setup.py process here:http://wiki.python.org/moin/Distutils/Tutorial


    This is a nice tutorial, and I'll have to see if I can contribute
    anything to it later.

    > I have also seen two other approaches:
    > 1. A new app called 'Quickly' which is some kind of magical auto-do-
    > everything-ubuntu connected to Launchpad. From what I hear it sounds very
    > cool.https://wiki.ubuntu.com/DesktopTeam/Specs/Karmic/Quickly
    > 2. The Ubuntu PPA repositories -- google around. (Seems Quickly does this too)


    The problem with some Ubuntu stuff, sadly, is that the maintainers
    like to have their own special toolset which isolates them from the
    more general Debian ways of working. In addition, Launchpad, despite
    its recent open-sourcing (in most respects), is perceived as something
    of a walled garden. Still, if it contributes good ideas to the
    mainstream, I suppose it's not all bad.

    Paul
     
    Paul Boddie, Sep 25, 2009
    #2
    1. Advertising

  3. 2009/9/25 Paul Boddie <>:
    > On 25 Sep, 09:26, Donn <> wrote:
    >>
    >> You could use distutils (setup.py) and include a readme that explains what
    >> apt-get commands to use to install pygame, etc. Generally it's better to *not*
    >> include the kitchen-sink with your apps; rather expect the user to have those
    >> libraries already or be able to fetch them with ease.

    >
    > The various package installers and dpkg will probably complain about
    > missing packages, but one could go all the way and set up a repository
    > which works with apt-get. I did something elementary of this nature
    > with some Shed Skin packages:
    >
    > http://packages.boddie.org.uk/
    >
    > There will undoubtedly be things I haven't quite done right here, but
    > it would give a reasonable installation experience, although there
    > would need to be a number of packages available through the repository
    > for the configuration exercise to be worthwhile.
    >
    >> I did my best at explaining that deeply confusing setup.py process here:http://wiki.python.org/moin/Distutils/Tutorial

    >
    > This is a nice tutorial, and I'll have to see if I can contribute
    > anything to it later.
    >
    >> I have also seen two other approaches:
    >> 1. A new app called 'Quickly' which is some kind of magical auto-do-
    >> everything-ubuntu connected to Launchpad. From what I hear it sounds very
    >> cool.https://wiki.ubuntu.com/DesktopTeam/Specs/Karmic/Quickly
    >> 2. The Ubuntu PPA repositories -- google around. (Seems Quickly does this too)

    >
    > The problem with some Ubuntu stuff, sadly, is that the maintainers
    > like to have their own special toolset which isolates them from the
    > more general Debian ways of working. In addition, Launchpad, despite
    > its recent open-sourcing (in most respects), is perceived as something
    > of a walled garden. Still, if it contributes good ideas to the
    > mainstream, I suppose it's not all bad.
    >
    > Paul
    > --
    > http://mail.python.org/mailman/listinfo/python-list
    >


    Thanks for you answers.

    I am thinking of two target audiences:

    1. Early adopters/beta-testers. This would include:
    - my non-computer-geek brother on a windows-machine. I'll go for py2exe.
    - any non-geek visiting my blog using windows (py2exe)
    - any geeks visiting my blog that use Ubuntu (tell them about the PPA-system)
    - any geeks visiting my blog that are non-Ubuntu (i'll just provide
    the source code and tell them to apt-get python-pygame)

    2. Future players
    - I'll try to find people that want me to help package the game for
    different OSs. This list might come in handy ;)




    --
    twitter.com/olofb
    olofb.wordpress.com
    olofb.wordpress.com/tag/english
     
    Olof Bjarnason, Sep 25, 2009
    #3
  4. 2009/9/25 Ben Finney <>:
    > Olof Bjarnason <> writes:
    >
    >>   - any geeks visiting my blog that are non-Ubuntu (i'll just provide
    >> the source code and tell them to apt-get python-pygame)

    >
    > Note that for several years now the recommended command-line tool for
    > package installation is not ‘apt-get’, but ‘aptitude’ [0]. Compatible
    > command-line interface, uses the same back-end library and package
    > system, but many improvements in behaviour; especially the distinction
    > between manually-requested packages versus automatically-installed
    > packages that can be later removed when they're no longer needed.


    Great thanks for this info. I just tried running it on a vanilla
    Ubuntu system, and it is there.

    Most tutorials on the web still (I've read mostly Ubuntu-related
    forums) mention apt-get; seems like an error?

    >
    > [0] <URL:http://www.debian.org/doc/manuals/reference/ch02.en.html#_basic_package_management_operations>
    >
    > --
    >  \        “The problem with television is that the people must sit and |
    >  `\    keep their eyes glued on a screen: the average American family |
    > _o__)                 hasn't time for it.” —_The New York Times_, 1939 |
    > Ben Finney
    > --
    > http://mail.python.org/mailman/listinfo/python-list
    >




    --
    twitter.com/olofb
    olofb.wordpress.com
    olofb.wordpress.com/tag/english
     
    Olof Bjarnason, Sep 25, 2009
    #4
  5. Donn

    Paul Rudin Guest

    Ben Finney <> writes:

    > Olof Bjarnason <> writes:
    >
    >> Most tutorials on the web still (I've read mostly Ubuntu-related
    >> forums) mention apt-get; seems like an error?

    >
    > Not quite an error (since ‘apt-get’ continues to work), just habit of
    > old-timers, and cargo-cult administration by newcomers.


    It also appears that the installed software advises it, e.g.:

    paul@sleeper-service:~$ sbcl
    The program 'sbcl' is currently not installed. You can install it by typing:
    sudo apt-get install sbcl
    bash: sbcl: command not found
     
    Paul Rudin, Sep 25, 2009
    #5
  6. Donn

    Paul Boddie Guest

    On 25 Sep, 13:21, Olof Bjarnason <> wrote:
    >
    > I am thinking of two target audiences:
    >
    > 1. Early adopters/beta-testers. This would include:
    >   - my non-computer-geek brother on a windows-machine. I'll go for py2exe.
    >   - any non-geek visiting my blog using windows (py2exe)


    I'd really like to hear of any positive experiences making installers
    involving PyGame for any system, but especially for Windows using
    cross-compilation of Python and library dependencies from non-Windows
    systems with tools such as gcc for mingw32.

    >   - any geeks visiting my blog that use Ubuntu (tell them about the PPA-system)
    >   - any geeks visiting my blog that are non-Ubuntu (i'll just provide
    > the source code and tell them to apt-get python-pygame)


    Typically, applications such as games written to use PyGame can just
    run out of their distribution directory if that's good enough. You can
    go to all kinds of lengths to make the game comply with packaging
    standards and appear in the desktop menus - the latter is actually
    quite easy within the Debian packaging infrastructure once you know
    how - but it's not really necessary.

    Paul
     
    Paul Boddie, Sep 25, 2009
    #6
  7. 2009/9/25 Paul Boddie <>:
    > On 25 Sep, 13:21, Olof Bjarnason <> wrote:
    >>
    >> I am thinking of two target audiences:
    >>
    >> 1. Early adopters/beta-testers. This would include:
    >>   - my non-computer-geek brother on a windows-machine. I'll go for py2exe.
    >>   - any non-geek visiting my blog using windows (py2exe)

    >
    > I'd really like to hear of any positive experiences making installers
    > involving PyGame for any system, but especially for Windows using
    > cross-compilation of Python and library dependencies from non-Windows
    > systems with tools such as gcc for mingw32.


    I'm using VirtualBox+WinXP on my Ubuntu development computer. Good
    enough for me..

    >
    >>   - any geeks visiting my blog that use Ubuntu (tell them about the PPA-system)
    >>   - any geeks visiting my blog that are non-Ubuntu (i'll just provide
    >> the source code and tell them to apt-get python-pygame)

    >
    > Typically, applications such as games written to use PyGame can just
    > run out of their distribution directory if that's good enough. You can
    > go to all kinds of lengths to make the game comply with packaging
    > standards and appear in the desktop menus - the latter is actually
    > quite easy within the Debian packaging infrastructure once you know
    > how - but it's not really necessary.


    So what approach do you suggest? I've gotten as far as understanding
    how to add menu-items to the Ubuntu menus, simple .desktop file format
    to do that.

    One could "cheat" and write an install.sh script that adds the
    appropriate menu item, sudo-apt-gets the PyGame dependency (python is
    there by default in Ubuntu). The menu item could point to the download
    directory simply..

    >
    > Paul
    > --
    > http://mail.python.org/mailman/listinfo/python-list
    >




    --
    twitter.com/olofb
    olofb.wordpress.com
    olofb.wordpress.com/tag/english
     
    Olof Bjarnason, Sep 25, 2009
    #7
  8. Donn

    Paul Boddie Guest

    On 25 Sep, 23:14, Olof Bjarnason <> wrote:
    >
    > So what approach do you suggest? I've gotten as far as understanding
    > how to add menu-items to the Ubuntu menus, simple .desktop file format
    > to do that.


    Yes, xdg-desktop-menu will probably do the trick.

    > One could "cheat" and write an install.sh script that adds the
    > appropriate menu item, sudo-apt-gets the PyGame dependency (python is
    > there by default in Ubuntu). The menu item could point to the download
    > directory simply..


    I suppose the distribution of simple archives isn't enough if you want
    the dependency to be pulled in. I personally would therefore just make
    some quite simple Debian/Ubuntu packaging and distribute a .deb file -
    I believe most distributions of this flavour have a graphical tool
    which will offer to install such packages if downloaded, and the whole
    sudo business would be taken care of by such a tool. This isn't how I
    obtain software, however, so you might want to experiment a little.

    Paul
     
    Paul Boddie, Sep 26, 2009
    #8
  9. Ben Finney <> writes:

    > Olof Bjarnason <> writes:
    >
    >> - any geeks visiting my blog that are non-Ubuntu (i'll just provide
    >> the source code and tell them to apt-get python-pygame)

    >
    > Note that for several years now the recommended command-line tool for
    > package installation is not ‘apt-get’, but ‘aptitude’ [0].


    That's only true for Debian but not for Ubuntu; the official
    Ubuntu Server guide uses apt-get: <https://help.ubuntu.com/9.04/serverguide/C/httpd.html>


    Florian
    --
    <http://www.florian-diesch.de/software/pdfrecycle/>
     
    Florian Diesch, Sep 26, 2009
    #9
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Merlin
    Replies:
    0
    Views:
    967
    Merlin
    Jul 11, 2003
  2. Merlin
    Replies:
    0
    Views:
    1,010
    Merlin
    Jul 11, 2003
  3. NEWS

    Distributing Python programs

    NEWS, Jan 28, 2004, in forum: Python
    Replies:
    5
    Views:
    458
    Graham
    Jan 29, 2004
  4. SPE - Stani's Python Editor
    Replies:
    1
    Views:
    465
    SPE - Stani's Python Editor
    Apr 29, 2008
  5. Olof Bjarnason
    Replies:
    2
    Views:
    358
    Olof Bjarnason
    Sep 25, 2009
Loading...

Share This Page