diff --git a/python-flexmock.changes b/python-flexmock.changes index be6accc..97caa81 100644 --- a/python-flexmock.changes +++ b/python-flexmock.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Thu Sep 7 20:06:59 UTC 2017 - toddrme2178@gmail.com + +- Implement single-spec version. + ------------------------------------------------------------------- Thu Oct 13 10:22:24 UTC 2016 - alarrosa@suse.com diff --git a/python-flexmock.spec b/python-flexmock.spec index fa68283..97d4b15 100644 --- a/python-flexmock.spec +++ b/python-flexmock.spec @@ -1,7 +1,7 @@ # # spec file for package python-flexmock # -# Copyright (c) 2016 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2017 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -15,22 +15,28 @@ # Please submit bugfixes or comments via http://bugs.opensuse.org/ # +%{?!python_module:%define python_module() python-%{**} python3-%{**}} +%bcond_without test Name: python-flexmock Version: 0.10.2 Release: 0 License: BSD-2-Clause Summary: Testing library that makes it easy to create mocks, stubs and fakes Url: https://github.com/bkabrda/flexmock -Group: Development/Languages/Python +Group: Development/Languages/Python Source: https://files.pythonhosted.org/packages/source/f/flexmock/flexmock-%{version}.tar.gz -BuildRequires: python -BuildRequires: python-devel -BuildRequires: python-setuptools -BuildRequires: python-nose -BuildRequires: python-pytest -BuildRoot: %{_tmppath}/%{name}-%{version}-build +BuildRequires: %{python_module devel} +BuildRequires: %{python_module setuptools} +BuildRequires: fdupes +BuildRequires: python-rpm-macros +%if %{with test} +BuildRequires: %{python_module nose} +BuildRequires: %{python_module pytest} +%endif BuildArch: noarch +%python_subpackages + %description Flexmock is a testing library for Python that makes it easy to create mocks, stubs and fakes. The API is inspired by a Ruby library of the same name, but @@ -42,19 +48,23 @@ a number of Python-only features. %setup -q -n flexmock-%{version} %build -python setup.py build +%python_build %install -python setup.py install --skip-build --prefix %{_prefix} --root %{buildroot} +%python_install +%python_expand %fdupes %{buildroot}%{$python_sitelib} +%if %{with test} %check -PYTHONPATH="." python tests/flexmock_unittest_test.py +export PYTHONPATH="." +%python_exec tests/flexmock_unittest_test.py +%endif -%files +%files %{python_files} %defattr(-,root,root) %doc LICENSE README.rst CHANGELOG -%{python_sitelib}/flexmock-%{version}-py%{py_ver}.egg-info -%{python_sitelib}/flexmock.py -%{python_sitelib}/*.pyc +%{python_sitelib}/flexmock.py* +%pycache_only %{python_sitelib}/__pycache__/flexmock*.py* +%{python_sitelib}/flexmock-%{version}-py*.egg-info %changelog