- Download and setup Protocol Buffer release from https://github.com/protocolbuffers/protobuf/releases (if you haven't already done this for another language). As of February 2019 we're using v3.7 release, which is compatible with proto2 .proto files.
- Install Python. Release 3.7.2 was most recently used.
- Install nose for unit tests by running
easy_install nose
- Install the Python protobuf library via
easy_install protobuf
-
Regenerate the language binding source from gtfs-realtime.proto by running the following from the
python
folder:protoc --python_out=google/transit --proto_path=.. ../gtfs-realtime.proto
-
Add the license header back to the generated source file.
-
Test the generated code:
nosetests
-
Bump the version number in
setup.py
.
-
Create an account on PyPI that has permissions to publish to the gtfs-realtime-bindings project.
-
Install twine:
pip install -U pip setuptools twine
- Build and deploy the package to PyPI - you'll be prompted for your login info from the command-line:
python setup.py sdist
twine upload dist/*