-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
48 lines (33 loc) · 1.02 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
37
38
39
40
41
42
43
44
45
46
47
48
PACKAGE := drylib
VERSION := $(shell cat VERSION)
PANDOC ?= pandoc
PYTHON ?= python3
PYTEST ?= pytest
TWINE ?= twine
SOURCES := $(wildcard src/*/*.py src/*/*/*.py)
%.html: %.rst
$(PANDOC) -o $@ -t html5 -s $<
all: dist
dist/$(PACKAGE)-$(VERSION).tar.gz: setup.py MANIFEST.in $(SOURCES)
$(PYTHON) setup.py sdist --formats=gztar
dist/$(PACKAGE)-$(VERSION).tar.xz: setup.py MANIFEST.in $(SOURCES)
$(PYTHON) setup.py sdist --formats=xztar
dist/$(PACKAGE)-$(VERSION)-py3-none-any.whl: setup.py $(SOURCES)
$(PYTHON) setup.py bdist_wheel
build: setup.py $(SOURCES)
$(PYTHON) setup.py build
check: $(SOURCES) $(wildcard test/test*.py)
PYTHONPATH=src $(PYTEST)
dist: sdist bdist
sdist: dist/$(PACKAGE)-$(VERSION).tar.gz
bdist: dist/$(PACKAGE)-$(VERSION)-py3-none-any.whl
install: setup.py $(SOURCES)
$(PYTHON) setup.py build
clean: setup.py
@rm -Rf *~ build dist
$(PYTHON) setup.py clean
distclean: clean
mostlyclean: clean
.PHONY: build check dist sdist bdist install clean distclean mostlyclean
.SECONDARY:
.SUFFIXES: