From the description of the condition of your property, it sounds like you are going to need a cash buyer or one buyer with a 401k renovation loan. If you are working with an agent, these questions can be posed to him or her. If not, it's in your best interest to enlist the assistance of an agent.
As stated here, the buyer can waive the city occupancy permit. If you sell to an investor or property flipper they would likely be willing to waive since they will be doing work on the property anyway.
I've never heard of anyone being evicted from their own house do to it being 'under construction' so you should be fine. Please contact me if I can be of any further assistance,