15
0

Accepting request 955504 from devel:languages:python

- Update to 1.3.0:
  - 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
- Deduplicate files in python_sitelib.
- require python3-tools instead of python3-2to3 for build

OBS-URL: https://build.opensuse.org/request/show/955504
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-MiniMock?expand=0&rev=20
This commit is contained in:
2022-02-17 22:40:09 +00:00
committed by Git OBS Bridge
4 changed files with 42 additions and 20 deletions

View File

@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:5fdfdfeadf0fc781d0592a1b90d2fcc11581f682ff7cba6201cfdb15c3ea5a4c
size 13217

3
minimock-1.3.0.tar.gz Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:0e02d3acd756ee85a53b8f05c9826ab280a72df41d03119181321ab5a8e3520e
size 13828

View File

@@ -1,3 +1,23 @@
-------------------------------------------------------------------
Wed Feb 16 23:33:05 UTC 2022 - Matej Cepl <mcepl@suse.com>
- Update to 1.3.0:
- 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
-------------------------------------------------------------------
Fri Feb 11 13:11:28 UTC 2022 - Matej Cepl <mcepl@suse.com>
- Deduplicate files in python_sitelib.
-------------------------------------------------------------------
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 <mcepl@suse.com>

View File

@@ -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
@@ -17,17 +17,22 @@
%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-2to3
BuildRequires: python3-tools
BuildArch: noarch
%ifpython2
Provides: %{oldpython}-minimock = %{version}
@@ -40,26 +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