Page MenuHomeSoftware Heritage

Makefile.python
No OneTemporary

Makefile.python

# -*- mode: Makefile -*-
PYMODULE := $(shell basename `pwd` | sed 's/-/./g')
PYTHON_BIN := $(shell test -d bin/ && find bin/ -type f -executable | xargs egrep -H '^\#.*python' | cut -f 1 -d :)
TEST_DIRS := $(shell find . -name tests -type d)
NOSE = python3 -m nose
NOSEFLAGS = -sv
FLAKE = python3 -m flake8
FLAKEFLAGS =
all:
.PHONY: test
test:
$(NOSE) $(NOSEFLAGS) $(TEST_DIRS)
.PHONY: coverage
coverage:
$(NOSE) $(NOSEFLAGS) --with-coverage --cover-package $(PYMODULE) --cover-inclusive --cover-branches $(TEST_DIRS)
.PHONY: check
check:
$(FLAKE) $(FLAKEFLAGS) swh $(PYTHON_BIN)
.PHONY: doc
doc:
make -C docs html
.PHONY: distclean
# clean up Python bytecode files. Also consider random *.pyc files, in case
# Python 2.x has been run by mistake
distclean:
find . -type d -name __pycache__ | xargs rm -rf
find . -type f -name '*.pyc' -delete

File Metadata

Mime Type
text/x-makefile
Expires
Jun 4 2025, 7:49 PM (12 w, 14 h ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3302880

Event Timeline