support the new setuptools

changes to support the new setuptools (#941) and have the tests pass.