On 5/17/2010 10:34 PM, Tim Diggins wrote:
    Thanks. I have applied the (amended) patch in [837]. I have also
    updated the wiki page.


Great!

            Sure! It really should not be difficult. Have a look at how
            COLLECT() copies files around, and do something like that
        for BUNDLE().


        Ok... I can see how that works in the code. I'm wondering what
        the spec
        file should look like... Won't the BUNDLE call end up looking almost
        identical to the COLLECT call?

        Maybe it would be better to pass the result of the COLLECT call
        to the
        BUNDLE call? Or perhaps make the BUNDLE function a superset of the
        COLLECT functionality (but just degrading to COLLECT on other
        platforms).


    Well, from a semantic point of view, BUNDLE() should do more than
    COLLECT(): not only it would create any special file required
    (.plist, etc.) but it would also know the internal structure of the
    BUNDLE(), so to be able to move files into the correct subdirectory.

    So, I would go with a totally different class (just like it is now)
    and then maybe you can internally reuse some code between the two.


        When I look at the spec file generated for the Mac at present
        there is
        some platform specificity, like:
             exe = EXE(pyz,
                   a.scripts,
                   exclude_binaries=1,
                   name=os.path.join('build*/pyi.darwin/small_app'*,
        'small_app'),
                   ...


    Yes, the platform name should be removed. I think the best solution
    is to have Makespec.py generate something like "pyi.$PLATFORM" and
    then substitute that within EXE().

    Also, on Windows, Makespec generates "small_app.exe". That's wrong
    as well: the extension should be appended later. This modification
    needs to be backward compatible with existing spec files, so it
    should first check if there's already an .exe extension just in case.


        and platform variability, like:
             if *sys.platform.startswith("darwin")*:
                 app = BUNDLE(exe,
                 ...


    I was planning to have BUNDLE() to be a no-op on the other
    platforms. I would even rename it as MACBUNDLE(), to make it more clear.


It seems like the BUNDLE/MACBUNDLE is a superset of the functionality of
COLLECT... and will require all the definitions (in the spec file) that
COLLECT does. So, focussing on a cross-platform spec file, we could do
one of the following:

1) pass the result of COLLECT to BUNDLE/MACBUNDLE
2) have an extra parameter to COLLECT which contains the macbundling
information
3) have a single BUNDLE call (which acts as a simple COLLECT on non-mac
platforms) --> this seems weird
4) have two independent calls COLLECT (which is irrelevant on the mac)
and MACBUNDLE (that only works on the mac) <-- this seems wordy and
likely to be duplicating spec declarations in an unhealthy way.

On my own, I'd go probably for the first one, but would like your guidance.

I don't see a clear way. I guess we should try with #1 and pay the price of the double-copy (actually, files will be first copied to the dist dir, and then moved to the correct subdirectory by MACBUNDLE).
--
Giovanni Bajo
Develer S.r.l.
http://www.develer.com

--
You received this message because you are subscribed to the Google Groups 
"PyInstaller" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/pyinstaller?hl=en.

Reply via email to