LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File home-assistant.spec of Package home-assistant (Project home:adrianSuSE)

#
# spec file for package python-sybil
#
# Copyright (c) 2017 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/
#


%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%bcond_without test
%define skip_python2 1
Name:           home-assistant
Version:        1.0.5
Release:        0
Summary:        Automated testing for the examples in your documentation
License:        MIT
Group:          Development/Languages/Python
Url:            https://github.com/cjw296/sybil
Source:         home-assistant-%{version}.tar.xz
BuildRequires:  %{python_module aiohttp}
BuildRequires:  %{python_module devel}
BuildRequires:  %{python_module Jinja2}
BuildRequires:  %{python_module PyYAML}
BuildRequires:  %{python_module pytz}
BuildRequires:  %{python_module requests}
BuildRequires:  %{python_module setuptools}
BuildRequires:  %{python_module typing}
BuildRequires:  %{python_module virtualenv}
BuildRequires:  %{python_module voluptuous}
BuildRequires:  fdupes
BuildRequires:  python-rpm-macros
BuildArch:      noarch

%python_subpackages

%description

%prep
%setup -q -n home-assistant-%{version}

%build
%python_build

%install
%python_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}

%if %{with test}
%check
sed -i -e "s/'coveralls'/'python-coveralls'/" setup.py
%{python_expand virtualenv-%$python_bin_suffix --system-site-packages --no-download testvenv-%$python_bin_suffix
testvenv-%$python_bin_suffix/bin/pip install -e .[test,build]
export PYTHONPATH=$PWD/testvenv-%$python_bin_suffix/lib/python%$python_bin_suffix/site-packages/:$PWD
testvenv-%$python_bin_suffix/bin/python -m pytest && rm -Rf testvenv-%$python_bin_suffix
}
%endif

%files %{python_files}
%defattr(-,root,root,-)
%doc README.rst
%{python_sitelib}/*

%changelog