-
Notifications
You must be signed in to change notification settings - Fork 103
/
Makefile
42 lines (28 loc) · 861 Bytes
/
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
MODULE_NAME=mara_pipelines
all:
# builds virtual env. and starts install in it
make .venv/bin/python
make install
install:
# install of module
.venv/bin/pip install .
test:
make .venv/bin/python
# test of module
.venv/bin/pip install .[test]
.venv/bin/pytest -m "not postgres_db and not mssql_db"
.venv/bin/pytest -m postgres_db
.venv/bin/pytest -m mssql_db
publish:
# manually publishing the package
.venv/bin/pip install build twine
.venv/bin/python -m build
.venv/bin/twine upload dist/*
clean:
# clean up
rm -rf .venv/ build/ dist/ ${MODULE_NAME}.egg-info/ .pytest_cache/ .eggs/
.PYTHON3:=$(shell PATH='$(subst $(CURDIR)/.venv/bin:,,$(PATH))' which python3)
.venv/bin/python:
mkdir -p .venv
cd .venv && $(.PYTHON3) -m venv --copies --prompt='[$(shell basename `pwd`)/.venv]' .
.venv/bin/python -m pip install --upgrade pip