sets COCOS_X_ROOT

sets COCOS_X_ROOT environment variable and also uses PEP8 coding style
fixes indentation
Merge pull request #9142 from ricardoquesada/setup_py_fixes

Setup py fixes