toxygen_wrapper/Makefile

62 lines
1.6 KiB
Makefile
Raw Normal View History

2024-02-02 04:14:37 +01:00
PREFIX=/usr/local
2024-02-05 14:11:36 +01:00
PYTHON_EXE_MSYS=${PREFIX}/bin/python3.sh
PIP_EXE_MSYS=${PREFIX}/bin/pip3.sh
2024-02-04 02:07:37 +01:00
iTEST_TIMEOUT=60
fSOCKET_TIMEOUT=15.0
2024-02-05 14:11:36 +01:00
PYTHON_MINOR=`python3 --version 2>&1 | sed -e 's@^.* @@' -e 's@\.[0-9]*$$@@'`
2023-12-15 15:24:07 +01:00
prepare::
bash .pylint.sh
check::
2024-02-02 04:14:37 +01:00
PYTHONPATH=$${PWD}/src pyanalyze \
2024-02-05 22:04:33 +01:00
src/toxygen_wrapper/tox.py src/toxygen_wrapper/tests/tests_wrapper.py \
2023-12-15 15:24:07 +01:00
> .pyanal.out 2>&1
install::
2024-02-05 14:11:36 +01:00
${PIP_EXE_MSYS} --python ${PYTHON_EXE_MSYS} install \
2024-02-24 15:36:08 +01:00
--no-deps \
2024-02-05 14:11:36 +01:00
--target ${PREFIX}/lib/python${PYTHON_MINOR}/site-packages/ \
--upgrade .
2024-02-24 15:36:08 +01:00
sed -i -e "1s@/usr/bin/python${PYTHON_MINOR}@${PYTHON_EXE_MSYS}@" \
${PREFIX}/lib/python${PYTHON_MINOR}/site-packages/bin/*
2024-02-02 04:14:37 +01:00
rsync::
bash .rsync.sh
2023-12-15 15:24:07 +01:00
2023-12-17 00:23:00 +01:00
help::
2024-02-02 04:14:37 +01:00
PYTHONPATH=$${PWD}/src \
2024-02-05 22:04:33 +01:00
$(PYTHON) src/toxygen_wrapper/tests/tests_wrapper.py --help
2023-12-17 00:23:00 +01:00
2024-02-19 13:45:23 +01:00
test:: test_proxy
2024-02-04 02:07:37 +01:00
test_direct::
2024-02-13 21:38:57 +01:00
cp -p ${HOME}/.config/tox/DHTnodes.json /tmp/toxygen_nodes.json||true
2024-02-02 04:14:37 +01:00
PYTHONPATH=$${PWD}/src \
2024-02-10 21:43:34 +01:00
TOR_CONTROLLER_PASSWORD=${PASS} \
2024-02-19 13:45:23 +01:00
$(PYTHON_EXE_MSYS) src/toxygen_wrapper/tests/tests_wrapper.py \
2024-02-10 21:43:34 +01:00
--norequest=True \
2024-02-05 08:50:00 +01:00
--socket_timeout=10.0 \
2024-02-04 02:07:37 +01:00
--test_timeout=${iTEST_TIMEOUT} \
--nodes_json=/tmp/toxygen_nodes.json \
--udp_enabled=True \
2024-02-10 21:43:34 +01:00
--trace_enabled=False --loglevel=10
2024-02-04 02:07:37 +01:00
test_proxy::
PYTHONPATH=$${PWD}/src \
2024-02-10 21:43:34 +01:00
TOR_CONTROLLER_PASSWORD=${PASS} \
2024-02-05 22:04:33 +01:00
${PYTHON_EXE_MSYS} src/toxygen_wrapper/tests/tests_wrapper.py \
2024-02-10 21:43:34 +01:00
--norequest=True \
2024-02-05 08:50:00 +01:00
--socket_timeout=15.0 \
2024-02-04 02:07:37 +01:00
--test_timeout=${iTEST_TIMEOUT} \
--proxy_host=127.0.0.1 \
--proxy_port=9050 \
--proxy_type=2 \
--nodes_json=$$HOME/.config/tox/DHTnodes.json \
2024-02-24 15:36:08 +01:00
--trace_enabled=False \
--loglevel=10
2023-12-15 15:24:07 +01:00
clean::
2024-02-05 22:04:33 +01:00
rm -f .[a-z]*~ *~ */*~ */*/*~
2023-12-15 15:24:07 +01:00
rm -rf *.egg-info