forked from avocado-framework/avocado-vt
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
80 lines (68 loc) · 3.23 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
ifndef PYTHON
PYTHON=$(shell which python3 2>/dev/null || which python2 2>/dev/null || which python 2>/dev/null)
endif
VERSION=$(shell $(PYTHON) setup.py --version 2>/dev/null)
PYTHON_DEVELOP_ARGS=$(shell if ($(PYTHON) setup.py develop --help 2>/dev/null | grep -q '\-\-user'); then echo "--user"; else echo ""; fi)
DESTDIR=/
AVOCADO_DIRNAME?=avocado
RELEASE_COMMIT=$(shell git log --abbrev=8 --pretty=format:'%H' -n 1 $(VERSION))
RELEASE_SHORT_COMMIT=$(shell git log --abbrev=8 --pretty=format:'%h' -n 1 $(VERSION))
COMMIT=$(shell git log --abbrev=8 --pretty=format:'%H' -n 1)
COMMIT_DATE=$(shell git log --pretty='format:%cd' --date='format:%Y%m%d' -n 1)
SHORT_COMMIT=$(shell git log --abbrev=8 --pretty=format:'%h' -n 1)
MOCK_CONFIG=default
ARCHIVE_BASE_NAME=avocado-vt
RPM_BASE_NAME=avocado-plugins-vt
all:
@echo
@echo "Development related targets:"
@echo "check: Runs tree static check, unittests and fast functional tests"
@echo "develop: Runs 'python setup.py --develop' on this tree alone"
@echo "link: Runs 'python setup.py --develop' in all subprojects and links the needed resources"
@echo "clean: Get rid of scratch, byte files and removes the links to other subprojects"
@echo "unlink: Disables egg links and unlinks needed resources"
@echo
@echo "Platform independent distribution/installtion related targets:"
@echo "source: Create source package"
@echo "install: Install on local system"
@echo
@echo "RPM related targets:"
@echo "srpm: Generate a source RPM package (.srpm)"
@echo "rpm: Generate binary RPMs"
@echo
@echo "Release related targets:"
@echo "source-release: Create source package for the latest tagged release"
@echo "srpm-release: Generate a source RPM package (.srpm) for the latest tagged release"
@echo "rpm-release: Generate binary RPMs for the latest tagged release"
@echo
include Makefile.include
requirements: pip
- $(PYTHON) -m pip install -r requirements.txt
check:
inspekt checkall --disable-lint W,R,C,E1002,E1101,E1103,E1120,F0401,I0011,E1003,W605 --disable-style W605,W606,E501,E265,W601,E402,E722,E741 --exclude avocado-libs,scripts/github --no-license-check
pylint --errors-only --disable=all --enable=spelling --spelling-dict=en_US --spelling-private-dict-file=spell.ignore *
clean:
$(PYTHON) setup.py clean
develop:
$(PYTHON) setup.py develop $(PYTHON_DEVELOP_ARGS)
link: develop
unlink:
$(PYTHON) setup.py develop --uninstall $(PYTHON_DEVELOP_ARGS)
# For compatibility reasons remove old symlinks
for NAME in $$(ls -1 avocado_vt/conf.d); do\
CONF="etc/avocado/conf.d/$$NAME";\
[ -L ../$(AVOCADO_DIRNAME)/avocado/$$CONF ] && rm -f ../$(AVOCADO_DIRNAME)/avocado/$$CONF || true;\
[ -L ../$(AVOCADO_DIRNAME)/$$CONF ] && rm -f ../$(AVOCADO_DIRNAME)/$$CONF || true;\
done
pypi: clean
if test ! -d PYPI_UPLOAD; then mkdir PYPI_UPLOAD; fi
$(PYTHON) setup.py bdist_wheel -d PYPI_UPLOAD
$(PYTHON) setup.py sdist -d PYPI_UPLOAD
@echo
@echo "Please use the files on PYPI_UPLOAD dir to upload a new version to PyPI"
@echo "The URL to do that may be a bit tricky to find, so here it is:"
@echo " https://pypi.python.org/pypi?%3Aaction=submit_form"
@echo
@echo "Alternatively, you can also run a command like: "
@echo " twine upload -u <PYPI_USERNAME> PYPI_UPLOAD/*.{tar.gz,whl}"
@echo