Closed tewalds closed 6 years ago
Btw, the way to test this is:
setup a fresh python3 env: $ virtualenv -p python3 /tmp/py3 $ source /tmp/py3/bin/activate
verify the code: s2client-proto$ ./setup.py build s2client-proto$ less s2clientprotocol/sc2api_pb2.py and verify that the imports are "from s2clientprotocol import ..."
verify it works: s2client-proto$ pip install --upgrade . $ python >>> from s2clientprotocol import sc2api should succeed, not say import error
I don't see a way to get python3 to import the other compiled proto files without actually changing the imports in the proto themselves. Changing --proto_path only changes where protoc searches, not where python searches. Changing --python_out only changes where it's output, still not where python searches. That leaves either editing the files by hand, or changing the imports. I guess that might mean fixing some c++ imports somewhere as well.