forked from KonishchevDmitry/object-validator
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Makefile
35 lines (25 loc) · 824 Bytes
/
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
.PHONY: build check install dist sources srpm rpm pypi clean
NAME = object-validator
RPM_NAME := python-$(NAME)
PYTHON := python
VERSION := $(shell sed -n s/[[:space:]]*Version:[[:space:]]*//p $(RPM_NAME).spec)
build:
$(PYTHON) setup.py build
check:
$(PYTHON) setup.py test
install:
$(PYTHON) setup.py install --skip-build $(INSTALL_FLAGS)
dist:
$(PYTHON) setup.py sdist
mv dist/$(NAME)-*.tar.gz .
sources:
@git archive --format=tar --prefix="$(NAME)-$(VERSION)/" \
$(shell git rev-parse --verify HEAD) | gzip > $(NAME)-$(VERSION).tar.gz
srpm: dist
rpmbuild -bs --define "_sourcedir $(CURDIR)" $(RPM_NAME).spec
rpm: dist
rpmbuild -ba --define "_sourcedir $(CURDIR)" $(RPM_NAME).spec
pypi: clean
$(PYTHON) setup.py sdist upload
clean:
rm -rf build dist $(NAME)-*.tar.gz object_validator.egg-info