Improved python3 compatibility in setup.py