2019-01-23 16:39:19 +01:00
|
|
|
.PHONY: install install-lib install-dir uninstall phony test typecheck
|
2018-01-30 10:56:29 +01:00
|
|
|
|
|
|
|
WEECHAT_HOME ?= $(HOME)/.weechat
|
|
|
|
PREFIX ?= $(WEECHAT_HOME)
|
2018-03-02 22:58:43 +01:00
|
|
|
PYTHON ?= python
|
2018-01-30 10:56:29 +01:00
|
|
|
|
|
|
|
lib := $(patsubst matrix/%.py, $(DESTDIR)$(PREFIX)/python/matrix/%.py, \
|
|
|
|
$(wildcard matrix/*.py))
|
|
|
|
|
2018-04-02 16:20:52 +02:00
|
|
|
install: install-dir install-lib
|
|
|
|
install -m644 main.py $(DESTDIR)$(PREFIX)/python/matrix.py
|
2018-01-30 10:56:29 +01:00
|
|
|
|
|
|
|
install-lib: $(lib)
|
2018-04-02 16:20:52 +02:00
|
|
|
install-dir:
|
|
|
|
install -d $(DESTDIR)$(PREFIX)/python/matrix
|
|
|
|
|
|
|
|
uninstall:
|
|
|
|
rm $(DESTDIR)$(PREFIX)/python/matrix.py $(DESTDIR)$(PREFIX)/python/matrix/*
|
|
|
|
rmdir $(DESTDIR)$(PREFIX)/python/matrix
|
2018-01-30 10:56:29 +01:00
|
|
|
|
2018-01-31 13:56:31 +01:00
|
|
|
phony:
|
|
|
|
|
|
|
|
$(DESTDIR)$(PREFIX)/python/matrix/%.py: matrix/%.py phony
|
2018-04-02 16:20:52 +02:00
|
|
|
install -m644 $< $@
|
2018-03-02 22:58:43 +01:00
|
|
|
|
|
|
|
test:
|
2018-03-18 23:30:45 +01:00
|
|
|
python3 -m pytest
|
|
|
|
python2 -m pytest
|
2018-09-12 20:13:32 +02:00
|
|
|
|
|
|
|
typecheck:
|
|
|
|
mypy -p matrix --ignore-missing-imports --warn-redundant-casts
|