Skip to content

Commit d5c4e9e

Browse files
authored
Clean up travis config, set up os x build (google#143)
* Remove dependence on pip. * Add osx to Travis test matrix. * Remove pip upgrade and sudo requirement for Travis config.
1 parent 3dc695e commit d5c4e9e

File tree

2 files changed

+10
-9
lines changed

2 files changed

+10
-9
lines changed

.travis.yml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
language: go
2-
# Upgrade default Travis pip which is old and doesn't work the way we expect.
3-
# Need sudo to do that.
4-
sudo: required
5-
install: pip install --upgrade pip
2+
os:
3+
- linux
4+
- osx
65
# Run gofmt and lint serially to avoid confusing output. Run tests in parallel
76
# for speed.
8-
script: make gofmt lint; make -j2 test
7+
script: make gofmt lint && make -j2 test

Makefile

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -159,13 +159,15 @@ gofmt: build/gofmt.diff
159159
$(GOLINT_BIN):
160160
@go get -u github.com/golang/lint/golint
161161

162-
golint: $(GOLINT_BIN) $(PYLINT_BIN)
162+
golint: $(GOLINT_BIN)
163163
@$(GOLINT_BIN) -set_exit_status runtime
164164

165-
# Old versions of pip don't support the --prefix param so specify the bin dir
166-
# (--install-scripts) and the Python dir (--target) separately.
165+
# Don't use system pip for this since behavior varies a lot between versions.
166+
# Instead build pylint from source. Dependencies will be fetched by distutils.
167167
$(PYLINT_BIN):
168-
@pip install --install-option=--install-scripts='$(ROOT_DIR)/build/bin' --target '$(PY_DIR)' pylint
168+
@mkdir -p build/third_party
169+
@cd build/third_party && curl -sL https://pypi.io/packages/source/p/pylint/pylint-1.6.4.tar.gz | tar -zx
170+
@cd build/third_party/pylint-1.6.4 && $(PYTHON) setup.py install --prefix $(ROOT_DIR)/build
169171

170172
pylint: $(PYLINT_BIN)
171173
@$(PYLINT_BIN) compiler/*.py $(addprefix tools/,benchcmp coverparse diffrange grumpc grumprun)

0 commit comments

Comments
 (0)