From 3f0364c263756f0d4ce0012c83c5baa73c1d2a2ff5422fe79fcc8e89d0273c3d Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Wed, 16 Feb 2022 23:41:07 +0000 Subject: [PATCH] - 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