From 24d4aa4c114b924e417c23bbea160ef64e0ebc95 Mon Sep 17 00:00:00 2001 From: Oliver Tonnhofer Date: Thu, 3 Mar 2016 17:12:44 +0100 Subject: [PATCH] use built-in vendor support instead of godeps --- Makefile | 10 +++++----- README.md | 31 ++++++++++++------------------- 2 files changed, 17 insertions(+), 24 deletions(-) diff --git a/Makefile b/Makefile index 439a662..9e3c9a4 100644 --- a/Makefile +++ b/Makefile @@ -9,7 +9,7 @@ export PATH := $(GOPATH)/bin:$(PATH) GOLDFLAGS=-ldflags '-r $${ORIGIN}/lib' -GO=godep go +GO:=$(if $(shell go version |grep 'go1.5'),GO15VENDOREXPERIMENT=1,) go BUILD_DATE=$(shell date +%Y%m%d) BUILD_REV=$(shell git rev-parse --short HEAD) @@ -36,11 +36,11 @@ clean: test: imposm3 system-test-files $(GO) test ./... -i - $(GO) test ./... + $(GO) test `$(GO) list ./... | grep -Ev '/vendor'` test-unit: imposm3 $(GO) test ./... -i - $(GO) test `$(GO) list ./... | grep -v 'imposm3/test'` + $(GO) test `$(GO) list ./... | grep -Ev '/test|/vendor'` test-system: imposm3 (cd test && make test) @@ -63,8 +63,8 @@ upload-docs: docs build-license-deps: rm LICENSE.deps - find ./Godeps/_workspace/src -iname license\* -exec bash -c '\ - dep=$${1#./Godeps/_workspace/src/}; \ + find ./vendor -iname license\* -exec bash -c '\ + dep=$${1#./vendor/}; \ (echo -e "========== $$dep ==========\n"; cat $$1; echo -e "\n\n") \ | fold -s -w 80 \ >> LICENSE.deps \ diff --git a/README.md b/README.md index b65566f..cb3ad8e 100644 --- a/README.md +++ b/README.md @@ -112,7 +112,7 @@ There are some dependencies: #### Compiler -You need [Go >=1.1](http://golang.org). +You need [Go >=1.5](http://golang.org). #### C/C++ libraries @@ -129,35 +129,28 @@ For best performance use [HyperLevelDB][libhyperleveldb] as an in-place replacem #### Go libraries -Imposm3 uses the following libraries. +Imposm3 uses the following Go libraries. - - -- - +- -`go get` will fetch these, but you can also use [godep][] to use a provided (vendorized) set of these dependencies. - -[godep]: https://github.com/tools/godep - - -#### Other - -Fetching Imposm and the Go libraries requires [mercurial][] and [git][]. - -[mercurial]: http://mercurial.selenic.com/ -[git]: http://git-scm.com/ - +These libraries are already vendorized (i.e. the source code is included in the Imposm repository). #### Compile -Create a new [Go workspace](http://golang.org/doc/code.html): +Create a [Go workspace](http://golang.org/doc/code.html) by creating the `GOPATH` directory for all your Go code, if you don't have one already: - mkdir imposm - cd imposm + mkdir -p go + cd go export GOPATH=`pwd` -Get Imposm 3 and all dependencies: +Then you need to enable GO15VENDOREXPERIMENT, if you are using Go 1.5. You can skip this if you are using 1.6 or higher: + + export GO15VENDOREXPERIMENT=1 + +Get the code and install Imposm 3: go get github.com/omniscale/imposm3 go install github.com/omniscale/imposm3