From 07efe576678a79bf7d3059b85adf0df7e8c19f8c41458014b6bfe7a62c30de15 Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Fri, 11 Feb 2022 13:09:05 +0000 Subject: [PATCH 1/4] Accepting request 953703 from home:pgajdos:python - require python3-tools instead of python3-2to3 for build OBS-URL: https://build.opensuse.org/request/show/953703 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-MiniMock?expand=0&rev=29 --- python-MiniMock.changes | 5 +++++ python-MiniMock.spec | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/python-MiniMock.changes b/python-MiniMock.changes index c564556..37baae0 100644 --- a/python-MiniMock.changes +++ b/python-MiniMock.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Fri Feb 11 10:30:15 UTC 2022 - pgajdos@suse.com + +- require python3-tools instead of python3-2to3 for build + ------------------------------------------------------------------- Thu Nov 7 15:00:03 UTC 2019 - Matej Cepl diff --git a/python-MiniMock.spec b/python-MiniMock.spec index acc6d87..66c38ac 100644 --- a/python-MiniMock.spec +++ b/python-MiniMock.spec @@ -1,7 +1,7 @@ # # spec file for package python-MiniMock # -# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2022 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -27,7 +27,7 @@ URL: https://pypi.python.org/pypi/MiniMock Source: https://files.pythonhosted.org/packages/source/M/MiniMock/MiniMock-%{version}.tar.gz BuildRequires: %{python_module setuptools} BuildRequires: python-rpm-macros -BuildRequires: python3-2to3 +BuildRequires: python3-tools BuildArch: noarch %ifpython2 Provides: %{oldpython}-minimock = %{version} From a71045a23b471fea48975ed641c5939953dbfdc96dc667594b8249b19752a321 Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Fri, 11 Feb 2022 13:11:36 +0000 Subject: [PATCH 2/4] - Deduplicate files in python_sitelib. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-MiniMock?expand=0&rev=30 --- python-MiniMock.changes | 5 +++++ python-MiniMock.spec | 2 ++ 2 files changed, 7 insertions(+) diff --git a/python-MiniMock.changes b/python-MiniMock.changes index 37baae0..6367114 100644 --- a/python-MiniMock.changes +++ b/python-MiniMock.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Fri Feb 11 13:11:28 UTC 2022 - Matej Cepl + +- Deduplicate files in python_sitelib. + ------------------------------------------------------------------- Fri Feb 11 10:30:15 UTC 2022 - pgajdos@suse.com diff --git a/python-MiniMock.spec b/python-MiniMock.spec index 66c38ac..cac6b38 100644 --- a/python-MiniMock.spec +++ b/python-MiniMock.spec @@ -26,6 +26,7 @@ License: MIT URL: https://pypi.python.org/pypi/MiniMock Source: https://files.pythonhosted.org/packages/source/M/MiniMock/MiniMock-%{version}.tar.gz BuildRequires: %{python_module setuptools} +BuildRequires: fdupes BuildRequires: python-rpm-macros BuildRequires: python3-tools BuildArch: noarch @@ -52,6 +53,7 @@ When using doctest, mock objects can be very simple. python3 -m compileall -d %{python3_sitelib} %{buildroot}%{python3_sitelib}/ python3 -O -m compileall -d %{python3_sitelib} %{buildroot}%{python3_sitelib}/ %endif +%python_expand %fdupes %{buildroot}%{$python_sitelib} %check %python_expand $python -B %{buildroot}%{$python_sitelib}/minimock.py From 3f0364c263756f0d4ce0012c83c5baa73c1d2a2ff5422fe79fcc8e89d0273c3d Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Wed, 16 Feb 2022 23:41:07 +0000 Subject: [PATCH 3/4] - Update to 1.3.0: 1.2.9 ----- - pkg: add initial conda recipe and workflow (plus .gitattributes) - Add some flake8 cleanup and tool cfgs. - Use nose wth coverage and detailed-errors for smoke test. - Replace os.path.isfile in lookup_by_name (fails on windows + +- Update to 1.3.0: +1.2.9 +----- + - pkg: add initial conda recipe and workflow (plus .gitattributes) + - Add some flake8 cleanup and tool cfgs. + - Use nose wth coverage and detailed-errors for smoke test. + - Replace os.path.isfile in lookup_by_name (fails on windows diff --git a/python-MiniMock.spec b/python-MiniMock.spec index cac6b38..ebd80ba 100644 --- a/python-MiniMock.spec +++ b/python-MiniMock.spec @@ -17,15 +17,19 @@ %define oldpython python +%define skip_python2 1 +%define modname minimock %{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-MiniMock -Version: 1.2.8 +Version: 1.3.0 Release: 0 Summary: A mock library for Python License: MIT -URL: https://pypi.python.org/pypi/MiniMock -Source: https://files.pythonhosted.org/packages/source/M/MiniMock/MiniMock-%{version}.tar.gz +URL: https://github.com/lowks/minimock/ +Source: https://github.com/lowks/%{modname}/archive/refs/tags/v%{version}.tar.gz#/%{modname}-%{version}.tar.gz +BuildRequires: %{python_module pip} BuildRequires: %{python_module setuptools} +BuildRequires: %{python_module wheel} BuildRequires: fdupes BuildRequires: python-rpm-macros BuildRequires: python3-tools @@ -41,27 +45,23 @@ Minimock is a library for doing Mock objects with doctest. When using doctest, mock objects can be very simple. %prep -%setup -q -n MiniMock-%{version} +%setup -q -n %{modname}-%{version} %build -%python_build +%pyproject_wheel %install -%python_install -%if %{have_python3} && ! 0%{?skip_python3} -2to3 -wn %{buildroot}%{python3_sitelib}/minimock.py -python3 -m compileall -d %{python3_sitelib} %{buildroot}%{python3_sitelib}/ -python3 -O -m compileall -d %{python3_sitelib} %{buildroot}%{python3_sitelib}/ -%endif +%pyproject_install %python_expand %fdupes %{buildroot}%{$python_sitelib} %check %python_expand $python -B %{buildroot}%{$python_sitelib}/minimock.py %files %{python_files} -%license docs/license.txt -%pycache_only %{python_sitelib}/__pycache__/* -%{python_sitelib}/minimock.py* -%{python_sitelib}/MiniMock-%{version}-py%{python_version}.egg-info +%license LICENSE.txt +%doc CHANGELOG.txt README.rst +%pycache_only %{python_sitelib}/__pycache__/minimock* +%{python_sitelib}/minimock.py +%{python_sitelib}/minimock-*-info %changelog From 818fb1037800560e1f60e4079cb85abfabfa42940acf2e37e53bdeb367076295 Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Wed, 16 Feb 2022 23:41:28 +0000 Subject: [PATCH 4/4] Fix changelogs OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-MiniMock?expand=0&rev=32 --- python-MiniMock.changes | 2 -- 1 file changed, 2 deletions(-) diff --git a/python-MiniMock.changes b/python-MiniMock.changes index 5337d5e..2e6118f 100644 --- a/python-MiniMock.changes +++ b/python-MiniMock.changes @@ -2,8 +2,6 @@ Wed Feb 16 23:33:05 UTC 2022 - Matej Cepl - Update to 1.3.0: -1.2.9 ------ - pkg: add initial conda recipe and workflow (plus .gitattributes) - Add some flake8 cleanup and tool cfgs. - Use nose wth coverage and detailed-errors for smoke test.