-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
29 lines (20 loc) · 1.04 KB
/
Makefile
File metadata and controls
29 lines (20 loc) · 1.04 KB
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
PYTHON_MAJOR_VERSION=$(shell python -c "import sys; print(sys.version_info.major)")
MAIN_REQUIREMENTS=requirements.txt
EXTENDED_REQUIREMENTS=requirements-py$(PYTHON_MAJOR_VERSION).txt
build: test lint
test: test-py$(PYTHON_MAJOR_VERSION)
test-py2:
@echo Running tests for Python 2...
@env PYTHONHASHSEED=random PYTHONPATH=. nosetests --with-coverage --cover-package=memcrashed --cover-erase --with-yanc --with-xtraceback --with-html --html-file=nosetests.html --with-xunit tests/
test-py3:
@echo Running tests for Python 3...
@env PYTHONHASHSEED=random PYTHONPATH=. nosetests --with-coverage --cover-package=memcrashed --cover-erase --with-yanc --with-xtraceback tests/
lint:
@echo Running syntax check...
@flake8 . --ignore=E501
install:
@echo Installing dependencies...
@pip install -r $(MAIN_REQUIREMENTS) --use-mirrors
-@[ -f $(EXTENDED_REQUIREMENTS) ] && pip install -r $(EXTENDED_REQUIREMENTS) --use-mirrors || \
echo File "$(EXTENDED_REQUIREMENTS)" doesn\'t exist, skipping version-specific packages
@echo Finished installing dependencies.