forked from nanoporetech/duplex-tools
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
59 lines (43 loc) · 1.4 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
49
50
51
52
53
54
55
56
57
58
59
# Builds a cache of binaries which can just be copied for CI
OS := $(shell uname)
ifeq ($(OS), Darwin)
SEDI=sed -i '.bak'
else
SEDI=sed -i
endif
PYTHON ?= python3
VENV ?= venv
venv: ${VENV}/bin/activate
IN_VENV=. ./${VENV}/bin/activate
$(VENV)/bin/activate:
test -d $(VENV) || $(PYTHON) -m venv $(VENV) --prompt "duplex_tools"
${IN_VENV} && pip install pip --upgrade
.PHONY: install
install: venv
${IN_VENV} && pip install -r requirements.txt
${IN_VENV} && python setup.py install
.PHONY: develop
develop: venv
${IN_VENV} && pip install -r requirements.txt
${IN_VENV} && python setup.py develop
.PHONY: flake8
flake8: venv
${IN_VENV} && pip install flake8 flake8-rst-docstrings flake8-docstrings flake8-import-order
${IN_VENV} && flake8 duplex_tools --statistics --import-order-style google --application-import-names duplex_tools
.PHONY: test
test: develop
${IN_VENV} && pip install pytest pytest-cov hypothesis
${IN_VENV} && pytest
.PHONY: clean
clean:
rm -rf dist build duplex_tools.egg-info pypi_build venv
.PHONY: build_env
build_env: pypi_build/bin/activate
IN_BUILD=. ./pypi_build/bin/activate
pypi_build/bin/activate:
test -d pypi_build || $(PYTHON) -m venv pypi_build --prompt "pypi"
${IN_BUILD} && pip install pip --upgrade
${IN_BUILD} && pip install --upgrade pip setuptools twine wheel readme_renderer[md]
.PHONY: sdist
sdist: pypi_build/bin/activate
${IN_BUILD} && python setup.py sdist