Re: [jokosher-devel] Managing extensions



OK. I've got J working with a simple HelloWorld plugin as an egg. I need to
get it working on a plugin with a glade file included before I commit it.
Meanwhile a question arises regarding building eggs and the directory
structure of the svn repositories for extensions.

At the minute a default egg build needs a directory structure something like
this:

MyExtension/
    setup.py
    src/
        MyExtension.py
        __init__.py
        MyExtension.glade
    build/
    dist/

build/ is used by setup during the build process (then cleared)
dist/ is the default destination of the egg (though you can change it with
the -d option to setup.py bdist_egg)

If we followed this default layout then the final deployable eggs would be
all over the place and make it a bit messy to find and install them. We
could make the svn structure look like:

extensions/
    trunk/
        eggs/
            Extension_1/
                setup_py
                src/

               . . .
            Extension_2/
               . . .
        extensions/
            Extension_1.egg
            Extension_2.egg
               . . .
            SimpleExtension.py

When you build the egg you use

python setup.py bdist_egg -d ../../extensions/

This keeps all the deployable extensions in one directory. You can also set
JOKOSHER_EXTENSION_DIRS to include this dir so that your extensions are
always up-to-date whenever you svn up. The disadvantage to doing this is
that you always have to remember the -d option when running setup.py before
you commit. Unless there's a way to change the default that I haven't found
yet.

Any thoughts?

--
John Green



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