From 6f5bf110124ad0143066721c62970895d0efdb21 Mon Sep 17 00:00:00 2001 From: Tim Flink Date: May 16 2014 18:57:35 +0000 Subject: bumping release to 1.1.0 and adding makefile for building (s)rpms --- diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..d7970f9 --- /dev/null +++ b/Makefile @@ -0,0 +1,87 @@ +# +# Copyright 2013, Red Hat, Inc. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License along +# with this program; if not, write to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +# + +.PHONY: test test-ci pylint pep8 docs clean virtualenv + +# general variables +VENV=test_env +SRC=resultsdb_api + +# Variables used for packaging +SPECFILE=$(SRC).spec +BASEARCH:=$(shell uname -i) +DIST:=$(shell rpm --eval '%{dist}') +VERSION:=$(shell rpmspec -q --queryformat="%{VERSION}\n" $(SPECFILE) | uniq) +RELEASE:=$(subst $(DIST),,$(shell rpmspec -q --queryformat="%{RELEASE}\n" $(SPECFILE) | uniq)) +NVR:=$(SRC)-$(VERSION)-$(RELEASE) +GITBRANCH:=$(shell git rev-parse --abbrev-ref HEAD) +TARGETDIST:=fc20 +BUILDTARGET=fedora-20-x86_64 + +test: $(VENV) + sh -c "TEST='true' . $(VENV)/bin/activate; py.test --cov $(SRC) testing/; deactivate" + +test-ci: $(VENV) + sh -c "TEST='true' . $(VENV)/bin/activate; py.test --cov-report xml --cov $(SRC) testing/; deactivate" + +pylint: + pylint -f parseable $(SRC) | tee pylint.out + +pep8: + pep8 $(SRC)/*.py $(SRC)/*/*.py | tee pep8.out + +ci: test-ci pylint pep8 + +docs: + sphinx-build -b html -d docs/_build/doctrees docs/source docs/_build/html + +clean: + rm -rf dist + rm -rf resultsdb_api.egg-info + rm -rf build + rm -f pep8.out + rm -f pylint.out + +archive: $(SRC)-$(VERSION).tar.gz + +$(SRC)-$(VERSION).tar.gz: + git archive $(GITBRANCH) --prefix=$(SRC)-$(VERSION)/ | gzip -c9 > $@ + +mocksrpm: archive + mock -r $(BUILDTARGET) --buildsrpm --spec $(SPECFILE) --sources . + cp /var/lib/mock/$(BUILDTARGET)/result/$(NVR).$(TARGETDIST).src.rpm . + +mockbuild: mocksrpm + mock -r $(BUILDTARGET) --no-clean --rebuild $(NVR).$(TARGETDIST).src.rpm + cp /var/lib/mock/$(BUILDTARGET)/result/$(NVR).$(TARGETDIST).noarch.rpm . + +#kojibuild: mocksrpm +# koji build --scratch dist-6E-epel-testing-candidate $(NVR).$(TARGETDIST).src.rpm + +nvr: + @echo $(NVR) + +cleanvenv: + rm -rf $(VENV) + +virtualenv: $(VENV) + +$(VENV): + virtualenv --distribute --system-site-packages $(VENV) + sh -c ". $(VENV)/bin/activate; pip install --force-reinstall -r requirements.txt; deactivate" + diff --git a/resultsdb_api.spec b/resultsdb_api.spec index 27ddefe..b1cf697 100644 --- a/resultsdb_api.spec +++ b/resultsdb_api.spec @@ -4,7 +4,7 @@ %endif Name: resultsdb_api -Version: 1.0.2 +Version: 1.1.0 Release: 1%{?dist} Summary: Interface api to ResultsDB @@ -35,6 +35,9 @@ Interface api to ResultsDB %{python_sitelib}/*.egg-info %changelog +* Fri May 16 2014 Tim Flink - 1.1.0-1 +- Releasing resultsdb_api 1.1.0 + * Fri Apr 25 2014 Tim Flink - 1.0.2-1 - bugfixes from upstream diff --git a/setup.py b/setup.py index a5ff209..b48f872 100644 --- a/setup.py +++ b/setup.py @@ -21,7 +21,7 @@ from distutils.core import setup setup( name = 'resultsdb_api', py_modules = ['resultsdb_api'], - version = '1.0.2', + version = '1.1.0', description = 'Library for simplifying the communication with ResultsDB', author = 'Josef Skladanka', author_email = 'jskladan@redhat.com',