-
Notifications
You must be signed in to change notification settings - Fork 6
/
Makefile
36 lines (33 loc) · 1.05 KB
/
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
PROJECT_NAME = PARAMETERS
BUILD_DIRECTORY = ../build_$(PROJECT_NAME)
# Run flake8 style checking
flake8:
@echo
@echo "-----------"
@echo "Flake8 issues"
@echo "-----------"
@python3 -m flake8 --version
@python3 -m flake8 || true
# Run entire test suite
test_suite:
@echo
@echo "---------------------"
@echo "Regression Test Suite"
@echo "---------------------"
@export PYTHONPATH=`pwd`:$(PYTHONPATH);nosetests3 -v --with-id --with-coverage --cover-package=. 3>&1 1>&2 2>&3 3>&- || true
# zip
package:
@echo
@echo "---------------------"
@echo "Creating a package for $(PROJECT_NAME) project"
@echo "---------------------"
rm -rf $(BUILD_DIRECTORY)
cp -rf . $(BUILD_DIRECTORY)
@echo "Remove pyc files"
find $(BUILD_DIRECTORY) -name "*.pyc" -exec rm -rf {} \;
@echo "Remove test directories"
find $(BUILD_DIRECTORY) -name "test" -type d -prune -exec rm -rf '{}' '+'
@echo "Remove dot files"
find $(BUILD_DIRECTORY) -name ".*" -prune -exec rm -rf '{}' '+'
@echo "Remove Makefile"
find $(BUILD_DIRECTORY) -name "Makefile" -prune -exec rm '{}' '+'