forked from pool/python-MiniMock
- 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 <py38) - cleanup python/pkg versions, update tox cfg, switch CI OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-MiniMock?expand=0&rev=31
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user