File python-django-jenkins.spec of Package python-django-jenkins
#
# spec file for package python-django-jenkins
#
# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
Name: python-django-jenkins
Version: 0.17.0
Release: 0
Url: https://github.com/kmmbvnr/django-jenkins
Summary: Plug and play continuous integration with django and jenkins
License: LGPL-3.0+
Group: Development/Languages/Python
Source: https://pypi.python.org/packages/source/d/django-jenkins/django-jenkins-%{version}.tar.gz
# PATCH-FIX-OPENSUSE remove-steps.patch -- disable tests for which we miss tools
Patch0: remove-steps.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%if 0%{?suse_version} != 1010 && 0%{?suse_version} != 1110 && 0%{?suse_version} != 1315
# SLES does not have chromedriver package
BuildRequires: chromedriver
%endif
BuildRequires: python-Django
BuildRequires: python-coverage
BuildRequires: python-devel
BuildRequires: python-flake8
BuildRequires: python-pep8
BuildRequires: python-pyflakes
BuildRequires: python-pylint
BuildRequires: python-pylint-django
BuildRequires: python-selenium
BuildRequires: python-setuptools
BuildRequires: xorg-x11-server
Requires: python-Django
Requires: python-coverage
Requires: python-flake8
Requires: python-pep8
Requires: python-pyflakes
Requires: python-pylint
Requires: python-selenium
%if 0%{?suse_version} && 0%{?suse_version} <= 1110
%{!?python_sitelib: %global python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
%else
BuildArch: noarch
%endif
%description
Plug and play continuous integration with Django and Jenkins.
%prep
%setup -q -n django-jenkins-%{version}
%patch0 -p1
%build
python setup.py build
%install
python setup.py install --prefix=%{_prefix} --root=%{buildroot}
%check
%if 0%{?suse_version} != 1010 && 0%{?suse_version} != 1110 && 0%{?suse_version} != 1315
# SLES does not have chromedriver package
export DISPLAY=:98
Xvfb $DISPLAY &
trap "kill $! || true" EXIT
export PATH=%{_libdir}/chromium:$PATH
python tests/manage.py \
jenkins \
--enable-coverage
%endif
%files
%defattr(-,root,root,-)
%doc LICENSE README.rst
%{python_sitelib}/*
%changelog