forked from pool/python-ruamel.yaml.convert
- Add patch support-python314.patch:
* Support Python 3.14 ast changes. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-ruamel.yaml.convert?expand=0&rev=7
This commit is contained in:
23
.gitattributes
vendored
Normal file
23
.gitattributes
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
## Default LFS
|
||||
*.7z filter=lfs diff=lfs merge=lfs -text
|
||||
*.bsp filter=lfs diff=lfs merge=lfs -text
|
||||
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.gem filter=lfs diff=lfs merge=lfs -text
|
||||
*.gz filter=lfs diff=lfs merge=lfs -text
|
||||
*.jar filter=lfs diff=lfs merge=lfs -text
|
||||
*.lz filter=lfs diff=lfs merge=lfs -text
|
||||
*.lzma filter=lfs diff=lfs merge=lfs -text
|
||||
*.obscpio filter=lfs diff=lfs merge=lfs -text
|
||||
*.oxt filter=lfs diff=lfs merge=lfs -text
|
||||
*.pdf filter=lfs diff=lfs merge=lfs -text
|
||||
*.png filter=lfs diff=lfs merge=lfs -text
|
||||
*.rpm filter=lfs diff=lfs merge=lfs -text
|
||||
*.tbz filter=lfs diff=lfs merge=lfs -text
|
||||
*.tbz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.tgz filter=lfs diff=lfs merge=lfs -text
|
||||
*.ttf filter=lfs diff=lfs merge=lfs -text
|
||||
*.txz filter=lfs diff=lfs merge=lfs -text
|
||||
*.whl filter=lfs diff=lfs merge=lfs -text
|
||||
*.xz filter=lfs diff=lfs merge=lfs -text
|
||||
*.zip filter=lfs diff=lfs merge=lfs -text
|
||||
*.zst filter=lfs diff=lfs merge=lfs -text
|
||||
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
.osc
|
||||
23
python-ruamel.yaml.convert.changes
Normal file
23
python-ruamel.yaml.convert.changes
Normal file
@@ -0,0 +1,23 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue Dec 9 04:18:08 UTC 2025 - Steve Kowalik <steven.kowalik@suse.com>
|
||||
|
||||
- Add patch support-python314.patch:
|
||||
* Support Python 3.14 ast changes.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Jun 24 02:22:48 UTC 2025 - Steve Kowalik <steven.kowalik@suse.com>
|
||||
|
||||
- Switch to pyproject macros.
|
||||
- No more greedy globs in %files.
|
||||
- Update URL.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Sep 10 10:33:27 UTC 2019 - Tomáš Chvátal <tchvatal@suse.com>
|
||||
|
||||
- Update to 0.3.2:
|
||||
* no upstream changelog
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Jul 12 06:02:48 AM UTC 2019 - John Vandenberg <jayvdb@gmail.com>
|
||||
|
||||
- Initial spec for v0.3.0
|
||||
69
python-ruamel.yaml.convert.spec
Normal file
69
python-ruamel.yaml.convert.spec
Normal file
@@ -0,0 +1,69 @@
|
||||
#
|
||||
# spec file for package python-ruamel.yaml.convert
|
||||
#
|
||||
# Copyright (c) 2025 SUSE LLC and contributors
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
# upon. The license for this file, and modifications and additions to the
|
||||
# file, is the same license as for the pristine package itself (unless the
|
||||
# license for the pristine package is not an Open Source License, in which
|
||||
# case the license is the MIT License). An "Open Source License" is a
|
||||
# license that conforms to the Open Source Definition (Version 1.9)
|
||||
# published by the Open Source Initiative.
|
||||
|
||||
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
||||
#
|
||||
|
||||
|
||||
Name: python-ruamel.yaml.convert
|
||||
Version: 0.3.2
|
||||
Release: 0
|
||||
Summary: Data format conversion routines to and from YAML
|
||||
License: MIT
|
||||
URL: https://sourceforge.net/projects/ruamel-yaml-convert/
|
||||
Source: https://files.pythonhosted.org/packages/source/r/ruamel.yaml.convert/ruamel.yaml.convert-%{version}.tar.gz
|
||||
# PATCH-FIX-OPENSUSE Support Python 3.14 ast changes
|
||||
Patch0: support-python314.patch
|
||||
BuildRequires: %{python_module pip}
|
||||
BuildRequires: %{python_module ruamel.base >= 1.0.0+post1}
|
||||
BuildRequires: %{python_module ruamel.yaml}
|
||||
BuildRequires: %{python_module setuptools}
|
||||
BuildRequires: %{python_module wheel}
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: python-rpm-macros
|
||||
# 1.0.0+post1 needed to depend on revised base namespace technique
|
||||
Requires: python-python-dateutil
|
||||
Requires: python-ruamel.base >= 1.0.0+post1
|
||||
Requires: python-ruamel.yaml
|
||||
Recommends: python-beautifulsoup4
|
||||
BuildArch: noarch
|
||||
|
||||
%python_subpackages
|
||||
|
||||
%description
|
||||
Data format conversion routines to and from YAML.
|
||||
|
||||
%prep
|
||||
%autosetup -p1 -n ruamel.yaml.convert-%{version}
|
||||
# Remove unnecessary namespace declaration
|
||||
sed -i '/namespace_packages=/d' setup.py
|
||||
|
||||
%build
|
||||
%pyproject_wheel
|
||||
|
||||
%install
|
||||
export RUAMEL_NO_PIP_INSTALL_CHECK=1
|
||||
%pyproject_install
|
||||
%{python_expand rm -r %{buildroot}%{$python_sitelib}/ruamel/__* %{buildroot}%{$python_sitelib}/ruamel/yaml/__*
|
||||
%fdupes %{buildroot}%{$python_sitelib}
|
||||
}
|
||||
|
||||
%files %{python_files}
|
||||
%doc README.rst
|
||||
%license LICENSE
|
||||
%dir %{python_sitelib}/ruamel/yaml
|
||||
%{python_sitelib}/ruamel/yaml/convert
|
||||
%{python_sitelib}/ruamel[_.]yaml[._]convert-%{version}.dist-info
|
||||
|
||||
%changelog
|
||||
3
ruamel.yaml.convert-0.3.2.tar.gz
Normal file
3
ruamel.yaml.convert-0.3.2.tar.gz
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:065ed9492a3189291d5bc0256709afc0231b52e4a01376fc91cf1757560ac9c4
|
||||
size 16477
|
||||
40
support-python314.patch
Normal file
40
support-python314.patch
Normal file
@@ -0,0 +1,40 @@
|
||||
Index: ruamel.yaml.convert-0.3.2/setup.py
|
||||
===================================================================
|
||||
--- ruamel.yaml.convert-0.3.2.orig/setup.py
|
||||
+++ ruamel.yaml.convert-0.3.2/setup.py
|
||||
@@ -49,8 +49,7 @@ if sys.version_info < (3, 4):
|
||||
|
||||
|
||||
if sys.version_info >= (3, 8):
|
||||
-
|
||||
- from ast import Str, Num, Bytes, NameConstant # NOQA
|
||||
+ from ast import Constant # NOQA
|
||||
|
||||
|
||||
if sys.version_info < (3,):
|
||||
@@ -100,15 +99,7 @@ def literal_eval(node_or_string):
|
||||
raise TypeError('only string or AST nodes supported')
|
||||
|
||||
def _convert(node):
|
||||
- if isinstance(node, Str):
|
||||
- if sys.version_info < (3,) and not isinstance(node.s, unicode):
|
||||
- return node.s.decode('utf-8')
|
||||
- return node.s
|
||||
- elif isinstance(node, Bytes):
|
||||
- return node.s
|
||||
- elif isinstance(node, Num):
|
||||
- return node.n
|
||||
- elif isinstance(node, Tuple):
|
||||
+ if isinstance(node, Tuple):
|
||||
return tuple(map(_convert, node.elts))
|
||||
elif isinstance(node, List):
|
||||
return list(map(_convert, node.elts))
|
||||
@@ -116,7 +107,7 @@ def literal_eval(node_or_string):
|
||||
return set(map(_convert, node.elts))
|
||||
elif isinstance(node, Dict):
|
||||
return dict((_convert(k), _convert(v)) for k, v in zip(node.keys, node.values))
|
||||
- elif isinstance(node, NameConstant):
|
||||
+ elif isinstance(node, Constant):
|
||||
return node.value
|
||||
elif sys.version_info < (3, 4) and isinstance(node, Name):
|
||||
if node.id in _safe_names:
|
||||
Reference in New Issue
Block a user