File python-hacking.spec of Package python-hacking
#
# spec file for package python-hacking
#
# 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-hacking
Version: 0.10.1
Release: 0
Summary: OpenStack Hacking Guidline Enforcement
License: Apache-2.0
Group: Development/Languages/Python
Url: http://github.com/openstack-dev/hacking
Source: http://pypi.python.org/packages/source/h/hacking/hacking-%{version}.tar.gz
Patch0: relax_requirements.patch
BuildRequires: python-devel
BuildRequires: python-pbr
# Test requirements:
BuildRequires: python-coverage >= 3.6
%if 0%{?suse_version} <= 1110
BuildRequires: python-discover
%endif
BuildRequires: python-fixtures >= 0.3.14
BuildRequires: python-flake8 >= 2.2.4
BuildRequires: python-mock >= 1.0
BuildRequires: python-python-subunit >= 0.0.18
BuildRequires: python-six >= 1.7.0
BuildRequires: python-testrepository >= 0.0.18
BuildRequires: python-testscenarios >= 0.4
BuildRequires: python-testtools >= 0.9.36
Requires: python-flake8 >= 2.2.4
Requires: python-mccabe >= 0.2.1
Requires: python-pbr >= 0.6
Requires: python-pep8 >= 1.5.7
Requires: python-pyflakes >= 0.8.1
Requires: python-six >= 1.7.0
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%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
hacking is a set of flake8 plugins that test and enforce the OpenStack
Style Guidlines.
Most of the additional style guidelines that OpenStack has taken on came from
the Google Python Style Guide.
%prep
%setup -q -n hacking-%{version}
%patch0 -p1
%build
python setup.py build
%install
python setup.py install --prefix=%{_prefix} --root=%{buildroot}
%check
testr init && testr run
%files
%defattr(-,root,root,-)
%doc ChangeLog README.rst AUTHORS LICENSE
%{python_sitelib}/*
%changelog