Skip to content

Commit

Permalink
Merge branch 'builders'
Browse files Browse the repository at this point in the history
  • Loading branch information
Byron committed Mar 11, 2015
2 parents 85171ce + 4f794ef commit 8e78502
Show file tree
Hide file tree
Showing 139 changed files with 196,196 additions and 1,956 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
.timestamp
.pyenv
gen/
*.go
*.pyc
**target/
.api.deps
Expand Down
4 changes: 0 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,6 @@ name = "cmn"
path = "src/rust/lib.rs"

[dependencies]
# Just to get hyper to work !
openssl = "= 0.4.3"
# Just to get hyper to work !
cookie = "= 0.1.13"
hyper = "*"
rustc-serialize = "*"
yup-oauth2 = "*"
Expand Down
22 changes: 17 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.PHONY: json-to-xml clean help api-deps regen-apis license
.PHONY: json-to-xml clean help api-deps regen-apis license update-json cargo
.SUFFIXES:

include Makefile.helpers
Expand All @@ -8,13 +8,15 @@ VENV_DIR := .pyenv
PYTHON := $(VENV_DIR)/bin/python
PIP := $(VENV_DIR)/bin/pip
MAKO_RENDER := etc/bin/mako-render
API_VERSION_GEN := etc/bin/api_version_to_yaml.py
TPL := $(PYTHON) $(MAKO_RENDER)

MAKO_SRC = src/mako
RUST_SRC = src/rust
API_DEPS_TPL = $(MAKO_SRC)/deps.mako
API_DEPS = .api.deps
API_SHARED_INFO = etc/api/shared.yaml
API_LIST = etc/api/api-list.yaml
API_JSON_FILES = $(shell find etc -type f -name '*-api.json')
MAKO_LIB_DIR = $(MAKO_SRC)/lib
MAKO_LIB_FILES = $(shell find $(MAKO_LIB_DIR) -type f -name '*.*')
Expand All @@ -23,23 +25,30 @@ help:
$(info using template engine: '$(TPL)')
$(info )
$(info Targets)
$(info help - print this help)
$(info api-deps - generate a file to tell make what API file dependencies will be)
$(info apis - make all APIs)
$(info cargo - run cargo on all APIs, use ARGS="args ..." to specify cargo arguments)
$(info regen-apis - clear out all generated apis, and regenerate them)
$(info clean-apis - delete all generated APIs)
$(info help-api - show all api targets to build individually)
$(info help - print this help)
$(info license - regenerate the main license file)
$(info update-json - copy API definitions from source GOOGLE_GO_APIS_REPO=<path>)
$(info api-deps - generate a file to tell make what API file dependencies will be)

$(PYTHON):
virtualenv $(VENV_DIR)
$(PIP) install mako pyyaml

$(MAKO_RENDER): $(PYTHON)

$(API_DEPS): $(API_SHARED_INFO) $(API_DEPS_TPL) $(MAKO_LIB_FILES) $(MAKO_RENDER)
PYTHONPATH=$(MAKO_LIB_DIR) $(TPL) --template-dir '.' -io $(API_DEPS_TPL)=$@ --data-files $(API_SHARED_INFO)
$(API_DEPS): $(API_SHARED_INFO) $(API_DEPS_TPL) $(MAKO_LIB_FILES) $(MAKO_RENDER) $(API_LIST)
PYTHONPATH=$(MAKO_LIB_DIR) $(TPL) --template-dir '.' -io $(API_DEPS_TPL)=$@ --data-files $(API_SHARED_INFO) $(API_LIST)

api-deps: $(API_DEPS)

$(API_LIST): $(API_VERSION_GEN)
$(API_VERSION_GEN) etc/api $@ $@

include $(API_DEPS)

LICENSE.md: $(MAKO_SRC)/LICENSE.md.mako $(API_SHARED_INFO)
Expand All @@ -53,4 +62,7 @@ clean: clean-apis
-rm -Rf $(VENV_DIR)
-rm $(API_DEPS)

update-json:
etc/bin/update-json.sh $(GOOGLE_GO_APIS_REPO) etc/api


2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,8 @@ The license of everything not explicitly under a different license are licensed

What follows is a list of other material that is licensed differently.

* **./etc/bin/pyratemp.py** is licensed under MIT-like, as shown in [the header][pyratemp-header] of the file.
* **./etc/api/\*\*/*.json** are licensed under a [MIT-like google license][google-lic].


[oauth]: https://crates.io/crates/yup-oauth2
[pyratemp-header]: https://github.com/Byron/youtube-rs/blob/master/etc/bin/pyratemp.py
[google-lic]: https://github.com/google/google-api-go-client/blob/master/LICENSE
Loading

0 comments on commit 8e78502

Please sign in to comment.