On Sat, Aug 21, 2010 at 5:55 PM, Anthony Tuininga
<anthony.tuini...@gmail.com> wrote:
> I'm not sure what your architecture is like but perhaps you would be
> better of by simply adjusting sys.path directly in setup.py?
>
> So can you simply do this?
>
> import sys
>
> sys.path.append("share/exposong/lib")

Good thinking, but "path=" seems to be working with the suggestion below.

>> It looks like I can set PYTHONPATH, it will work, but setting
>> Executable(path=...) should work. Do you know for a fact that this is
>> working correctly?
>
> The path parameter in Executable will work but it is expecting a
> __full__ path. So you need to do something like this
>
> path = sys.path + ["share/exposong/lib"]

Ah, that helps a lot! I was trying to do path like packages_dir I
think, which was completely wrong.

> If you want these to be loaded dynamically from the file system you
> might want to use include_files to simply copy the files to the target
> directory and adjust sys.path in your script to include whatever place
> you copied these.
>
> Recognize one other thing: Executable() is meant for overriding stuff
> that you want different in each executable. If you only have one
> executable or they all use the same configuration you're better off
> simply using the main setup() call.


I built my plugin system from a tutorial on the internet, and they
have this file in plugin/__init__.py, which is used later to
initialize all python files from a directory:

__all__ = [fnm[:-3] for fnm in os.listdir(__path__[0]) if
fnm.endswith(".py") and not fnm.startswith("_")]

Now, I guess when I freeze it, I can no longer add or remove plugins,
so I have a few options:

1. Detect that I am frozen, and set __all__ manually if so. Is there a
variable set for this?

2. If it's possible, place the plugins in an external path that can be
modified. This would allow for installing/removing plugins. Am I able
to do this without Python installed on a computer?

> Hope that helps!

You've been a great help! I really appreciate your time. I hope I
haven't been too much trouble.

-- 
Thanks,
Brad Landis

------------------------------------------------------------------------------
This SF.net email is sponsored by 

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev 
_______________________________________________
cx-freeze-users mailing list
cx-freeze-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cx-freeze-users

Reply via email to