From 614d7a3d9acf8e0856287e5197fa9c90681ca8ba Mon Sep 17 00:00:00 2001 From: kmnip Date: Wed, 14 Feb 2018 13:47:17 -0800 Subject: [PATCH] makefile for installing python3 instead of python2 --- prereqs/makefile3 | 66 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 prereqs/makefile3 diff --git a/prereqs/makefile3 b/prereqs/makefile3 new file mode 100644 index 0000000..452b9af --- /dev/null +++ b/prereqs/makefile3 @@ -0,0 +1,66 @@ +# This make file would install all require software packages except ABySS. + +SHELL:=/bin/bash -eu -o pipefail + +.DELETE_ON_ERROR: + +WORKDIR:=$(shell pwd) + +IGRAPH_VERSION:=0.7.1 +PYTHON_VERSION:=3.6.4 + +all: transabyss transabyss-merge + touch $@.COMPLETE + +clean: clean_blat clean_python clean_igraph + rm -f all.COMPLETE && \ + rm -rf ./bin ./lib ./include ./share + +transabyss: bin blat.COMPLETE python.COMPLETE python-igraph.COMPLETE + +transabyss-merge: transabyss + +bin: + mkdir -p ./bin + +blat.COMPLETE: bin + wget --quiet --no-check-certificate -N -P ./bin http://hgdownload.cse.ucsc.edu/admin/exe/linux.x86_64/blat/blat && \ + chmod +x ./bin/blat && \ + touch $@ + +clean_blat: + rm -f blat.COMPLETE ./bin/blat + +python.COMPLETE: bin + wget --quiet --no-check-certificate -N https://www.python.org/ftp/python/$(PYTHON_VERSION)/Python-$(PYTHON_VERSION).tgz && \ + tar -zxf Python-$(PYTHON_VERSION).tgz && \ + cd Python-$(PYTHON_VERSION) && \ + ./configure --quiet --prefix=$(WORKDIR) && \ + make --quiet && \ + make --quiet install && \ + cd $(WORKDIR) && \ + ln -s python3 ./bin/python && \ + touch $@ + +clean_python: + rm -f python.COMPLETE python-igraph.COMPLETE Python-$(PYTHON_VERSION).tgz && \ + rm -rf Python-$(PYTHON_VERSION) + +igraph.COMPLETE: bin + wget --quiet --no-check-certificate -N http://igraph.org/nightly/get/c/igraph-$(IGRAPH_VERSION).tar.gz && \ + tar -zxf igraph-$(IGRAPH_VERSION).tar.gz && \ + cd igraph-$(IGRAPH_VERSION) && \ + ./configure --quiet --prefix=$(WORKDIR) && \ + make --quiet && \ + make --quiet install && \ + cd $(WORKDIR) && \ + touch $@ + +clean_igraph: + rm -f igraph.COMPLETE igraph-$(IGRAPH_VERSION).tar.gz && \ + rm -rf igraph-$(IGRAPH_VERSION) + +python-igraph.COMPLETE: bin python.COMPLETE igraph.COMPLETE + export PKG_CONFIG_PATH=$(WORKDIR)/lib/pkgconfig && \ + ./bin/pip3 --quiet install python-igraph && \ + touch $@