forked from namlook/mongokit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
37 lines (29 loc) · 979 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# sets up the virtual environment
setup: venv/_venv_setup_done venv/_venv_packages_installed
clean:
rm -rf venv && find . -name "*.pyc" -exec rm -rf {} \;
# run tests
test: pep8 lint utest
utest: setup
. venv/bin/activate \
&& export PYTHONPATH=$$PYTHONPATH:$$(pwd) \
&& nosetests --where=tests --with-coverage --cover-package=mongokit
lint: setup
. venv/bin/activate \
&& pylint --rcfile=.pylintrc ./mongokit
pep8: setup
. venv/bin/activate \
&& pep8 --max-line-length=120 mongokit
build: setup
. venv/bin/activate \
&& python setup.py clean \
&& python setup.py build
venv/_venv_setup_done:
virtualenv --version > /dev/null 2>&1 || pip install --user virtualenv \
&& virtualenv venv \
&& touch venv/_venv_setup_done
venv/_venv_packages_installed: requirements.txt
. venv/bin/activate \
&& pip install --upgrade pip setuptools \
&& venv/bin/pip install --download-cache=./.tmp/pip_cache_dir -r requirements.txt \
&& touch venv/_venv_packages_installed