lutris/Makefile

115 lines
2.5 KiB
Makefile
Raw Normal View History

VERSION=`grep "__version__" lutris/__init__.py | cut -d" " -f 3 | sed 's|"\(.*\)"|\1|'`
GITBRANCH ?= master
PIPENV:=pipenv
PYTHON:=$(shell which python3)
PIP:=$(PYTHON) -m pip
PIPENV_LOCK_ARGS:= --deploy --ignore-pipfile
2014-02-08 18:21:00 +00:00
all:
export GITBRANCH=master
debuild
debclean
2013-06-26 10:11:21 +00:00
build:
2018-07-29 22:01:51 +00:00
gbp buildpackage --git-debian-branch=${GITBRANCH}
2013-06-26 12:17:43 +00:00
clean:
debclean
2013-06-29 16:49:29 +00:00
build-source: clean
gbp buildpackage -S --git-debian-branch=${GITBRANCH}
mkdir build
mv ../lutris_${VERSION}* build
release: build-source upload upload-ppa
test:
rm tests/fixtures/pga.db -f
2020-04-24 23:29:24 +00:00
nosetests3
flake8 lutris
2013-06-29 16:49:29 +00:00
cover:
rm tests/fixtures/pga.db -f
rm tests/coverage/ -rf
2020-04-24 23:29:24 +00:00
nosetests3 --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
changelog-add:
dch -i
changelog-edit:
dch -e
upload:
scp build/lutris_${VERSION}.tar.xz lutris.net:/srv/releases/
2019-04-04 10:22:52 +00:00
upload-ppa:
dput ppa:lutris-team/lutris build/lutris_${VERSION}*_source.changes
2019-04-04 10:42:30 +00:00
upload-staging:
dput --force ppa:lutris-team/lutris-staging build/lutris_${VERSION}*_source.changes
snap:
snapcraft clean lutris -s pull
snapcraft
dev:
$(PIP) install --user --upgrade pipenv
@$(pipenv --venv)
# Do not use destructive "--python" or "--three" option if the venv already exists
# See https://github.com/pypa/pipenv/issues/349
@if [ $$? -eq 0 ]; then \
echo "$(PIPENV) install --dev $(PIPENV_LOCK_ARGS)" ; \
$(PIPENV) install --dev $(PIPENV_LOCK_ARGS) ; \
else \
echo "$(PIPENV) install --dev $(PIPENV_LOCK_ARGS) --python $(PYTHON)" ; \
$(PIPENV) install --dev $(PIPENV_LOCK_ARGS) --python $(PYTHON) ; \
fi
requirements:
# Generate new requirements.txt and requirements-dev.txt based on Pipfile.lock
# These files are needed by Travis CI
$(PIPENV) run pipenv_to_requirements -f
# ============
# Style checks
# ============
style: isort autopep8 yapf ## Format code
isort:
$(PIPENV) run isort -y -rc lutris
autopep8:
$(PIPENV) run autopep8 --in-place --recursive --ignore E402 setup.py lutris
yapf:
$(PIPENV) run yapf --style .yapf --recursive -i lutris
# ===============
# Static analysis
# ===============
check: isort-check yapf-check flake8 pylint
isort-check:
$(PIPENV) run isort -c -rc lutris
yapf-check:
$(PIPENV) run yapf --style .yapf --recursive --diff lutris
flake8:
$(PIPENV) run flake8 lutris
pylint:
$(PIPENV) run pylint --rcfile=.pylintrc --output-format=colorized lutris
# =============
# Abbreviations
# =============
sc: style check