From e264dcdec755ff9edb58d1867733c9f453ba128bf1ec1b4a66574058b144a7ae Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Tue, 29 Mar 2022 19:43:56 +0000 Subject: [PATCH] Accepting request 965491 from home:bnavigator:branches:devel:languages:python:pytest - Update to 3.0.0 * Drop support for isort < 5 * Add suport for pytest 7 - Release 2.0.0 * BREAKING CHANGE: Files that are ignored in isort's own configuration will now be skipped - Release 1.3.0 * Fix issue with pytest >= 6.1 - Release 1.2.0 * Add support for pytest >= 6 - Drop pytest6.patch - License change OBS-URL: https://build.opensuse.org/request/show/965491 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:pytest/python-pytest-isort?expand=0&rev=15 --- pytest-isort-1.1.0.tar.gz | 3 --- pytest-isort-3.0.0-gh.tar.gz | 3 +++ pytest6.patch | 22 -------------------- python-pytest-isort.changes | 16 +++++++++++++++ python-pytest-isort.spec | 39 +++++++++++++++++++++--------------- 5 files changed, 42 insertions(+), 41 deletions(-) delete mode 100644 pytest-isort-1.1.0.tar.gz create mode 100644 pytest-isort-3.0.0-gh.tar.gz delete mode 100644 pytest6.patch diff --git a/pytest-isort-1.1.0.tar.gz b/pytest-isort-1.1.0.tar.gz deleted file mode 100644 index 7647285..0000000 --- a/pytest-isort-1.1.0.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:30bd29927ac1b92f0701c1c43de52abaf7ccedaec8f8c9775dfab4ee51d74006 -size 6958 diff --git a/pytest-isort-3.0.0-gh.tar.gz b/pytest-isort-3.0.0-gh.tar.gz new file mode 100644 index 0000000..bb12bd4 --- /dev/null +++ b/pytest-isort-3.0.0-gh.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:07ceeaaf0f3804132545d4d2f9af43cb1e41721573801838baf45fc75c95df32 +size 16528 diff --git a/pytest6.patch b/pytest6.patch deleted file mode 100644 index 2a8178c..0000000 --- a/pytest6.patch +++ /dev/null @@ -1,22 +0,0 @@ -Index: pytest-isort-1.1.0/test_isort.py -=================================================================== ---- pytest-isort-1.1.0.orig/test_isort.py -+++ pytest-isort-1.1.0/test_isort.py -@@ -155,7 +155,7 @@ class TestIsortItem: - path = testdir.tmpdir - kwargs = {} - -- test_obj = IsortItem(path, parent, **kwargs) -+ test_obj = IsortItem.from_parent(parent, **kwargs, fspath=path) - - assert test_obj.name == path.basename - assert test_obj.parent == parent -@@ -183,7 +183,7 @@ class TestIsortItem: - path = testdir.tmpdir - kwargs = {'fspath': path} - -- test_obj = IsortItem(None, parent, **kwargs) -+ test_obj = IsortItem.from_parent(parent, **kwargs) - - assert test_obj.name == path.basename - assert test_obj.parent == parent diff --git a/python-pytest-isort.changes b/python-pytest-isort.changes index 6ce006c..c936362 100644 --- a/python-pytest-isort.changes +++ b/python-pytest-isort.changes @@ -1,3 +1,19 @@ +------------------------------------------------------------------- +Mon Mar 28 20:22:52 UTC 2022 - Ben Greiner + +- Update to 3.0.0 + * Drop support for isort < 5 + * Add suport for pytest 7 +- Release 2.0.0 + * BREAKING CHANGE: Files that are ignored in isort's own + configuration will now be skipped +- Release 1.3.0 + * Fix issue with pytest >= 6.1 +- Release 1.2.0 + * Add support for pytest >= 6 +- Drop pytest6.patch +- License change + ------------------------------------------------------------------- Tue Aug 25 11:53:40 UTC 2020 - Marketa Calabkova diff --git a/python-pytest-isort.spec b/python-pytest-isort.spec index 3c36319..ed0cbe3 100644 --- a/python-pytest-isort.spec +++ b/python-pytest-isort.spec @@ -1,7 +1,7 @@ # # spec file for package python-pytest-isort # -# Copyright (c) 2020 SUSE LLC +# 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 @@ -16,39 +16,45 @@ # -%{?!python_module:%define python_module() python-%{**} python3-%{**}} +%{?!python_module:%define python_module() python3-%{**}} %define skip_python2 1 Name: python-pytest-isort -Version: 1.1.0 +Version: 3.0.0 Release: 0 -Summary: Plugin for pytest to perform isort checks -License: BSD-3-Clause -URL: https://github.com/moccu/pytest-isort/ -Source: https://files.pythonhosted.org/packages/source/p/pytest-isort/pytest-isort-%{version}.tar.gz -Patch0: pytest6.patch +Summary: Pytest plugin to check import ordering using isort +License: MIT +URL: https://github.com/stephrdev/pytest-isort/ +Source: https://github.com/stephrdev/pytest-isort/archive/refs/tags/%{version}.tar.gz#/pytest-isort-%{version}-gh.tar.gz +BuildRequires: %{python_module importlib-metadata if %python-base < 3.8} BuildRequires: %{python_module isort >= 4.0} -BuildRequires: %{python_module pytest >= 5} -BuildRequires: %{python_module setuptools} +BuildRequires: %{python_module pip} +BuildRequires: %{python_module poetry >= 1.1} +BuildRequires: %{python_module pytest >= 6.2} BuildRequires: fdupes BuildRequires: python-rpm-macros Requires: python-isort >= 4.0 Requires: python-pytest >= 3.5 +%if 0%{python_version_nodots} < 38 +Requires: python-importlib-metadata +%endif BuildArch: noarch %python_subpackages %description -This is a py.test plugin to check import ordering using isort. +This is a pytest plugin to check import ordering using isort. %prep %setup -q -n pytest-isort-%{version} -%patch0 -p1 %build -%python_build +%pyproject_wheel %install -%python_install -%python_expand %fdupes %{buildroot}%{$python_sitelib} +%pyproject_install +%{python_expand # +rm %{buildroot}%{$python_sitelib}/LICENSE.rst +%fdupes %{buildroot}%{$python_sitelib} +} %check %pytest @@ -56,6 +62,7 @@ This is a py.test plugin to check import ordering using isort. %files %{python_files} %doc CHANGELOG.rst README.rst %license LICENSE.rst -%{python_sitelib}/* +%{python_sitelib}/pytest_isort +%{python_sitelib}/pytest_isort-%{version}*-info %changelog