Update of /cvsroot/pywin32/pywin32/pyisapi/isapi
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10537/isapi
Modified Files:
install.py
Log Message:
Make everything work in a py2exe environment.
Index: install.py
===================================================================
RCS file: /cvsroot/pywin32/pywin32/pyisapi/isapi/install.py,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** install.py 5 Sep 2004 08:13:52 -0000 1.3
--- install.py 7 Sep 2004 02:20:43 -0000 1.4
***************
*** 332,345 ****
# What to do? The .dll knows its name, but this is likely to be
# executed via a .exe, which does not know.
! # For now, we strip everything past the last underscore in the
! # executable name - this will work so long as you don't override
! # the dest_base for the DLL itself.
! base, ext = os.path.splitext(os.path.abspath(sys.argv[0]))
path, base = os.path.split(base)
! try:
! base = base[:base.rindex("_")]
! except ValueError:
! pass
! dll_name = os.path.join(path, base + ".dll")
else:
base, ext = os.path.splitext(mod_name)
--- 332,344 ----
# What to do? The .dll knows its name, but this is likely to be
# executed via a .exe, which does not know.
! base, ext = os.path.splitext(mod_name)
path, base = os.path.split(base)
! # handle the common case of 'foo.exe'/'foow.exe'
! if base.endswith('w'):
! base = base[:-1]
! # For py2exe, we have '_foo.dll' as the standard pyisapi loader - but
! # 'foo.dll' is what we use (it just delegates).
! # So no leading '_' on the installed name.
! dll_name = os.path.abspath(os.path.join(path, base + ".dll"))
else:
base, ext = os.path.splitext(mod_name)
|