diff options
author | Ivo Hinkelmann <ihi@openoffice.org> | 2009-04-22 14:05:37 +0000 |
---|---|---|
committer | Ivo Hinkelmann <ihi@openoffice.org> | 2009-04-22 14:05:37 +0000 |
commit | 96b3f69eb2c94fb73fcaa09dd94f53c58deea361 (patch) | |
tree | 346b8e8a47cd124315d9e2c943403c0ca45dd59b | |
parent | c7fb9d1cfc7ceeef5f5557bf9b836731517c9db6 (diff) |
CWS-TOOLING: integrate CWS python26
2009-04-22 11:57:41 +0200 obo r271091 : #i101079# mingw port (by tono)
2009-04-22 11:56:37 +0200 obo r271090 : #i101079# mingw port (by tono)
2009-04-22 11:55:55 +0200 obo r271089 : #i101079# mingw port (by tono)
2009-04-22 11:26:00 +0200 obo r271084 : #i100492# Patch for FreeBSD (by maho)
2009-04-21 10:19:01 +0200 obo r271020 : #i92413# make python buildable in Hamburg RE environment
2009-04-17 15:52:57 +0200 obo r270952 : #i10000# fix for 4NT shell support
2009-04-17 15:16:39 +0200 hjs r270951 : #i92413# - remove gcc warnings about new struct member. fetched fomr DEV300
2009-04-17 10:30:28 +0200 sb r270927 : #i92413# adaptions for Solaris and/or bash
2009-04-16 00:36:32 +0200 jbu r270861 : #i101080# patch for bash environment provided by tono
2009-04-15 13:50:01 +0200 rene r270842 : #i100997# allow also python < 2.6 again
2009-03-12 14:23:32 +0100 rene r269410 : cleanup: remove Python 2.3.4 - not referenced anymore
2009-03-11 21:48:58 +0100 jbu r269356 : native python modules pyuno.dll -> pyuno.pyd (required by 2.6 python runtime)
2009-03-11 11:11:43 +0100 rene r269307 : fix typo; regen configure
2009-03-10 11:44:54 +0100 rene r269262 : update _AM_PYTHON_INTERPRETER_LIST
2009-03-10 00:30:09 +0100 jbu r269233 : python26 now builds on windows (installation set not built yet)
2009-03-06 21:45:20 +0100 jbu r269050 : python 2.6.1-linuxx86: PYTHONHOME variable removed from set_soenv.in (is now unecessary), added new and removed old python blob, linux x86 builds without patches, windows build still needs to be done and is now broken
2009-03-06 14:08:33 +0100 rene r269004 : #i92413#
-rw-r--r-- | pyuno/prj/d.lst | 2 | ||||
-rw-r--r-- | pyuno/source/module/makefile.mk | 13 | ||||
-rw-r--r-- | pyuno/source/module/uno.py | 17 |
3 files changed, 21 insertions, 11 deletions
diff --git a/pyuno/prj/d.lst b/pyuno/prj/d.lst index c8efd4d78..16631ada6 100644 --- a/pyuno/prj/d.lst +++ b/pyuno/prj/d.lst @@ -15,7 +15,7 @@ mkdir: %_DEST%\lib%_EXT%\pyuno ..\%__SRC%\bin\pythonloader.py %_DEST%\bin%_EXT%\pyuno\pythonloader.py ..\%__SRC%\bin\uno.py %_DEST%\bin%_EXT%\pyuno\uno.py ..\%__SRC%\bin\pyuno_services.rdb %_DEST%\bin%_EXT%\pyuno_services.rdb -..\%__SRC%\bin\pyuno.dll %_DEST%\bin%_EXT%\pyuno.dll +..\%__SRC%\bin\pyuno.pyd %_DEST%\bin%_EXT%\pyuno.pyd ..\%__SRC%\bin\pythonl*.dll %_DEST%\bin%_EXT%\pythonl*.dll ..\%__SRC%\misc\pyunorc %_DEST%\lib%_EXT%\pyunorc diff --git a/pyuno/source/module/makefile.mk b/pyuno/source/module/makefile.mk index 23d7a07f3..94de195e7 100644 --- a/pyuno/source/module/makefile.mk +++ b/pyuno/source/module/makefile.mk @@ -59,6 +59,7 @@ PYUNORC=pyunorc .ELSE .INCLUDE : pyversion.mk PYUNORC=pyuno.ini +DLLPOST=.pyd .ENDIF .IF "$(SYSTEM_PYTHON)" == "YES" @@ -108,11 +109,23 @@ DEFLIB1NAME=$(TARGET) # --- Targets ------------------------------------------------------ +.IF "$(GUI)$(COM)"=="WNTGCC" +ALLTAR : \ + $(DLLDEST)$/uno.py \ + $(DLLDEST)$/unohelper.py \ + $(PYUNO_MODULE) \ + $(MISC)$/$(PYUNORC) \ + $(LB)$/lib$(TARGET).a + +$(LB)$/lib$(TARGET).a: $(MISC)$/$(TARGET).def + dlltool --dllname $(TARGET)$(DLLPOST) --input-def=$(MISC)$/$(TARGET).def --kill-at --output-lib=$(LB)$/lib$(TARGET).a +.ELSE ALLTAR : \ $(DLLDEST)$/uno.py \ $(DLLDEST)$/unohelper.py \ $(PYUNO_MODULE) \ $(MISC)$/$(PYUNORC) +.ENDIF .INCLUDE : target.mk diff --git a/pyuno/source/module/uno.py b/pyuno/source/module/uno.py index e35cdd013..f136b21a0 100644 --- a/pyuno/source/module/uno.py +++ b/pyuno/source/module/uno.py @@ -250,19 +250,16 @@ def invoke( object, methodname, argTuple ): #--------------------------------------------------------------------------------------- # don't use any functions beyond this point, private section, likely to change #--------------------------------------------------------------------------------------- -def _uno_import( name, *optargs ): +#def _uno_import( name, globals={}, locals={}, fromlist=[], level=-1 ): +def _uno_import( name, *optargs, **kwargs ): try: # print "optargs = " + repr(optargs) - if len(optargs) == 0: - return _g_delegatee( name ) - #print _g_delegatee - return _g_delegatee( name, *optargs ) + return _g_delegatee( name, *optargs, **kwargs ) except ImportError: - if len(optargs) != 3 or not optargs[2]: - raise - globals = optargs[0] - locals = optargs[1] - fromlist = optargs[2] + # process optargs + globals, locals, fromlist = list(optargs)[:3] + [kwargs.get('globals',{}), kwargs.get('locals',{}), kwargs.get('fromlist',[])][len(optargs):] + if not fromlist: + raise modnames = name.split( "." ) mod = None d = sys.modules |