-
Notifications
You must be signed in to change notification settings - Fork 49
Expand file tree
/
Copy pathMakefile
More file actions
41 lines (33 loc) · 1.15 KB
/
Copy pathMakefile
File metadata and controls
41 lines (33 loc) · 1.15 KB
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
format:
isort .
black .
test: install-dev-requirements docker-clickhouse
pytest tests.py --cov aiochclient -x -vv
tests: test
upload: build_cython
if [ -d dist ]; then rm -Rf dist; fi
python setup.py sdist
twine upload dist/*
check_format:
isort --check --diff
black . --check --diff --target-version py310
build_cython:
python setup.py build_ext --inplace
html_types:
cython -a aiochclient/_types.pyx
docker-clickhouse:
@n=0; until docker pull clickhouse/clickhouse-server; do \
n=$$((n+1)); \
if [ $$n -ge 5 ]; then echo "docker pull failed after 5 attempts" && exit 1; fi; \
echo "docker pull failed, retrying ($$n)..." && sleep 5; \
done
docker start cs 2>/dev/null || docker run -p 8123:8123 -d --name cs -e CLICKHOUSE_SKIP_USER_SETUP=1 clickhouse/clickhouse-server
@echo "Waiting for ClickHouse to become ready..."
@for i in $$(seq 1 60); do \
if curl -fs http://localhost:8123/ping | grep -q Ok; then echo "ClickHouse is ready"; exit 0; fi; \
sleep 1; \
done; \
echo "ClickHouse did not become ready in time" && exit 1
install-dev-requirements:
pip install twine
pip install -r dev-requirements/dev-requirements-cython-ciso.txt --upgrade