# # 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 https://bugs.opensuse.org/ # %{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-mox3 Version: 0.26.0 Release: 1.1 Summary: An unofficial port of the Google mox framework to Python 3 License: Apache-2.0 Group: Development/Languages/Python Url: http://bugs.launchpad.net/python-mox3 Source0: https://files.pythonhosted.org/packages/source/m/mox3/mox3-%{version}.tar.gz BuildRequires: %{python_module fixtures >= 3.0.0} BuildRequires: %{python_module pbr >= 2.0.0} BuildRequires: %{python_module setuptools >= 16.0} BuildRequires: fdupes BuildRequires: openstack-macros BuildRequires: python-rpm-macros # SECTION documentation requirements BuildRequires: python3-Sphinx >= 1.6.5 BuildRequires: python3-openstackdocstheme >= 1.18.1 # /SECTION # SECTION test requirements BuildRequires: %{python_module python-subunit >= 1.0.0} BuildRequires: %{python_module six >= 1.10.0} BuildRequires: %{python_module stestr >= 2.0.0} BuildRequires: %{python_module testrepository >= 0.0.18} BuildRequires: %{python_module testtools >= 2.2.0} BuildRequires: %{python_module unittest2} # /SECTION Requires: python-fixtures >= 3.0.0 Requires: python-pbr >= 2.0.0 BuildArch: noarch %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 %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 -n mox3-%{version} %py_req_cleanup sed -i 's/^warning-is-error.*/warning-is-error = 0/g' setup.cfg %build %python_build # generate html docs python3 setup.py build_sphinx rm doc/build/html/.buildinfo %install %python_install %python_expand %fdupes %{buildroot}%{$python_sitelib} mkdir -p %{buildroot}%{_docdir}/%{name} cp -r doc/build/html %{buildroot}%{_docdir}/%{name} %fdupes %{buildroot}%{_docdir}/%{name}/html %check %{python_expand rm -rf .testrepository stestr-%{$python_bin_suffix} run --slowest } %files %{python_files} %license COPYING.txt %doc README.rst %{python_sitelib}/mox3 %{python_sitelib}/mox3-*.egg-info %files -n python-mox3-doc %license COPYING.txt %dir %{_docdir}/%{name}/ %{_docdir}/%{name}/html/ %changelog * Tue Nov 6 2018 Todd R - update to version 0.26.0 * Switch to stestr * Remove the unnecessary spaces * Update links in README * fix tox python3 overrides * set default python to python3 * fix a typo in documentation * add lower-constraints job * Updated from global requirements - Update to version 0.25.0 * Updated from global requirements * Updated from global requirements * Updated from global requirements - Add missing unittest dependency - Spec file cleanups - Build documentation with python3 * Fri Feb 23 2018 cloud-devel@suse.de - update to version 0.24.0 - Updated from global requirements - Avoid tox_install.sh for constraints support * Fri Nov 24 2017 dmueller@suse.com - update to version 0.23.0: * Update URLs in documents according to document migration * Update .gitignore * turn on warning-is-error flag for doc build * switch from oslosphinx to openstackdocstheme * rearrange existing documentation based on the new standard layout * Wed Jun 17 2015 tbechtold@suse.com - update to 0.8.0: * Fixes to allow a new release * Updated requirements * Add a fixture for consuming mox3 easily * Add CONTRIBUTING file * Cleaed up AUTHORS/ChangeLog file * Migrate test bases to testtools * Fix all of the flake8/hacking warnings * Fix the leading indentation issue * Updated to use OpenStack standards * Add openstack stuff * Changed project description * Author is not required - maintainer is enough * Added tests to sdist * Applied some changes according to http://getpython3.com/diveintopython3/packaging.html * Changed directory test to tests. Fixed travis config * Adjusted the structure of the mox3 * Minor fixes + changes in metadata * Update README * Fixed pep8 issues * Added test for changed semantics in Python 3 * Added modification info * Fixed isinstance check on instances of MockObject * Fixed a bug when dir() called on MockObject was not returning attributes of a mocked class (Python3) * Pep8's E111 error is now ignored * Removed exclamation mark from travis.yml * Added pep8 to .travis.yml * Fixed deprecation warnings in mox_test.py * Introduced class to which mocks can be bound in order to preserve binding information (Python3 and missing unbound methods issue) * Added __hash__ for MockMethod - no default hash in py3k * bugfix for unhashable/uncomparable dicts * Restored callable function since it's present in python 3.2 * Converted all classes to the new style (inheriting from object) - this is the only option in py3k * Py3k always sets re.U flag, so the resulting regex.flags are equals to flags | re.U * Fixed all the simple compatiblity issues * Fixed compatiblity issues in stubout * Fixed some of the compatiblity issues * info about modification * Added modification info * Enabled Travis CI * Enabled Travis CI * Another bugfix... Tests are still passing * Bugfix. At least I hope so.. * fixed indentation * bugfix * Added .gitignore * Updated to version 0.5.3 * Numerous fixes from Google: * Mox release 0.5.1, which includes some bug fixes and tests for stubout * Fix for Issue 3, submitted by a...@therobots.org * Fix for Issue 5, submitted by agoratim * Patch from Matt Brown (mdbrow@gmail.com) to inspect the arguments of mocked methods. Alright! :) * Added support for __contains__, thanks to Adam Lowry * Added import for inspect, and tests for stubout. Patch by Manuel Holtgrewe * Remove duplicate NotTest. Bad patch * Add a Not comparator to compose with other comparators * Fix MoxTestBase to be usable with multiple-inheritance * Write a README * Start our first release at 0.5.0, not 1.0.0 * Include the mox_test_helper.py in the distribution * Fix mailing list address * Initial import of mox (originally an internal Google project) - Adjust Requires according to requirements.txt * Mon Sep 2 2013 dmueller@suse.com - Initial package (0.7.0)