On Tue, Oct 06, 2009 at 09:47:24AM +0200, Gianluca Montecchi wrote:
> be
> |--libbe
> |--...
> |--template
>    |--default
>    |--template_1
>    |--...

> The only showstopper is where to put the template directory once be is 
> installed. Any suggestion ? It can be put in the interface directory
> to keep coherence i think.

Inside the interface directory I think
  be
  `-- interfaces
      `-- web
          `-- html
              `--template
                 |--default
                 |--template_1
                 |--...

Installation of the default templates should be via
    data_files=[
        ('share/man/man1', ['doc/be.1']),
        ]
in setup.py.  Probably into 'share/be/html/templates' or similar.  I
don't remember the syntax off the top of my hand, but it should be
easy to find.  Hmm, I'm also not sure how your script is supposed to
locate the installed data, but that must be a solved distutils
problem...

Alternatively, you could just add a note to `be html --help` to point
out where the templates are in the source code, and skip installation
entirely ;).  People packaging your system with a real packaging
system could patch to remove that line and setup the correct default
path for their system's installation.

You should also add an option `be html --template-dir ~/X/Y/Z` so the
user can override the default templates even if they don't have access
to the default installation path (e.g. if installed into /usr/local/).

Another alternative would be to keep default templates in the the
code, and allow overriding with --template-dir.  That avoids all the
data_files confusion, while still offering flexibility and fairly
clean code.

-- 
This email may be signed or encrypted with GPG (http://www.gnupg.org).
The GPG signature (if present) will be attached as 'signature.asc'.
For more information, see http://en.wikipedia.org/wiki/Pretty_Good_Privacy

My public key is at http://www.physics.drexel.edu/~wking/pubkey.txt

Attachment: pgpGmAXMNFZMZ.pgp
Description: PGP signature

_______________________________________________
Be-devel mailing list
[email protected]
http://void.printf.net/cgi-bin/mailman/listinfo/be-devel

Reply via email to