> > Thank you for applying my patches. I am running tests on AIX again to
> > verify everything still works.
>
> It seems that revision 1822 broke AIX support.
>
> These changes in buildtests/runtests.py is the cause:
Not sure what the right solution is, but maybe "PyInstaller/
compat.py"'s handling of environment variables should be changed along
these lines:
diff --git a/PyInstaller/compat.py b/PyInstaller/compat.py
--- a/PyInstaller/compat.py
+++ b/PyInstaller/compat.py
@@ -88,25 +88,30 @@
def getenv(name, default=None):
"""
Returns unicode string containing value of environment variable
'name'.
"""
- return os.getenv(name, default)
+ return os.environ[name]
def setenv(name, value):
"""
Accepts unicode string and set it as environment variable 'name'
containing
value 'value'.
"""
- os.putenv(name, value)
+ os.environ[name] = value
def unsetenv(name):
"""
Delete the environment variable 'name'.
"""
- os.unsetenv(name)
+ del os.environ[name]
+
+ # The variable is not deleted from the environment unless
function
+ # 'os.unsetenv()' exists. If it does not, we set it to the empty
string.
+ if not hasattr(os, 'unsetenv') and hasattr(os, 'putenv'):
+ os.putenv(name, '')
That would keep "os.environ" and the underlying OS environment in
sync. It seems that "os.environ" goes back to at least Python 2.2.
http://docs.python.org/release/2.2/lib/os-procinfo.html
Function "os.unsetenv" appeared in 2.5 and deleting entries from
"os.environ" calls this function automatically if it exists.
http://docs.python.org/release/2.5/lib/os-procinfo.html
/Martin
--
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.