2 Commits

Author SHA256 Message Date
e7baf79d43 Add support-old-pyproject.patch
Use a patch instead of sed command to support old license format in
pyproject.toml
2025-11-12 10:50:05 +01:00
f4663b8d48 Remove trailing whitespaces from changes 2025-11-10 15:49:07 +01:00
3 changed files with 24 additions and 7 deletions

View File

@@ -1,3 +1,9 @@
-------------------------------------------------------------------
Wed Nov 12 09:49:16 UTC 2025 - Daniel Garcia <daniel.garcia@suse.com>
- Add support-old-pyproject.patch instead of sed command to support
old license format in pyproject.toml
-------------------------------------------------------------------
Fri Nov 7 15:04:58 UTC 2025 - Marius Grossu <marius.grossu@suse.com>

View File

@@ -24,6 +24,9 @@ Summary: Pytest plugin to run pycodestyle
License: MIT
URL: https://github.com/henry0312/pytest-pycodestyle
Source: https://files.pythonhosted.org/packages/source/p/pytest-pycodestyle/pytest_pycodestyle-%{version}.tar.gz
# Needed to build correctly in sle-15 with python3.11
# PATCH-FIX-OPENSUSE support-old-pyproject.patch -- daniel.garcia@suse.com
Patch0: support-old-pyproject.patch
BuildRequires: %{python_module base >= 3.6}
BuildRequires: %{python_module pip}
BuildRequires: %{python_module pycodestyle}
@@ -34,10 +37,8 @@ BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module wheel}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
Requires: python-py
Requires: python-pycodestyle
Requires: python-pytest
Requires: python-setuptools
Provides: python-pytest-codestyle = %{version}
Obsoletes: python-pytest-codestyle < %{version}
BuildArch: noarch
@@ -47,10 +48,7 @@ BuildArch: noarch
pytest plugin to run pycodestyle in python tests
%prep
%setup -q -n pytest_pycodestyle-%{version}
%if 0%{?suse_version} <= 1500
sed -i 's/license = "MIT"/license = { text = "MIT" }/' pyproject.toml
%endif
%autosetup -p1 -n pytest_pycodestyle-%{version}
%build
%pyproject_wheel

View File

@@ -0,0 +1,13 @@
Index: pytest_pycodestyle-2.5.0/pyproject.toml
===================================================================
--- pytest_pycodestyle-2.5.0.orig/pyproject.toml
+++ pytest_pycodestyle-2.5.0/pyproject.toml
@@ -12,7 +12,7 @@ build-backend = "setuptools.build_meta"
name = "pytest-pycodestyle"
description = "pytest plugin to run pycodestyle"
readme = "README.md"
-license = "MIT"
+license = { text = "MIT" }
authors = [
{ name = "OMOTO Tsukasa", email = "tsukasa@oomo.to" }
]