Re: [jokosher-devel] Planning 0.2



On 7/17/06, Stuart Langridge <sil kryogenix org> wrote:
On the other hand, it makes it a little more fiddly to grab the code
and run it *without* installation, I suspect, andone of my goals is
that Jokosher should be relocatable. I suppose the "jokosher"
executable, which would actually be a script, can just "import
jokosher" which would pick it up from . if it's there and
site-packages (which is already on sys.path) if it isn't.

setuptools can automate this, it's pretty cool:

http://peak.telecommunity.com/DevCenter/setuptools#automatic-script-creation


I had a quick go at making jokosher work with setuptools. It seems to work ok:

in trunk:

$ mkdir jokosher
$ mv *.py images Instruments *.png *.glade jokosher

Use the following setup.py:

##################################################
from setuptools import setup

setup \
(
   name = 'Jokosher',
   version = '1.0',
   packages = ['jokosher'],
   package_data = {'': ['*.glade', '*.png', 'images/*.png',
'Instruments/*.instr', 'Instruments/images/*.svg']},
   entry_points =
   {
       'gui_scripts': ['jokosher = jokosher.Jokosher:main']
   },
   zip_safe = False,
)
##################################################

$ python setup.py bdist_egg
$ sudo easy_install dist/Jokosher-1.0-py2.4.egg
$ cd
$ jokosher



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]