diff --git a/Makefile b/Makefile index 525521b..524175c 100644 --- a/Makefile +++ b/Makefile @@ -1,80 +1,5 @@ -FLAKE = flake8 -BINDIR = bin -SRCDIR = swh +# Makefile driver for SWH Python modules. DO NOT CHANGE. +# You can add custom Makefile rules to Makefile.local -# add -v for example -FLAG= - -NOSE = nosetests3 -TESTFLAGS = -s -TESTDIR = ./swh/tests - -DBNAME=swh-git-cloner -SQL=./swh.sql - -SWH_CLONER=$(BINDIR)/swh-git-producer - -PROFILE_TYPE=profile - -FOLLOW_LOG=-f - -deps: - sudo apt-get install -y python3 \ - python3-pygit2 \ - python3-psycopg2 \ - python3-nose \ - python3-celery \ - celeryd \ - ipython3 - -prepare: - mkdir -p /tmp/swh-git-cloner/log - -clean: - rm -rf /tmp/swh-git-cloner/log /tmp/swh-git-cloner - -inspect-active: - celery inspect active - -inspect-queue: - celery inspect active_queues - -inspect-stats: - celery inspect stats - -run-1-worker: - celery worker --app=swh.worker.celery \ - --pool=prefork \ - --concurrency=8 \ - -Ofair \ - --loglevel=info 2>&1 | tee -a w1.log - -run-2-workers: - celery multi start w1 w2 \ - --app=swh.worker.celery - --pool=prefork \ - -Ofair \ - --concurrency=8 \ - --loglevel=info \ - -stop-2-workers: - celery multi stop w1 w2 - - -create-db: - dropdb --if-exists $(DBNAME) - createdb $(DBNAME) - psql $(DBNAME) < $(SQL) - -drop-db: - dropdb --if-exists $(DBNAME) - -connect-db: - psql $(DBNAME) - - -run-producer: - PYTHONPATH=`pwd` $(SWH_CLONER) $(FLAG) - -check: - $(FLAKE) $(BINDIR) $(SRCDIR) +include ../Makefile.python +-include Makefile.local diff --git a/Makefile b/Makefile.local similarity index 98% copy from Makefile copy to Makefile.local index 525521b..9bb43ca 100644 --- a/Makefile +++ b/Makefile.local @@ -1,80 +1,81 @@ +# -*- makefile -*- FLAKE = flake8 BINDIR = bin SRCDIR = swh # add -v for example FLAG= NOSE = nosetests3 TESTFLAGS = -s TESTDIR = ./swh/tests DBNAME=swh-git-cloner SQL=./swh.sql SWH_CLONER=$(BINDIR)/swh-git-producer PROFILE_TYPE=profile FOLLOW_LOG=-f deps: sudo apt-get install -y python3 \ python3-pygit2 \ python3-psycopg2 \ python3-nose \ python3-celery \ celeryd \ ipython3 prepare: mkdir -p /tmp/swh-git-cloner/log clean: rm -rf /tmp/swh-git-cloner/log /tmp/swh-git-cloner inspect-active: celery inspect active inspect-queue: celery inspect active_queues inspect-stats: celery inspect stats run-1-worker: celery worker --app=swh.worker.celery \ --pool=prefork \ --concurrency=8 \ -Ofair \ --loglevel=info 2>&1 | tee -a w1.log run-2-workers: celery multi start w1 w2 \ --app=swh.worker.celery --pool=prefork \ -Ofair \ --concurrency=8 \ --loglevel=info \ stop-2-workers: celery multi stop w1 w2 create-db: dropdb --if-exists $(DBNAME) createdb $(DBNAME) psql $(DBNAME) < $(SQL) drop-db: dropdb --if-exists $(DBNAME) connect-db: psql $(DBNAME) run-producer: PYTHONPATH=`pwd` $(SWH_CLONER) $(FLAG) check: $(FLAKE) $(BINDIR) $(SRCDIR)