14
0

- Convert to pip-based build and libalternatives

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pykwalify?expand=0&rev=13
This commit is contained in:
2025-06-10 08:06:51 +00:00
committed by Git OBS Bridge
commit fc237c1bcb
5 changed files with 192 additions and 0 deletions

23
.gitattributes vendored Normal file
View 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
View File

@@ -0,0 +1 @@
.osc

3
pykwalify-1.8.0.tar.gz Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:796b2ad3ed4cb99b88308b533fb2f559c30fa6efb4fa9fda11347f483d245884
size 62462

82
python-pykwalify.changes Normal file
View File

@@ -0,0 +1,82 @@
-------------------------------------------------------------------
Tue Jun 10 08:03:27 UTC 2025 - Markéta Machová <mmachova@suse.com>
- Convert to pip-based build and libalternatives
-------------------------------------------------------------------
Thu Mar 21 07:55:17 UTC 2024 - Max Lin <mlin@suse.com>
- Add %{?sle15_python_module_pythons}
-------------------------------------------------------------------
Fri May 28 07:20:34 UTC 2021 - pgajdos@suse.com
- version update to 1.8.0
General changes:
- Dropped support for python 3.5 and below, including 2.7
- ruamel.yaml is now the default and preffered yaml parser
- Dropped support for pyyaml parser
- Update minimum version of ruamel.yaml to 0.16.0
- Update minimum version of python-dateutil to 2.8.0
CLI changes:
- Added new cli argument "--encoding ENCODING" that specifies what encoding to open data and schema files with
Changed behaviour:
- Enum error strings now output all possible values for easier debugging
- Removed deprecated imp module. Dynamic imports imght be affected
New features:
- Implement new type email that uses a relative simple regex to validate email addresses according to RFC 5322 Official Standard
- Implement new type `url` that uses a relative simple regex to validate url:s according to RFC 1808
- Add new argument "schema_file_obj" to Core class. Allows to pass in StringIO or similar interfaced objects to use for validation.
- Add new argument "data_file_obj" to Core class. Allows to pass in StringIO or similar interfaced objects to use for validation.
Bug/issues fixed:
- Fixed a regression from 1.6.1 where ruamel.yaml safe_load would break for all built-in custom python tags.
All normal python tags should now be possible to use again.
- Fixed an issue with regex values that was not converted to str() before regex mapping was attempted.
This should validate things like integers and objects that support str() conversion better.
-------------------------------------------------------------------
Wed May 20 07:26:32 UTC 2020 - Petr Gajdos <pgajdos@suse.com>
- %python3_only -> %python_alternative
-------------------------------------------------------------------
Tue Feb 12 21:23:51 UTC 2019 - t.gruner@katodev.de
- update to verison 1.7.0 (October 3, 2018)
- In this release there was a line removed from the license file. It was modified in the following commit
(cc4e31b39ff4cce2dfbc662baa6469470dd3c033 Wed Oct 3 16:20:59 2018 +0200) and will be the main reason for
the 1.7.0 release. All commits and tags and releases (1.6.1 and all releases before it) prior to this commit will
use the old license that includes the change done in the above mentioned commit. Only release 1.7.0 and commits past
this point will use the new/updated license file.
- Dropped support for python 3.3 and 3.4
- version 1.6.1 (March 13, 2018)
- Added support for keyword *nullable*. It is now possible to allow for a key not to be empty, when *required* keyword is not used.
- Added support for keyword *class*. It will not cause any validation errors, but serves to make kwalify schemas compatible that uses that keywork.
- Bug fixes:
- Improved compatibility with unicodes to validate as strings.
- Changed behaviour:
- Propergate json and yaml loading errors when used from the cli to the user for easier debugging.
- General changes:
- Allow ruamel.yaml versions up to 0.16
- License is now bundled with the built release.
-------------------------------------------------------------------
Tue Dec 4 12:52:23 UTC 2018 - Matej Cepl <mcepl@suse.com>
- Remove superfluous devel dependency for noarch package
-------------------------------------------------------------------
Wed Aug 23 12:01:09 UTC 2017 - t.gruner@katodev.de
- Initial release 1.6.0

83
python-pykwalify.spec Normal file
View File

@@ -0,0 +1,83 @@
#
# spec file for package python-pykwalify
#
# Copyright (c) 2025 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/
#
%bcond_without libalternatives
%{?sle15_python_module_pythons}
Name: python-pykwalify
Version: 1.8.0
Release: 0
Summary: Python lib/cli for JSON/YAML schema validation
License: MIT
Group: Development/Languages/Python
URL: https://github.com/grokzen/pykwalify
Source: https://files.pythonhosted.org/packages/source/p/pykwalify/pykwalify-%{version}.tar.gz
BuildRequires: %{python_module pip}
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module wheel}
BuildRequires: alts
BuildRequires: fdupes
BuildRequires: python-rpm-macros
Requires: alts
Requires: python-PyYAML >= 3.11
Requires: python-docopt >= 0.6.2
Requires: python-python-dateutil >= 2.4.2
Requires: python-ruamel.yaml >= 0.16.0
Suggests: python-ruamel.yaml >= 0.11.0
BuildArch: noarch
# SECTION test requirements
BuildRequires: %{python_module PyYAML >= 3.11}
BuildRequires: %{python_module docopt >= 0.6.2}
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module python-dateutil >= 2.4.2}
BuildRequires: %{python_module ruamel.yaml >= 0.16.0}
BuildRequires: %{python_module testfixtures}
# /SECTION
%python_subpackages
%description
YAML/JSON validation library
This framework is a port with a lot added functionality of the java version of the framework kwalify that can be found at: http://www.kuwata-lab.com/kwalify/
The original source code can be found at: http://sourceforge.net/projects/kwalify/files/kwalify-java/0.5.1/
The source code of the latest release that has been used can be found at: https://github.com/sunaku/kwalify. Please note that source code is not the original authors code but a fork/upload of the last release available in ruby.
The schema this library is base and extended from: http://www.kuwata-lab.com/kwalify/ruby/users-guide.01.html#schema
%prep
%setup -q -n pykwalify-%{version}
%build
%pyproject_wheel
%install
%pyproject_install
%python_clone -a %{buildroot}%{_bindir}/pykwalify
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%check
%pyunittest discover -v
%pre
%python_libalternatives_reset_alternative pykwalify
%files %{python_files}
%doc README.md
%license LICENSE
%python_alternative %{_bindir}/pykwalify
%{python_sitelib}/pykwalify
%{python_sitelib}/pykwalify-%{version}*-info
%changelog