Makefile 1.33 KB
NAME = colab-deps
VERSION = 1.12.9
PREFIX = /usr
TARGET = $(DESTDIR)$(PREFIX)/lib/colab
DISTDIR = $(NAME)-$(VERSION)
TARBALL = dist/$(DISTDIR).tar.gz


all: virtualenv
	./build/bin/pip install --no-index --find-links=$(DISTDIR) pip==1.5.6
	./build/bin/pip install --no-index --find-links=$(DISTDIR) --use-wheel -r requirements.txt
	./build/bin/pip install --no-index --find-links=$(DISTDIR) --no-deps -r requirements-colab-plugins.txt
	virtualenv --relocatable ./build

clean:
	$(RM) -r ./build

SOURCES = Makefile requirements.txt requirements-colab-plugins.txt

install:
	mkdir -p $$(dirname $(TARGET))
	rm -rf $(TARGET)
	cp -r ./build $(TARGET)


sdist: $(TARBALL)

$(TARBALL):
	mkdir -p $$(dirname $(TARBALL))
	$(RM) $(TARBALL)
	tar czf $(TARBALL) $(SOURCES) $(DISTDIR)

distclean:
	$(RM) -r $$(dirname $(TARBALL)) src/
	$(RM) -r $(DISTDIR)

downloadtar: virtualenv
	mkdir -p $(DISTDIR)
	wget https://pypi.python.org/packages/source/p/pip/pip-1.5.6.tar.gz -O $(DISTDIR)/pip-1.5.6.tar.gz
	wget https://github.com/colab/colab-noosfero-plugin/archive/v0.2.4.zip -O $(DISTDIR)/colab-noosfero-plugin-0.2.4.zip
	wget https://github.com/colab/colab-gitlab-plugin/archive/v0.2.3.zip -O $(DISTDIR)/colab-gitlab-plugin-0.2.3.zip
	./build/bin/pip install --download $(DISTDIR) -r requirements.txt

.PHONY: virtualenv
virtualenv:
	rm -rf ./build
	virtualenv ./build