Creating packages of python

LeoXV ulist at gs1.ubuntuforums.org
Mon Aug 22 23:37:17 UTC 2005


Marc Wiriadisastra Wrote: 
> The example I would like to use is http://rufus.sourceforge.net

> 

> This has an install script in the directory the setup.py is only used

> for windows.  What I would prefer to do is create a dpkg for this

> however the rules script that I'm setting up seems to have issues
> where

> it won't build anything which of course isn't needed since you can
> just

> run it without building it..



Compile all

python -OO -c "import compileall;
compileall.compile_dir('${DESTDIR}')"



winsetup.py - import py2exe

You can try this http://sourceforge.net/projects/cx-freeze/



"if sys.platform == "win32":

statefile = join(self.path, 'torrents.ini')

else:

statefile = join(os.path.expanduser('~/.Rufus'),
'torrents.ini')"

/home/user/.Rufus/torrents.ini  (multiuser Linux)



http://www.kolumbus.fi/jukka.lehtomaki/ubuntu/install.txt



PREFIX=/usr

BINDIR=/usr/bin

DESTDIR=/usr/share/g3torrent



Copy files to folder /usr/share/g3torrent

install --mode=644 * /usr/share/g3torrent/

install -d /usr/share/g3torrent/BitTorrent

install -d /usr/share/g3torrent/images

install -d /usr/share/g3torrent/images/flags

install -d /usr/share/g3torrent/en/LC_MESSAGES   (gettext)



$HOME = /home/user/  (Bash Shell)



/usr/bin/g3torrent 

*********************************************

#! /bin/bash

# Copyright (c) 2004, Jukka Lehtomaki <jukka.lehtomaki at gmail.com>

g3torrent=${HOME}/.g3torrent

g3torrentfolder=${HOME}/G3Torrent

torrents=${HOME}/G3Torrent/torrents

download_dir=${HOME}/G3Torrent/incoming

completed_dl_dir=${HOME}/G3Torrent/incoming/completed

completed_tor_dir=${HOME}/G3Torrent/torrents/completed

if [ ! -e ${g3torrent} ] ; then

mkdir ${g3torrent}

echo "Creating ${g3torrent}"

fi

if [ ! -e ${g3torrentfolder} ] ; then

mkdir ${g3torrentfolder}

mkdir ${torrents}

mkdir ${download_dir}

mkdir ${completed_dl_dir}

mkdir ${completed_tor_dir}

echo "Creating ${g3torrentfolder}"

fi

cd ${g3torrent}

python -OO /usr/share/g3torrent/g3torrent.py

*********************************************



http://tinyurl.com/886c8

http://ubuntuforums.org/showthread.php?t=57590&highlight=Rufus


-- 
LeoXV




More information about the ubuntu-users mailing list