From d16eb1f7f7faa5eebb6cdee10c14d79666a4c217e939673bd2d96710716f071e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mark=C3=A9ta=20Machov=C3=A1?= Date: Fri, 11 Oct 2024 11:50:42 +0000 Subject: [PATCH] People can use this to load YAML 1.2 files without moving away from PyYAML OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-yamlcore?expand=0&rev=1 --- .gitattributes | 23 ++++++++++++++ .gitignore | 1 + python-yamlcore.changes | 16 ++++++++++ python-yamlcore.spec | 67 +++++++++++++++++++++++++++++++++++++++++ yamlcore-0.0.4.tar.gz | 3 ++ 5 files changed, 110 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 python-yamlcore.changes create mode 100644 python-yamlcore.spec create mode 100644 yamlcore-0.0.4.tar.gz diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -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 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/python-yamlcore.changes b/python-yamlcore.changes new file mode 100644 index 0000000..54eb747 --- /dev/null +++ b/python-yamlcore.changes @@ -0,0 +1,16 @@ +------------------------------------------------------------------- +Wed Oct 9 19:21:20 UTC 2024 - Tina Müller + +- Update to 0.0.4 + - Fix metadata (adding all test data and Changelog to the build) + +------------------------------------------------------------------- +Sat Oct 5 23:13:31 UTC 2024 - Tina Müller + +- Update to 0.0.3 + - Possibly breaking change: Forbid duplicate keys + - Add PyYAML dependency to meta data + +- Update to 0.0.2 + - Move loader and dumper classes to __init__.py + - Add Changelog diff --git a/python-yamlcore.spec b/python-yamlcore.spec new file mode 100644 index 0000000..5f777e0 --- /dev/null +++ b/python-yamlcore.spec @@ -0,0 +1,67 @@ +# +# spec file for package python-yamlcore +# +# 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 +# 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-yamlcore +Version: 0.0.4 +Release: 0 +Summary: YAML 1.2 Support for PyYAML +License: MIT +URL: https://github.com/perlpunk/pyyaml-core +Source: https://files.pythonhosted.org/packages/y/yamlcore/yamlcore-%{version}.tar.gz +BuildRequires: python-rpm-macros +BuildRequires: %{python_module pip} +BuildRequires: %{python_module setuptools >= 61.0} +# SECTION test requirements +BuildRequires: %{python_module PyYAML} +BuildRequires: %{python_module pytest >= 2.3.5} +# /SECTION +BuildRequires: fdupes +Requires: python-PyYAML +BuildArch: noarch +%python_subpackages + +%description +YAML 1.2 Support for PyYAML + +This module can be used on top of PyYAML to load YAML 1.2 files. It depends on +PyYAML and inherits from it, it's not a fork. + +Currently it supports enabling all YAML 1.2 Core Schema tags on top of the +PyYAML BaseLoader. It does not (yet) support other tags like the << merge key. +You can add custom constructors, though. + +%prep +%autosetup -p1 -n yamlcore-%{version} + +%build +%pyproject_wheel + +%install +%pyproject_install +%python_expand %fdupes %{buildroot}%{$python_sitelib} + +%check +%pytest tests/*.py + +%files %{python_files} +%doc Changelog.md Readme.md +%license LICENSE +%{python_sitelib}/yamlcore +%{python_sitelib}/yamlcore-%{version}.dist-info + +%changelog diff --git a/yamlcore-0.0.4.tar.gz b/yamlcore-0.0.4.tar.gz new file mode 100644 index 0000000..afb363a --- /dev/null +++ b/yamlcore-0.0.4.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c2b1a08dd117cf76a70ee124e936b3c568b0b5c4e5131e69b513f4a877a44881 +size 10456