-
Notifications
You must be signed in to change notification settings - Fork 46
/
Makefile
95 lines (72 loc) · 2.03 KB
/
Makefile
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
.PHONY: install
install:
pip3 install --editable .
PYTHON_FILES=tarantool test setup.py docs/source/conf.py
TEXT_FILES=README.rst CHANGELOG.md docs/source/*.rst
.PHONY: lint
lint:
python3 -m pylint --recursive=y $(PYTHON_FILES)
python3 -m flake8 $(PYTHON_FILES)
codespell $(PYTHON_FILES) $(TEXT_FILES)
.PHONY: test
test: lint
python3 setup.py test
.PHONY: test-pure-install
test-pure-install:
TEST_PURE_INSTALL=true python3 -m unittest discover -v
.PHONY: testdata
testdata:
cd ./test/data/; ./generate.sh
.PHONY: coverage
coverage:
python3 -m coverage run -p --source=. setup.py test
.PHONY: cov-html
cov-html:
python3 -m coverage html -i
.PHONY: cov-report
cov-report:
python3 -m coverage report
.PHONY: docs
docs:
python3 setup.py build_sphinx
.PHONY: pip-sdist
pip-sdist:
python3 setup.py sdist --dist-dir=pip_dist
.PHONY: pip-bdist
pip-bdist:
python3 setup.py bdist_wheel --dist-dir=pip_dist
.PHONY: pip-dist
pip-dist: pip-sdist pip-bdist
.PHONY: pip-dist-check
pip-dist-check:
twine check pip_dist/*
.PHONY: rpm-dist
rpm-dist:
python3 setup.py sdist --dist-dir=rpm/SOURCES
rpmbuild -ba --define "_topdir `pwd`/rpm" rpm/SPECS/python-tarantool.spec
mkdir -p rpm_dist
mv rpm/SRPMS/*.rpm -t rpm_dist
mv rpm/RPMS/noarch/*.rpm -t rpm_dist
.PHONY: rpm-dist-check
rpm-dist-check:
rpm -K --nosignature rpm_dist/*.rpm
.PHONY: deb-changelog-entry
deb-changelog-entry:
DEBEMAIL=admin@tarantool.org dch --distribution unstable -b \
--package "python3-tarantool" \
--newversion $$(python3 setup.py --version) \
"Nightly build"
.PHONY: deb-dist
deb-dist:
dpkg-source -b .
dpkg-buildpackage -rfakeroot -us -uc
mkdir -p deb_dist
find .. -maxdepth 1 -type f -regex '.*/python3-tarantool_.*\.deb' \
-or -regex '.*/python3-tarantool_.*\.buildinfo' \
-or -regex '.*/python3-tarantool_.*\.changes' \
-or -regex '.*/python3-tarantool_.*\.dsc' \
-or -regex '.*/python3-tarantool_.*\.tar\.xz' \
| xargs -I {} mv {} deb_dist/
.PHONY: deb-dist-check
deb-dist-check:
dpkg -I deb_dist/*.deb