File python-mox3.spec of Package python-mox3
#
# spec file for package python-mox3
#
# Copyright (c) 2018 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/
#
%global pypi_name mox3
Name: python-mox3
Version: 0.26.0
Release: 0
Summary: An unofficial port of the Google mox framework to Python 3
License: Apache-2.0
Group: Development/Languages/Python
URL: https://bugs.launchpad.net/python-mox3
Source0: https://files.pythonhosted.org/packages/source/m/%{pypi_name}/%{pypi_name}-%{version}.tar.gz
Patch0001: 0001-add-python-3.6-unit-test-job.patch
BuildRequires: openstack-macros
BuildRequires: python2-coverage
BuildRequires: python2-fixtures >= 3.0.0
BuildRequires: python2-pbr >= 2.0.0
BuildRequires: python2-python-subunit
BuildRequires: python2-setuptools
BuildRequires: python2-stestr
BuildRequires: python2-testtools
BuildRequires: python3-coverage
BuildRequires: python3-fixtures >= 3.0.0
BuildRequires: python3-pbr >= 2.0.0
BuildRequires: python3-python-subunit
BuildRequires: python3-setuptools
BuildRequires: python3-stestr
BuildRequires: python3-testtools
Requires: python-fixtures >= 3.0.0
Requires: python-pbr >= 2.0.0
BuildArch: noarch
%ifpython3
BuildRequires: python3-dbm
%endif
%python_subpackages
%description
Mox3 is an unofficial port of the Google mox framework to Python 3. It
was meant to be as compatible with mox as possible, but small
enhancements have been made. The library was tested on Python version
3.2, 2.7 and 2.6.
%package -n python-mox3-doc
Summary: Documentation for %{name}
Group: Documentation/HTML
BuildRequires: python-Sphinx
BuildRequires: python-openstackdocstheme
%description -n python-mox3-doc
Mox3 is an unofficial port of the Google mox framework to Python 3. It
was meant to be as compatible with mox as possible, but small
enhancements have been made. The library was tested on Python version
3.2, 2.7 and 2.6.
This package contains documentation in HTML format.
%prep
%autosetup -p1 -n %{pypi_name}-%{version}
%py_req_cleanup
sed -i 's/^warning-is-error.*/warning-is-error = 0/g' setup.cfg
%build
%python_build
# generate html docs
%{__python2} setup.py build_sphinx
%check
%python_exec -m stestr.cli run
%install
%python_install
%files %{python_files}
%license COPYING.txt
%doc README.rst
%{python2_sitelib}/%{pypi_name}
%{python2_sitelib}/%{pypi_name}-*.egg-info
%files -n python-mox3-doc
%license COPYING.txt
%doc doc/build/html
%changelog