Hi all,

I am trying to package a quite complex FOSS app called GNUmed.

I will provide all files you need.

Packaging itself seems to work ok generating this output:

C:\tools>python C:\tools\pyinstaller-1.3\Build.py gnumed\gnumed.spec
checking Analysis
building because gnumed-0-2-5-1/gnumed/Gnumed/wxpython/gnumed.py changed
running Analysis out0.toc
Analyzing: C:\tools\pyinstaller-1.3\support\_mountzlib.py
Analyzing: C:\tools\pyinstaller-1.3\support\useUnicode.py
Analyzing: gnumed-0-2-5-1/gnumed/Gnumed/wxpython/gnumed.py
Warnings written to gnumed\warngnumed.txt
checking PYZ
rebuilding out1.toc because C:\tools\gnumed-0-2-5-1\gnumed\Gnumed\wxpython\Gnume
d.py changed
building PYZ out1.toc
checking PKG
rebuilding out3.toc because gnumed\buildgnumed\out1.pyz changed
building PKG out3.pkg
checking ELFEXE
rebuilding out2.toc because pkg is more recent
building ELFEXE out2.toc
checking COLLECT
building out4.toc because gnumed\buildgnumed/gnumed.exe is more recent
building COLLECT out4.toc

running GNUmed generates this output:

C:\tools\gnumed\distgnumed>gnumed --log-file=gm-from-cvs.log --conf-file=gm-fro
-cvs.conf --debug
Extracting binaries
C:\tools\gnumed\distgnumed\python25.dll
Manipulating evironment
PYTHONPATH=C:/tools/gnumed/distgnumed
v
# installing zipimport hook
import zipimport # builtin
# installed zipimport hook
# C:\Python25\Lib\warnings.pyc matches C:\Python25\Lib\warnings.py
import warnings # precompiled from C:\Python25\Lib\warnings.pyc
# C:\Python25\Lib\types.pyc matches C:\Python25\Lib\types.py
import types # precompiled from C:\Python25\Lib\types.pyc
import _types # builtin
# C:\Python25\Lib\linecache.pyc matches C:\Python25\Lib\linecache.py
import linecache # precompiled from C:\Python25\Lib\linecache.pyc
# C:\Python25\Lib\os.pyc matches C:\Python25\Lib\os.py
import os # precompiled from C:\Python25\Lib\os.pyc
import nt # builtin
# C:\Python25\Lib\ntpath.pyc matches C:\Python25\Lib\ntpath.py
import ntpath # precompiled from C:\Python25\Lib\ntpath.pyc
# C:\Python25\Lib\stat.pyc matches C:\Python25\Lib\stat.py
import stat # precompiled from C:\Python25\Lib\stat.pyc
# C:\Python25\Lib\UserDict.pyc matches C:\Python25\Lib\UserDict.py
import UserDict # precompiled from C:\Python25\Lib\UserDict.pyc
# C:\Python25\Lib\copy_reg.pyc matches C:\Python25\Lib\copy_reg.py
import copy_reg # precompiled from C:\Python25\Lib\copy_reg.pyc
importing modules from CArchive
import marshal # builtin
iu
import imp # builtin
struct
import _struct # builtin
archive
Installing import hooks
out1.pyz
Running scripts
import win32api # dynamically loaded from C:/tools/gnumed/distgnumed\win32api.p
d
import zlib # builtin
import _codecs # builtin
import _sre # builtin
import time # builtin
import strop # builtin

###############################################################################
#
#
# log file is [C:\tools\gnumed\distgnumed\gm-from-cvs.log]
#
# Please email this file to <[EMAIL PROTECTED]> if you encounter problems.
#
###############################################################################
#

GNUmed startup: Activating verbose log level for debugging.
import _locale # builtin
import operator # builtin
import errno # builtin
import datetime # builtin
,========================================================
| Unhandled exception caught !
| Type : <type 'exceptions.AttributeError'>
| Value: 'module' object has no attribute 'init'
`========================================================
[PANIC]  (<string>:[EMAIL PROTECTED]):  unhandled exception caught
[PANIC]  (<string>:[EMAIL PROTECTED]):  exception type : <type 'exce
tions.AttributeError'>
[PANIC]  (<string>:[EMAIL PROTECTED]):  exception value: 'module' ob
ect has no attribute 'init'
[PANIC]  (<string>:[EMAIL PROTECTED]):  Traceback (most recent call
ast):<#10-0x0A-lf>
[PANIC]  (<string>:[EMAIL PROTECTED]):    File "<string>", line 417,
in <module><#10-0x0A-lf>
[PANIC]  (<string>:[EMAIL PROTECTED]):    File "<string>", line 185,
in setup_date_time<#10-0x0A-lf>
[PANIC]  (<string>:[EMAIL PROTECTED]):  AttributeError: 'module' obj
ct has no attribute 'init'<#10-0x0A-lf>
Traceback (most recent call last):
  File "<string>", line 417, in <module>
  File "<string>", line 185, in setup_date_time
AttributeError: 'module' object has no attribute 'init'
 RC: -1 from gnumed
OK.
# clear __builtin__._
# clear sys.path
# clear sys.argv
# clear sys.ps1
# clear sys.ps2
# clear sys.exitfunc
# clear sys.exc_type
# clear sys.exc_value
# clear sys.exc_traceback
# clear sys.last_type
# clear sys.last_value
# clear sys.last_traceback
# clear sys.path_hooks
# clear sys.path_importer_cache
# clear sys.meta_path
# restore sys.stdin
# restore sys.stdout
# restore sys.stderr
# cleanup __main__
# cleanup[1] errno
# cleanup[1] sre_constants
# cleanup[1] Gnumed
# cleanup[1] _codecs
# cleanup[1] zipimport
# cleanup[1] warnings
# cleanup[1] Gnumed.pycommon
# cleanup[1] _struct
# cleanup[1] _types
# cleanup[1] _locale
# cleanup[1] strop
# cleanup[1] signal
# cleanup[1] exceptions
# cleanup[1] Gnumed.pycommon.gmCLI
# cleanup[1] win32api
# cleanup[1] Gnumed.pycommon.gmI18N
# cleanup[1] gettext
# cleanup[1] getopt
# cleanup[1] Gnumed.pycommon.gmTools
# cleanup[1] copy
# cleanup[1] Gnumed.pycommon.gmLog
# cleanup[1] time
# cleanup[1] traceback
# cleanup[1] locale
# cleanup[1] encodings
# cleanup[1] encodings.mbcs
# cleanup[1] operator
# cleanup[1] types
# cleanup[1] datetime
# cleanup[1] encodings.latin_1
# cleanup[1] string
# cleanup[1] encodings.ascii
# cleanup[1] encodings.cp1252
# cleanup[1] codecs
# cleanup[1] linecache
# cleanup[1] encodings.aliases
# cleanup[1] re
# cleanup[1] sre_parse
# cleanup[1] sre_compile
# cleanup[1] _sre
# cleanup[2] copy_reg
# cleanup[2] iu
# cleanup[2] archive
# cleanup[2] struct
# cleanup[2] imp
# cleanup[2] ntpath
# cleanup[2] nt
# cleanup[2] stat
# cleanup[2] UserDict
# cleanup[2] os.path
# cleanup[2] zlib
# cleanup[2] os
# cleanup[2] marshal
# cleanup sys
# cleanup __builtin__
# cleanup ints: 27 unfreed ints in 4 out of 10 blocks
# cleanup floats
C:\tools\gnumed\distgnumed>

the code in question is (short version):


#===========================================================================
def init():

        _log.Log(gmLog.lData, 'mx.DateTime.now(): [%s]' % mxDT.now())
        _log.Log(gmLog.lData, 'datetime.now()   : [%s]' % pyDT.datetime.now())
        _log.Log(gmLog.lData, 'time.localtime() : [%s]' % str(time.localtime()))
        _log.Log(gmLog.lData, 'time.gmtime()    : [%s]' % str(time.gmtime()))

        try:
                _log.Log(gmLog.lData, '$TZ: [%s]' % os.environ['TZ'])
        except KeyError:
                _log.Log(gmLog.lData, '$TZ not defined')

---------------------------------------------------------------------
full version can be accessed here:

http://cvs.savannah.gnu.org/viewcvs/gnumed/gnumed/client/pycommon/gmDateTime.py?rev=1.6&root=gnumed&only_with_tag=rel-0-2-5-1&view=markup

to make a long story short please help me understand the difference between 
running gnumed.py directly with all its imports and having it run by 
pyinstaller. This time it does not seem to be a missing import which could be 
fixed by a hook but rather pyinstaller choking on parts of the code.

How can I check if the file in the pyinstaller distribution is the same as in 
my source tree.

Any help is appreciated.

Sebastian Hilbert

-- 
"Feel free" - 10 GB Mailbox, 100 FreeSMS/Monat ...
Jetzt GMX TopMail testen: http://www.gmx.net/de/go/topmail

--~--~---------~--~----~------------~-------~--~----~
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