commit 38f84ab26268dcfadcdfb57c41d1356b19829bc8167bd1774b95a37a4e50c7bb Author: Matej Cepl Date: Mon Dec 9 11:43:04 2019 +0000 Accepting request 755207 from home:mcepl:branches:systemsmanagement:wbem Initial submit. OBS-URL: https://build.opensuse.org/request/show/755207 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-yamlloader?expand=0&rev=1 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/happy_utf8.patch b/happy_utf8.patch new file mode 100644 index 0000000..25bdcbd --- /dev/null +++ b/happy_utf8.patch @@ -0,0 +1,11 @@ +--- a/setup.py ++++ b/setup.py +@@ -13,7 +13,7 @@ with io.open(os.path.join(here, 'require + + def long_description(): + """Load README.rst.""" +- with open('README.rst', 'r') as f: ++ with io.open('README.rst', 'r', encoding="utf-8") as f: + return f.read() + + diff --git a/python-yamlloader.changes b/python-yamlloader.changes new file mode 100644 index 0000000..63c8d90 --- /dev/null +++ b/python-yamlloader.changes @@ -0,0 +1,6 @@ +------------------------------------------------------------------- +Mon Dec 9 11:10:50 UTC 2019 - Matej Cepl + +- Initial packaging effort for yamlloader 0.5.5 +- Add happy_utf8.patch to make package buildable with Python 3.6 + as well. gh#Phynix/yamlloader#16 diff --git a/python-yamlloader.spec b/python-yamlloader.spec new file mode 100644 index 0000000..e7dd336 --- /dev/null +++ b/python-yamlloader.spec @@ -0,0 +1,66 @@ +# +# spec file for package python-yamlloader +# +# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. +# +# 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 http://bugs.opensuse.org/ + + +%{?!python_module:%define python_module() python-%{**} python3-%{**}} +Name: python-yamlloader +Version: 0.5.5 +Release: 0 +License: MIT +Summary: Ordered YAML loader and dumper for PyYAML +Url: https://github.com/Phynix/yamlloader +Group: Development/Languages/Python +Source: https://files.pythonhosted.org/packages/source/y/yamlloader/yamlloader-%{version}.tar.gz +# PATCH-FIX-UPSTREAM happy_utf8.patch gh#Phynix/yamlloader#16 mcepl@suse.com +# Python 3.6 shouldn’t fail on opening utf8 encoded README.rst +Patch0: happy_utf8.patch +BuildRequires: python-rpm-macros +BuildRequires: %{python_module devel} +BuildRequires: %{python_module setuptools} +BuildRequires: %{python_module PyYAML} +BuildRequires: fdupes +BuildArch: noarch + +%python_subpackages + +%description +This module provides loaders and dumpers for PyYAML. Currently, an +OrderedDict loader/dumper is implemented, allowing to keep items order +when loading resp. dumping a file from/to an OrderedDict (Python 3.7: +Also regular dicts are supported and are the default items to be loaded +to. As of Python 3.7 preservation of insertion order is a language +feature of regular dicts.) + +[API Documentation](https://phynix.github.io/yamlloader/index.html). + +%prep +%setup -q -n yamlloader-%{version} +%autopatch -p1 + +%build +%python_build + +%install +%python_install +%python_expand %fdupes %{buildroot}%{$python_sitelib} + +%check +# there are no tests at all. Sorry. + +%files %{python_files} +%{python_sitelib}/* + +%changelog diff --git a/yamlloader-0.5.5.tar.gz b/yamlloader-0.5.5.tar.gz new file mode 100644 index 0000000..300914f --- /dev/null +++ b/yamlloader-0.5.5.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:dcab5f16b39bb03d10dda4cd4f30c943675ec4c7771807fc67e7f1bb319bf4c8 +size 5793