2018-11-07 10:48:57 +00:00
|
|
|
VERSION=`grep "__version__" lutris/__init__.py | cut -d" " -f 3 | sed 's|"\(.*\)"|\1|'`
|
2020-04-15 01:50:20 +00:00
|
|
|
GITBRANCH ?= master
|
2020-04-26 12:12:50 +00:00
|
|
|
PYTHON:=$(shell which python3)
|
|
|
|
PIP:=$(PYTHON) -m pip
|
2014-02-08 18:21:00 +00:00
|
|
|
|
2019-12-27 14:19:55 +00:00
|
|
|
all:
|
|
|
|
export GITBRANCH=master
|
|
|
|
debuild
|
|
|
|
debclean
|
2013-06-26 10:11:21 +00:00
|
|
|
|
2019-12-27 14:19:55 +00:00
|
|
|
build:
|
2018-07-29 22:01:51 +00:00
|
|
|
gbp buildpackage --git-debian-branch=${GITBRANCH}
|
2013-06-26 12:08:49 +00:00
|
|
|
|
2013-06-26 12:17:43 +00:00
|
|
|
clean:
|
|
|
|
debclean
|
2013-06-29 16:49:29 +00:00
|
|
|
|
2020-04-15 01:50:20 +00:00
|
|
|
build-source: clean
|
|
|
|
gbp buildpackage -S --git-debian-branch=${GITBRANCH}
|
|
|
|
mkdir build
|
|
|
|
mv ../lutris_${VERSION}* build
|
|
|
|
|
|
|
|
release: build-source upload upload-ppa
|
|
|
|
|
2019-12-27 14:19:55 +00:00
|
|
|
test:
|
|
|
|
rm tests/fixtures/pga.db -f
|
2021-12-14 04:13:46 +00:00
|
|
|
nose2
|
2013-06-29 16:49:29 +00:00
|
|
|
|
|
|
|
|
2019-12-27 14:19:55 +00:00
|
|
|
cover:
|
|
|
|
rm tests/fixtures/pga.db -f
|
|
|
|
rm tests/coverage/ -rf
|
2021-12-14 04:13:46 +00:00
|
|
|
nose2 --with-coverage --cover-package=lutris --cover-html --cover-html-dir=tests/coverage
|
2017-01-14 19:45:59 +00:00
|
|
|
|
|
|
|
|
|
|
|
pgp-renew:
|
|
|
|
osc signkey --extend home:strycore
|
|
|
|
osc rebuildpac home:strycore --all
|
2017-03-24 22:35:51 +00:00
|
|
|
|
2019-12-27 14:19:55 +00:00
|
|
|
changelog-add:
|
2020-07-18 22:50:28 +00:00
|
|
|
EDITOR=vim dch -i
|
2019-12-27 14:19:55 +00:00
|
|
|
|
|
|
|
changelog-edit:
|
2020-07-18 22:50:28 +00:00
|
|
|
EDITOR=vim dch -e
|
2019-12-27 14:19:55 +00:00
|
|
|
|
|
|
|
upload:
|
2020-07-04 18:37:40 +00:00
|
|
|
scp build/lutris_${VERSION}.tar.xz anaheim:~/volumes/releases/
|
2019-04-04 10:22:52 +00:00
|
|
|
|
2019-07-10 02:20:56 +00:00
|
|
|
upload-ppa:
|
|
|
|
dput ppa:lutris-team/lutris build/lutris_${VERSION}*_source.changes
|
|
|
|
|
2019-04-04 10:42:30 +00:00
|
|
|
upload-staging:
|
2019-04-04 22:11:35 +00:00
|
|
|
dput --force ppa:lutris-team/lutris-staging build/lutris_${VERSION}*_source.changes
|
2019-12-27 14:19:55 +00:00
|
|
|
|
|
|
|
snap:
|
|
|
|
snapcraft clean lutris -s pull
|
|
|
|
snapcraft
|
2020-04-26 12:12:50 +00:00
|
|
|
|
|
|
|
dev:
|
- Replaced pipenv with poetry
- Updated min version check in setup.py to Python 3.6
- Updated isort config file and calls to align with v5.x
- Added init-hook for gi imports in .pylintrc to avoid invalid no-member issues
- Makefile: added lock, show-tree, bandit, black, mypy; updated test, cover, dev, isort, autopep8, check, isort-check, flake8, pylint; removed req, requirements;
- Updated .travis.yml to use poetry and make
- Added my email in AUTHORS
- Updated CONTRIBUTING.md
- Updated lint_python.yml to use poetry and make, reorganized instructions to have all install related steps first
- sorted imports: lutris, lutris-wrapper, cleanup_prefix.py and multiple files in tests dir
2021-10-24 18:42:06 +00:00
|
|
|
$(PIP) install --user --upgrade poetry
|
|
|
|
poetry install --no-root --remove-untracked
|
2020-04-26 12:12:50 +00:00
|
|
|
|
- Replaced pipenv with poetry
- Updated min version check in setup.py to Python 3.6
- Updated isort config file and calls to align with v5.x
- Added init-hook for gi imports in .pylintrc to avoid invalid no-member issues
- Makefile: added lock, show-tree, bandit, black, mypy; updated test, cover, dev, isort, autopep8, check, isort-check, flake8, pylint; removed req, requirements;
- Updated .travis.yml to use poetry and make
- Added my email in AUTHORS
- Updated CONTRIBUTING.md
- Updated lint_python.yml to use poetry and make, reorganized instructions to have all install related steps first
- sorted imports: lutris, lutris-wrapper, cleanup_prefix.py and multiple files in tests dir
2021-10-24 18:42:06 +00:00
|
|
|
lock:
|
|
|
|
# Update poetry.lock with packages and versions based on current pyproject.toml settings
|
|
|
|
poetry update --lock
|
2020-04-26 12:12:50 +00:00
|
|
|
|
- Replaced pipenv with poetry
- Updated min version check in setup.py to Python 3.6
- Updated isort config file and calls to align with v5.x
- Added init-hook for gi imports in .pylintrc to avoid invalid no-member issues
- Makefile: added lock, show-tree, bandit, black, mypy; updated test, cover, dev, isort, autopep8, check, isort-check, flake8, pylint; removed req, requirements;
- Updated .travis.yml to use poetry and make
- Added my email in AUTHORS
- Updated CONTRIBUTING.md
- Updated lint_python.yml to use poetry and make, reorganized instructions to have all install related steps first
- sorted imports: lutris, lutris-wrapper, cleanup_prefix.py and multiple files in tests dir
2021-10-24 18:42:06 +00:00
|
|
|
show-tree:
|
|
|
|
# Show a tree of installed packages and their dependencies
|
|
|
|
poetry show --tree
|
2020-04-26 12:12:50 +00:00
|
|
|
|
|
|
|
# ============
|
|
|
|
# Style checks
|
|
|
|
# ============
|
|
|
|
|
2020-05-06 19:55:58 +00:00
|
|
|
style: isort autopep8 ## Format code
|
2020-04-26 12:12:50 +00:00
|
|
|
|
|
|
|
isort:
|
- Replaced pipenv with poetry
- Updated min version check in setup.py to Python 3.6
- Updated isort config file and calls to align with v5.x
- Added init-hook for gi imports in .pylintrc to avoid invalid no-member issues
- Makefile: added lock, show-tree, bandit, black, mypy; updated test, cover, dev, isort, autopep8, check, isort-check, flake8, pylint; removed req, requirements;
- Updated .travis.yml to use poetry and make
- Added my email in AUTHORS
- Updated CONTRIBUTING.md
- Updated lint_python.yml to use poetry and make, reorganized instructions to have all install related steps first
- sorted imports: lutris, lutris-wrapper, cleanup_prefix.py and multiple files in tests dir
2021-10-24 18:42:06 +00:00
|
|
|
poetry run isort lutris
|
2020-04-26 12:12:50 +00:00
|
|
|
|
|
|
|
autopep8:
|
- Replaced pipenv with poetry
- Updated min version check in setup.py to Python 3.6
- Updated isort config file and calls to align with v5.x
- Added init-hook for gi imports in .pylintrc to avoid invalid no-member issues
- Makefile: added lock, show-tree, bandit, black, mypy; updated test, cover, dev, isort, autopep8, check, isort-check, flake8, pylint; removed req, requirements;
- Updated .travis.yml to use poetry and make
- Added my email in AUTHORS
- Updated CONTRIBUTING.md
- Updated lint_python.yml to use poetry and make, reorganized instructions to have all install related steps first
- sorted imports: lutris, lutris-wrapper, cleanup_prefix.py and multiple files in tests dir
2021-10-24 18:42:06 +00:00
|
|
|
poetry run autopep8 --in-place --recursive --ignore E402 setup.py lutris
|
2020-04-26 12:12:50 +00:00
|
|
|
|
|
|
|
|
|
|
|
# ===============
|
|
|
|
# Static analysis
|
|
|
|
# ===============
|
|
|
|
|
2020-05-06 19:55:58 +00:00
|
|
|
check: isort-check flake8 pylint
|
2020-04-26 12:12:50 +00:00
|
|
|
|
|
|
|
isort-check:
|
- Replaced pipenv with poetry
- Updated min version check in setup.py to Python 3.6
- Updated isort config file and calls to align with v5.x
- Added init-hook for gi imports in .pylintrc to avoid invalid no-member issues
- Makefile: added lock, show-tree, bandit, black, mypy; updated test, cover, dev, isort, autopep8, check, isort-check, flake8, pylint; removed req, requirements;
- Updated .travis.yml to use poetry and make
- Added my email in AUTHORS
- Updated CONTRIBUTING.md
- Updated lint_python.yml to use poetry and make, reorganized instructions to have all install related steps first
- sorted imports: lutris, lutris-wrapper, cleanup_prefix.py and multiple files in tests dir
2021-10-24 18:42:06 +00:00
|
|
|
poetry run isort lutris -c
|
2020-04-26 12:12:50 +00:00
|
|
|
|
|
|
|
flake8:
|
2022-03-16 04:10:33 +00:00
|
|
|
poetry run flake8 . --count --max-complexity=25 --max-line-length=120 --show-source --statistics
|
2020-04-26 12:12:50 +00:00
|
|
|
|
|
|
|
pylint:
|
- Replaced pipenv with poetry
- Updated min version check in setup.py to Python 3.6
- Updated isort config file and calls to align with v5.x
- Added init-hook for gi imports in .pylintrc to avoid invalid no-member issues
- Makefile: added lock, show-tree, bandit, black, mypy; updated test, cover, dev, isort, autopep8, check, isort-check, flake8, pylint; removed req, requirements;
- Updated .travis.yml to use poetry and make
- Added my email in AUTHORS
- Updated CONTRIBUTING.md
- Updated lint_python.yml to use poetry and make, reorganized instructions to have all install related steps first
- sorted imports: lutris, lutris-wrapper, cleanup_prefix.py and multiple files in tests dir
2021-10-24 18:42:06 +00:00
|
|
|
poetry run pylint lutris --rcfile=.pylintrc --output-format=colorized
|
|
|
|
|
|
|
|
bandit:
|
|
|
|
poetry run bandit . --recursive --skip B101,B105,B107,B108,B303,B310,B311,B314,B320,B404,B405,B410,B602,B603,B607,B608
|
|
|
|
|
|
|
|
black:
|
|
|
|
poetry run black . --check
|
|
|
|
|
|
|
|
mypy:
|
|
|
|
poetry run mypy . --ignore-missing-imports --install-types --non-interactive
|
2020-04-26 12:12:50 +00:00
|
|
|
|
|
|
|
# =============
|
|
|
|
# Abbreviations
|
|
|
|
# =============
|
|
|
|
|
|
|
|
sc: style check
|
2020-04-26 16:37:06 +00:00
|
|
|
styles: style
|
|
|
|
checks: check
|