The code in get_home_dir is broken for py2exe

Bug #274067 reported by Jörgen Stenarson
2
Affects Status Importance Assigned to Milestone
IPython
Fix Released
Undecided
Unassigned

Bug Description

get_home_dir is broken for py2exe when not using a zip-compressed library. Currently the zipfile is used to identify that we run under py2exe. A better solution is to check for the frozen attribute on the sys module.

I have a patch in the tree: lp:~jorgen-stenarson/ipython/ipython-py2exe-fix

I have started to improve the tests for get_home_dir but I'm not sure how best to test the py2exe cases without running under py2exe. Any ideas are welcome.

/Jörgen

Related branches

Revision history for this message
Jörgen Stenarson (jorgen-stenarson) wrote :

Hi,

I have added some more tests for get_home_dir. In the tests I modify os.environ and some other things to test the logic in the function.

see my branch lp:~jorgen-stenarson/ipython/ipython-py2exe-fix

/Jörgen

Changed in ipython:
status: New → Fix Committed
Changed in ipython:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.