From 2e264cc8ebb894a351baa319cb524ecc7d650317e437e03cff0401542556ec2c Mon Sep 17 00:00:00 2001 From: Steve Kowalik Date: Mon, 5 Feb 2024 01:37:49 +0000 Subject: [PATCH] - Add patch update-versioneer.patch: * Fix build failure with Python 3.12. - Switch to pyproject and autosetup macros. - Stop using greedy globs in %files. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-crochet?expand=0&rev=7 --- python-crochet.changes | 8 ++++++++ python-crochet.spec | 18 ++++++++++-------- update-versioneer.patch | 25 +++++++++++++++++++++++++ 3 files changed, 43 insertions(+), 8 deletions(-) create mode 100644 update-versioneer.patch diff --git a/python-crochet.changes b/python-crochet.changes index 22ebab1..b00166d 100644 --- a/python-crochet.changes +++ b/python-crochet.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Mon Feb 5 01:36:41 UTC 2024 - Steve Kowalik + +- Add patch update-versioneer.patch: + * Fix build failure with Python 3.12. +- Switch to pyproject and autosetup macros. +- Stop using greedy globs in %files. + ------------------------------------------------------------------- Tue Jul 11 14:21:43 UTC 2023 - Dirk Müller diff --git a/python-crochet.spec b/python-crochet.spec index df055d2..e9b3797 100644 --- a/python-crochet.spec +++ b/python-crochet.spec @@ -1,7 +1,7 @@ # # spec file for package python-crochet # -# Copyright (c) 2023 SUSE LLC +# Copyright (c) 2024 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -16,17 +16,18 @@ # -%{?!python_module:%define python_module() python-%{**} python3-%{**}} -%define skip_python2 1 Name: python-crochet Version: 2.1.1 Release: 0 Summary: Use Twisted from any applications License: MIT -Group: Development/Languages/Python URL: https://github.com/itamarst/crochet Source: https://files.pythonhosted.org/packages/source/c/crochet/crochet-%{version}.tar.gz +# PATCH-FIX-UPSTREAM gh#itamarst/crochet#150 +Patch0: update-versioneer.patch +BuildRequires: %{python_module pip} BuildRequires: %{python_module setuptools} +BuildRequires: %{python_module wheel} BuildRequires: fdupes BuildRequires: python-rpm-macros Requires: python-Twisted >= 16.0 @@ -44,13 +45,13 @@ threaded applications like Flask or Django to use the Twisted networking framework. %prep -%setup -q -n crochet-%{version} +%autosetup -p1 -n crochet-%{version} %build -%python_build +%pyproject_wheel %install -%python_install +%pyproject_install %python_expand %fdupes %{buildroot}%{$python_sitelib} %check @@ -59,6 +60,7 @@ framework. %files %{python_files} %doc README.rst docs/*.rst %license LICENSE -%{python_sitelib}/* +%{python_sitelib}/crochet +%{python_sitelib}/crochet-%{version}.dist-info %changelog diff --git a/update-versioneer.patch b/update-versioneer.patch new file mode 100644 index 0000000..54b81fb --- /dev/null +++ b/update-versioneer.patch @@ -0,0 +1,25 @@ +From a36d05f9fe9553fa37d585f43b8ae434dba0c6c3 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Hrn=C4=8Diar?= +Date: Mon, 3 Jul 2023 16:41:50 +0200 +Subject: [PATCH] Adjust versioneer.py for compatibility with Python 3.12 + +--- + versioneer.py | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/versioneer.py b/versioneer.py +index 7ed2a21..b7cdb0f 100644 +--- a/versioneer.py ++++ b/versioneer.py +@@ -409,9 +409,9 @@ def get_config_from_root(root): + # configparser.NoOptionError (if it lacks "VCS="). See the docstring at + # the top of versioneer.py for instructions on writing your setup.cfg . + setup_cfg = os.path.join(root, "setup.cfg") +- parser = configparser.SafeConfigParser() ++ parser = configparser.ConfigParser() + with open(setup_cfg, "r") as f: +- parser.readfp(f) ++ parser.read_file(f) + VCS = parser.get("versioneer", "VCS") # mandatory + + def get(parser, name):