diff options
| author | Scott Bahling <sbahling@suse.com> | 2020-09-07 17:32:16 +0200 |
|---|---|---|
| committer | Scott Bahling <sbahling@suse.com> | 2020-09-07 17:32:16 +0200 |
| commit | 688a043ea015d2d66b92c4fd96fc3aa5a90b8f99 (patch) | |
| tree | e216b97b5cfe557d80b896a68ea6223f721f73e4 /Makefile | |
| parent | 227641df0c5e5f8425215e7cd9f6bcda946ce443 (diff) | |
| download | obsapi-688a043ea015d2d66b92c4fd96fc3aa5a90b8f99.tar.gz obsapi-688a043ea015d2d66b92c4fd96fc3aa5a90b8f99.tar.xz obsapi-688a043ea015d2d66b92c4fd96fc3aa5a90b8f99.zip | |
Update versioneer and packaging build configsobsapi-0.2.0
Diffstat (limited to 'Makefile')
| -rwxr-xr-x | Makefile | 32 |
1 files changed, 13 insertions, 19 deletions
@@ -4,24 +4,18 @@ # location of rpm source files. We use dist automatically # created by python distutils command DISTDIR = ./dist -# determine current package version -RELEASE = $(shell git describe --tags --dirty --always) -TARFILE = $(DISTDIR)/$(RELEASE).tar.bz2 -PREFIX = $(shell echo $(RELEASE) | cut -d '-' -f 1) -GITVERSION = $(shell echo $(RELEASE) | cut -d '-' -f 2-) +GITVERSION = $(shell git describe --tags --dirty --always) +PREFIX = $(shell echo $(GITVERSION) | cut -d '-' -f 1) SPECFILE = $(DISTDIR)/python-$(PREFIX).spec -# -# Replace '-' with '_' in version to be rpm compatible -# This version is used in the spec file for the rpm -# version. The rpm version string will be different from -# the actual package version string. This will only be the -# case for git snapshot releases. Official releases based -# on git tagged version will have matching program/rpm version -# strings. -VERSION = $(shell echo $(GITVERSION) | tr '-' '_') +VERSION = $(shell python3 setup.py --version) +TARFILE = $(DISTDIR)/$(VERSION).tar.bz2 .PHONY : clean +python = /usr/bin/python3 + +.PHONY: all test clean + all: $(SPECFILE) info: @@ -35,16 +29,16 @@ changelog: git log > ChangeLog $(TARFILE): changelog - python setup.py sdist --formats=bztar + $(python) setup.py sdist --formats=bztar $(SPECFILE): $(TARFILE) - cat ./spec/python-obsapi.spec.tmpl | sed "s/__version__/$(VERSION)/g" | sed "s/__gitversion__/$(GITVERSION)/g" > $(SPECFILE) + cat ./spec/python-obsapi.spec.tmpl | sed "s/__version__/$(VERSION)/g" > $(SPECFILE) install: - python setup.py install --verbose + $(python) setup.py install --verbose uninstall: - python setup.py uninstall --verbose + $(python) setup.py uninstall --verbose test: - python setup.py test + $(python) setup.py test |
