Skip to content

uw-midsun/codegen-tooling-msxiv

Repository files navigation

codegen-tooling [Deprecated]

IMPORTANT: codegen-tooling-msxiv has been deprecated.

Functionality has been merged into firmware_xiv. This repository may be out of date. Please see https://uwmidsun.atlassian.net/l/c/HUVz1yu7 for information about the migration.


Build Status

Assorted code generation utilities and tooling

Getting Started

The protoc compiler is needed to build protocol buffers on Ubuntu the official version is out of date so use the following ppa to add it.

sudo add-apt-repository ppa:maarten-fonville/protobuf
sudo apt-get update

Your default version of golang may be out of date. In this case update via the update-golang script, preferably outside the current repository (e.g in your vagrant box shared folder)

git clone https://github.com/udhos/update-golang
cd update-golang
sudo ./update-golang.sh

To install the compiler, run:

sudo apt-get install protobuf-compiler
go get -u github.com/golang/protobuf/protoc-gen-go

If you already have protoc installed continue from here:

virtualenv .venv
source .venv/bin/activate
pip install -r requirements.txt
make gen

Or if you use pyenv

pyenv virtualenv 3.3.6 codegen-tooling336
source ~/.pyenv/versions/codegen-tooling336/bin/activate
pip install -r requirements.txt
make gen

If you need to generate a new protobuf file

make protos

If you need to run unittests

make test

If you need to lint code

make lint

To clean the outputs

make clean

To add a new dependency, pip install $dependency && pip freeze | grep -i $dependency >> requirements.txt

Requirements

  • Python 2.7+ (or Python 3.3+)
  • pip
  • virtualenv
  • protoc 3.0+ (if you're compiling protobufs)
  • clang-format

Note: The protobuf library seems not to handle unicode literals very well for Python 3.0 - 3.2—as such, we do not support those versions.