From b3420e1e8d0efefcc4b9f622e414dea21cf76eafd357bfbb40c8902432cd56fa Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Tue, 23 Nov 2021 18:54:16 +0000 Subject: [PATCH] Accepting request 933309 from home:tinita:branches:devel:languages:python - Add patch setuptools.patch - update to 6.0 * drop Python 2.7 * always require `Loader` arg to `yaml.load()` * fix float resolver to ignore `.` and `._` * fix representation of Enum subclasses * fix libyaml extension compiler warnings * fix ResourceWarning on leaked file descriptors * remove remaining direct distutils usage OBS-URL: https://build.opensuse.org/request/show/933309 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-PyYAML?expand=0&rev=44 --- PyYAML-5.4.1.tar.gz | 3 --- PyYAML-6.0.tar.gz | 3 +++ python-PyYAML.changes | 13 +++++++++++++ python-PyYAML.spec | 12 +++++------- setuptools.patch | 11 +++++++++++ 5 files changed, 32 insertions(+), 10 deletions(-) delete mode 100644 PyYAML-5.4.1.tar.gz create mode 100644 PyYAML-6.0.tar.gz create mode 100644 setuptools.patch diff --git a/PyYAML-5.4.1.tar.gz b/PyYAML-5.4.1.tar.gz deleted file mode 100644 index d1722a8..0000000 --- a/PyYAML-5.4.1.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:607774cbba28732bfa802b54baa7484215f530991055bb562efbed5b2f20a45e -size 175147 diff --git a/PyYAML-6.0.tar.gz b/PyYAML-6.0.tar.gz new file mode 100644 index 0000000..5ffc3e7 --- /dev/null +++ b/PyYAML-6.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:68fb519c14306fec9720a2a5b45bc9f0c8d1b9c72adf45c37baedfcd949c35a2 +size 124996 diff --git a/python-PyYAML.changes b/python-PyYAML.changes index 6dea17f..08c8ec9 100644 --- a/python-PyYAML.changes +++ b/python-PyYAML.changes @@ -1,3 +1,16 @@ +------------------------------------------------------------------- +Mon Nov 1 20:36:13 UTC 2021 - Tina Müller + +- Add patch setuptools.patch +- update to 6.0 + * drop Python 2.7 + * always require `Loader` arg to `yaml.load()` + * fix float resolver to ignore `.` and `._` + * fix representation of Enum subclasses + * fix libyaml extension compiler warnings + * fix ResourceWarning on leaked file descriptors + * remove remaining direct distutils usage + ------------------------------------------------------------------- Sun Jan 24 18:21:20 UTC 2021 - Dirk Müller diff --git a/python-PyYAML.spec b/python-PyYAML.spec index 826a577..37338b6 100644 --- a/python-PyYAML.spec +++ b/python-PyYAML.spec @@ -18,23 +18,20 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} %define oldpython python +%define skip_python2 1 Name: python-PyYAML -Version: 5.4.1 +Version: 6.0 Release: 0 Summary: YAML parser and emitter for Python License: MIT URL: https://github.com/yaml/pyyaml Source: https://files.pythonhosted.org/packages/source/P/PyYAML/PyYAML-%{version}.tar.gz +Patch0: setuptools.patch BuildRequires: %{python_module Cython} BuildRequires: %{python_module setuptools} BuildRequires: fdupes BuildRequires: libyaml-devel BuildRequires: python-rpm-macros -%ifpython2 -# python-yaml was last used in openSUSE 12.1. -Provides: %{oldpython}-yaml = %{version} -Obsoletes: %{oldpython}-yaml < %{version} -%endif %description YAML is a data serialization format designed for human readability @@ -53,6 +50,7 @@ configuration files to object serialization and persistance. %prep %setup -q -n PyYAML-%{version} +%patch0 -p1 %build export CFLAGS="%{optflags}" @@ -74,7 +72,7 @@ ulimit -Sn 2048 %files %{python_files} %license LICENSE -%doc CHANGES README examples/ +%doc CHANGES README.md examples/ %{python_sitearch}/yaml %{python_sitearch}/_yaml %{python_sitearch}/PyYAML-%{version}-py%{python_version}.egg-info diff --git a/setuptools.patch b/setuptools.patch new file mode 100644 index 0000000..47ec714 --- /dev/null +++ b/setuptools.patch @@ -0,0 +1,11 @@ +--- PyYAML-6.0/setup.py 2021-10-13 21:13:52.000000000 +0200 ++++ PyYAML-6.0/setup.py.new 2021-11-03 14:36:40.093725379 +0100 +@@ -67,7 +67,7 @@ + import sys, os, os.path, pathlib, platform, shutil, tempfile, warnings + + # for newer setuptools, enable the embedded distutils before importing setuptools/distutils to avoid warnings +-os.environ['SETUPTOOLS_USE_DISTUTILS'] = 'local' ++#os.environ['SETUPTOOLS_USE_DISTUTILS'] = 'local' + + from setuptools import setup, Command, Distribution as _Distribution, Extension as _Extension + from setuptools.command.build_ext import build_ext as _build_ext