[Bf-python] Packaging issues

www.stani.be s_t_a_n_i at yahoo.com
Sat Apr 10 04:03:34 CEST 2004


Hi Alex,
Your plugin sounds very nice.  Something I wanted to
write one time as well... I would suggest the standard
Python way with distutils. This makes it very easy to
find data on any platform.  Just make sure in every
directory you have a dummy __init__.py file, and you
can find the path by importing the dummy module and
throught the __file__ attribute you can easily
retrieve the path.
Also it is easy to wrap into a binary installer for
windows/unix and it is quite structured.  I have some
experience with SPE (http://spe.pycs.net). A good
distutils setup may require some attention, but the
benefits become very clear in maintenance when you are
releasing new versions. For spe I have just to press
one button and a custom python script makes with
distutils source and binary distributions. 
Using the site-packages dir.
If the plugin is really big and complex, I would apply
for a Blender project page (eg
http://projects.blender.org/projects/spe) This offers
you features like mailing lists, bug trackers, and so
on... Of course this only makes sense if you're going
to use them.
If you send me your plugin by email, I could have a
look at it. But I'm quite busy at the moment,
developping the new spe release (major rewrite).
Greetings,
Stani

http://www.stani.be

--- alex mole <nal at blueyonder.co.uk> wrote:
> Hi
> 
> I'm not sure if this has been touched on before, but
> is there an 
> accepted way to package Bpython scripts so that
> they'll install and run 
> easily?
> 
> I have written a large Blender plugin which will
> convert a scene with 
> some blocks into a city (generating doors, windows,
> roofs and texturing 
> them all). This means that you can create
> half-decent cities in very 
> little time :) I'd really like to put this up on the
> web, but I'm not 
> sure how to package it [it currently needs a huge
> readme with lots of 
> fiddly instructions to install it...].
> 
> There is a large amount of code involved, and a
> large amount of data as 
> well. It would be possible to copy the whole lot
> into .blender/scripts, 
> but that would be pretty horrible...
> 
> I can see several approaches, each with its own set
> of issues:
> 
> * install the code into the Python site directory
> and write a thin 
> wrapper around it to plug in to blender. This seems
> like the best 
> approach, and the most in-keeping with python in
> general. The standard 
> distutils could be used to do this automatically.
> However, there will be 
> a large amount of data involved which will need to
> be put somewhere that 
> can be found from the blender plugin. The location
> of this will change 
> on different platforms, which may prove difficult in
> terms of writing 
> the plugin script.
> 
> * install everything in a single directory and
> adjust PYTHONPATH [or 
> whatever it's called ;)] so that python can find it.
> This seems like a 
> worse idea than the previous one, but it wouldn't
> require 
> root/administrator priveleges.
> 
> * or something else :)
> 
> 
> What are your thoughts?
> 
> Alex
> _______________________________________________
> Bf-python mailing list
> Bf-python at blender.org
> http://www.blender.org/mailman/listinfo/bf-python


__________________________________
Do you Yahoo!?
Yahoo! Tax Center - File online by April 15th
http://taxes.yahoo.com/filing.html



More information about the Bf-python mailing list