File: Makefile

package info (click to toggle)
lutris 0.5.8.3-2
  • links: PTS, VCS
  • area: contrib
  • in suites: bullseye
  • size: 3,260 kB
  • sloc: python: 24,151; makefile: 67; xml: 29; sh: 9
file content (102 lines) | stat: -rw-r--r-- 2,049 bytes parent folder | download
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
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

all:
	export GITBRANCH=master
	debuild
	debclean

build:
	gbp buildpackage --git-debian-branch=${GITBRANCH}

clean:
	debclean

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
	nosetests3

cover:
	rm tests/fixtures/pga.db -f
	rm tests/coverage/ -rf
	nosetests3 --with-coverage --cover-package=lutris --cover-html --cover-html-dir=tests/coverage

pgp-renew:
	osc signkey --extend home:strycore
	osc rebuildpac home:strycore --all

changelog-add:
	EDITOR=vim dch -i

changelog-edit:
	EDITOR=vim dch -e

upload:
	scp build/lutris_${VERSION}.tar.xz anaheim:~/volumes/releases/

upload-ppa:
	dput ppa:lutris-team/lutris build/lutris_${VERSION}*_source.changes

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) install --dev $(PIPENV_LOCK_ARGS) --python $(PYTHON)

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  ## Format code

isort:
	$(PIPENV) run isort -y -rc lutris

autopep8:
	$(PIPENV) run autopep8 --in-place --recursive --ignore E402 setup.py lutris


# ===============
# Static analysis
# ===============

check: isort-check flake8 pylint

isort-check:
	$(PIPENV) run isort -c -rc lutris

flake8:
	$(PIPENV) run flake8 lutris

pylint:
	$(PIPENV) run pylint --rcfile=.pylintrc --output-format=colorized lutris

# =============
# Abbreviations
# =============

sc: style check
req: requirements
styles: style
checks: check