From e40a07ef41154903173cdecbe06b2f433f77d9a290365be2a143bcecca31e796 Mon Sep 17 00:00:00 2001 From: Daniel Garcia Date: Fri, 24 Feb 2023 11:30:05 +0000 Subject: [PATCH] - Add python-311.patch to support python 3.11 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pprintpp?expand=0&rev=10 --- python-311.patch | 13 +++++++++++++ python-pprintpp.changes | 5 +++++ python-pprintpp.spec | 12 ++++++------ 3 files changed, 24 insertions(+), 6 deletions(-) create mode 100644 python-311.patch diff --git a/python-311.patch b/python-311.patch new file mode 100644 index 0000000..3fc40d3 --- /dev/null +++ b/python-311.patch @@ -0,0 +1,13 @@ +Index: pprintpp-0.4.0/setup.py +=================================================================== +--- pprintpp-0.4.0.orig/setup.py ++++ pprintpp-0.4.0/setup.py +@@ -8,7 +8,7 @@ from setuptools import setup + os.chdir(os.path.dirname(sys.argv[0]) or ".") + + try: +- long_description = open("README.rst", "U").read() ++ long_description = open("README.rst").read() + except IOError: + long_description = "See https://github.com/wolever/pprintpp" + diff --git a/python-pprintpp.changes b/python-pprintpp.changes index 70d3813..c0fe0b9 100644 --- a/python-pprintpp.changes +++ b/python-pprintpp.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Fri Feb 24 11:29:28 UTC 2023 - Daniel Garcia + +- Add python-311.patch to support python 3.11 + ------------------------------------------------------------------- Wed Feb 9 18:02:05 UTC 2022 - Matej Cepl diff --git a/python-pprintpp.spec b/python-pprintpp.spec index 16541cb..0466f5a 100644 --- a/python-pprintpp.spec +++ b/python-pprintpp.spec @@ -1,7 +1,7 @@ # # spec file for package python-pprintpp # -# Copyright (c) 2022 SUSE LLC +# Copyright (c) 2023 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -16,7 +16,6 @@ # -%{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-pprintpp Version: 0.4.0 Release: 0 @@ -29,6 +28,8 @@ Source: https://files.pythonhosted.org/packages/source/p/pprintpp/pprint Patch0: 3a35e815.patch # gh#wolever/pprintpp#28 Patch1: python-pprintpp-remove-nose.patch +# PATCH-FIX-OPENSUSE python-311.patch small fix to support python 3.11 +Patch2: python-311.patch BuildRequires: %{python_module parameterized} BuildRequires: %{python_module pytest} BuildRequires: %{python_module setuptools} @@ -43,9 +44,7 @@ BuildArch: noarch A drop-in replacement for pprint that is arguably prettier. %prep -%setup -q -n pprintpp-%{version} -%patch0 -p1 -%patch1 -p1 +%autosetup -p1 -n pprintpp-%{version} %build export LANG=en_US.utf-8 @@ -71,6 +70,7 @@ export LANG=en_US.utf-8 %doc CHANGELOG.txt README.rst %license LICENSE.txt %python_alternative %{_bindir}/pypprint -%{python_sitelib}/* +%{python_sitelib}/pprintpp +%{python_sitelib}/pprintpp-%{version}*-info %changelog