Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -75,3 +75,6 @@ target/

# poetry lock file - for libraries only
poetry.lock

# Installation tracking file
.install.stamp
11 changes: 7 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,24 +1,27 @@
.PHONY: all clean poetry test dist testrelease release

INSTALL_STAMP := .install.stamp
POETRY := $(shell command -v poetry 2> /dev/null)

all: test

clean:
@find . -name \*.pyc -delete
@find . -name __pycache__ -delete
@rm -fr .cache/ .coverage .pytest_cache/ *.egg-info/ dist/ htmlcov/
@rm -fr $(INSTALL_STAMP) .cache/ .coverage .pytest_cache/ *.egg-info/ dist/ htmlcov/

poetry.lock pytest_socket.egg-info/ :
install: $(INSTALL_STAMP)
$(INSTALL_STAMP): pyproject.toml poetry.lock
ifndef POETRY
$(error "poetry is not available, please install it first.")
endif
@poetry install
@touch $(INSTALL_STAMP)

test: pytest_socket.egg-info/
test: $(INSTALL_STAMP)
@poetry run pytest

dist: clean poetry.lock
dist: clean $(INSTALL_STAMP)
@poetry build

testrelease: dist
Expand Down