qweechat/Makefile

56 lines
1.6 KiB
Makefile
Raw Normal View History

2021-11-13 16:50:21 +01:00
#
2022-01-12 23:52:09 +01:00
# Copyright (C) 2021-2022 Sébastien Helleu <flashcode@flashtux.org>
2021-11-13 16:50:21 +01:00
#
# This file is part of QWeeChat, a Qt remote GUI for WeeChat.
#
# QWeeChat is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# QWeeChat is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with QWeeChat. If not, see <http://www.gnu.org/licenses/>.
#
2024-02-11 08:50:55 +01:00
# to run the tests, run make PASS=controllerpassword test
PREFIX=/usr/local
PYTHON_EXE_MSYS=${PREFIX}/bin/python3.sh
PIP_EXE_MSYS=${PREFIX}/bin/pip3.sh
LOCAL_DOCTEST=${PREFIX}/bin/toxcore_run_doctest3.bash
DOCTEST=${LOCAL_DOCTEST}
PYTHON_MINOR=`python3 --version 2>&1 | sed -e 's@^.* @@' -e 's@\.[0-9]*$$@@'`
MOD=qweechat
2021-11-13 16:50:21 +01:00
all: check
2024-02-13 23:48:08 +01:00
check::
2024-02-11 08:50:55 +01:00
sh ${PYTHON_EXE_MSYS} -c "import ${MOD}"
2024-02-13 23:48:08 +01:00
sh ${PYTHON_EXE_MSYS} -c "from ${MOD} import config"
2021-11-13 16:50:21 +01:00
2024-02-11 08:50:55 +01:00
lint:: flake8 pylint bandit
2021-11-13 16:50:21 +01:00
flake8:
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
flake8 . --count --exit-zero --max-complexity=10 --statistics
pylint:
pylint qweechat
bandit:
bandit -r qweechat
2024-02-11 08:50:55 +01:00
2024-02-13 19:59:07 +01:00
rsync::
bash .rsync.sh
2024-02-11 08:50:55 +01:00
install::
# we install --nodeps because pip is installing stuff we already have in the OS
2024-02-13 19:59:07 +01:00
${PIP_EXE_MSYS} --python ${PYTHON_EXE_MSYS} install \
--no-deps \
--target ${PREFIX}/lib/python${PYTHON_MINOR}/site-packages/ \
--upgrade .