From 6e5740bde7352f0777aa45a37ba4b70e5113328734672c68132a78d43656240f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mark=C3=A9ta=20Machov=C3=A1?= Date: Tue, 26 Aug 2025 08:25:58 +0000 Subject: [PATCH] - Convert to libalternatives on SLE-16-based and newer systems OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-validate-pyproject?expand=0&rev=11 --- .gitattributes | 23 +++++++ .gitignore | 1 + python-validate-pyproject.changes | 66 +++++++++++++++++++ python-validate-pyproject.spec | 102 ++++++++++++++++++++++++++++++ validate-pyproject-0.15.tar.gz | 3 + 5 files changed, 195 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 python-validate-pyproject.changes create mode 100644 python-validate-pyproject.spec create mode 100644 validate-pyproject-0.15.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-validate-pyproject.changes b/python-validate-pyproject.changes new file mode 100644 index 0000000..e678e09 --- /dev/null +++ b/python-validate-pyproject.changes @@ -0,0 +1,66 @@ +------------------------------------------------------------------- +Tue Aug 26 08:25:02 UTC 2025 - Markéta Machová + +- Convert to libalternatives on SLE-16-based and newer systems + +------------------------------------------------------------------- +Fri Dec 15 19:55:31 UTC 2023 - Dirk Müller + +- update to 0.15: + * Update ``setuptools`` schema definitions, #112 + * Add ``__repr__`` to plugin wrapper + * Fix standard ``$schema`` ending ``#`` + * Ensure reporting show more detailed error messages for + ``RedefiningStaticFieldAsDynamic`` + * Add support for ``repo-review`` + +------------------------------------------------------------------- +Tue May 30 10:17:06 UTC 2023 - Daniel Garcia + +- Update to 0.13: + * Make it clear when using input from ``stdin``, #96 + * Fix summary for ``allOf``, #100 + * ``setuptools`` plugin: + * Improve validation of ``attr`` directives, #101 + +------------------------------------------------------------------- +Fri May 12 09:59:00 UTC 2023 - Daniel Garcia + +- Update to 0.12.2: + * setuptools plugin: + * Fix problem with license-files patterns, by removing default value. +- 0.12.1: + * setuptools plugin: + * Allow PEP 561 stub names in tool.setuptools.package-dir, #87 +- 0.12.0: + * setuptools plugin: + * Allow PEP 561 stub names in tool.setuptools.packages, #86 +- 0.11.0: + * Improve error message for invalid replacements in the pre_compile CLI, #71 + * Allow package to be build from git archive, #53 + * Improve error message for invalid replacements in the pre_compile CLI, #71 + * Error-out when extra keys are added to project.authors/maintainers, #82 + * De-vendor fastjsonschema, #83 +- 0.10.1: + * Ensure LICENSE.txt is added to wheel. +- 0.10.0: + * Add NOTICE.txt to license_files, #58 + * Use default SSL context when downloading classifiers from PyPI, #57 + * Remove setup.py, #52 + * Explicitly limit oldest supported Python version + * Replace usage of cgi.parse_header with email.message.Message + +------------------------------------------------------------------- +Fri Apr 21 12:38:26 UTC 2023 - Dirk Müller + +- add sle15_python_module_pythons (jsc#PED-68) + +------------------------------------------------------------------- +Tue Apr 18 22:39:34 UTC 2023 - Matej Cepl + +- Switch to single spec version build for PSP + +------------------------------------------------------------------- +Wed Jul 13 15:53:58 UTC 2022 - Ben Greiner + +- initial specfile for v0.9, required by ini2toml diff --git a/python-validate-pyproject.spec b/python-validate-pyproject.spec new file mode 100644 index 0000000..412416a --- /dev/null +++ b/python-validate-pyproject.spec @@ -0,0 +1,102 @@ +# +# spec file for package python-validate-pyproject +# +# 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/ +# + + +%if 0%{?suse_version} > 1500 +%bcond_without libalternatives +%else +%bcond_with libalternatives +%endif +%{?sle15_python_module_pythons} +Name: python-validate-pyproject +Version: 0.15 +Release: 0 +Summary: Validation library and CLI tool for checking on 'pyprojecttoml' +License: BSD-3-Clause AND MIT AND MPL-2.0 +URL: https://github.com/abravalheri/validate-pyproject/ +Source: https://files.pythonhosted.org/packages/source/v/validate-pyproject/validate-pyproject-%{version}.tar.gz +BuildRequires: %{python_module fastjsonschema} +BuildRequires: %{python_module pip} +BuildRequires: %{python_module setuptools_scm} +BuildRequires: %{python_module setuptools} +BuildRequires: %{python_module wheel} +BuildRequires: fdupes +BuildRequires: python-rpm-macros +Requires: python-fastjsonschema +Provides: python-validate_pyproject = %{version}-%{release} +BuildArch: noarch +%if 0%{python_version_nodots} < 38 +Requires: python-importlib-metadata +%endif +%if 0%{python_version_nodots} < 37 +Requires: python-importlib-resources +%endif +%if %{with libalternatives} +BuildRequires: alts +Requires: alts +%else +Requires(post): update-alternatives +Requires(postun): update-alternatives +%endif +# SECTION test +BuildRequires: %{python_module importlib-metadata if %python-base < 3.8} +BuildRequires: %{python_module importlib-resources if %python-base < 3.7} +BuildRequires: %{python_module packaging >= 20.4} +BuildRequires: %{python_module pytest} +BuildRequires: %{python_module tomli >= 1.2.1 if %python-base < 3.11} +BuildRequires: %{python_module trove-classifiers >= 2021.10.20} +# /SECTION +%python_subpackages + +%description +Validation library and CLI tool for checking on 'pyproject.toml' files using JSON Schema + +%prep +%setup -q -n validate-pyproject-%{version} +sed -i '/--cov/d' setup.cfg + +%build +# have to use PEP517: gh#abravalheri/validate-pyproject#52 +%pyproject_wheel + +%install +%pyproject_install +%python_clone -a %{buildroot}%{_bindir}/validate-pyproject +%python_expand %fdupes %{buildroot}%{$python_sitelib} + +%check +# Ignore test_pre_compile that fails because how fastjsonschema and +# validate-pyproject packages are installed +%pytest --ignore tests/test_pre_compile.py --ignore tests/test_vendoring.py -k "not downloaded" + +%post +%python_install_alternative validate-pyproject + +%postun +%python_uninstall_alternative validate-pyproject + +%pre +%python_libalternatives_reset_alternative validate-pyproject + +%files %{python_files} +%doc AUTHORS.rst CHANGELOG.rst README.rst +%license LICENSE.txt +%python_alternative %{_bindir}/validate-pyproject +%{python_sitelib}/validate_pyproject +%{python_sitelib}/validate_pyproject-%{version}*-info + +%changelog diff --git a/validate-pyproject-0.15.tar.gz b/validate-pyproject-0.15.tar.gz new file mode 100644 index 0000000..035d589 --- /dev/null +++ b/validate-pyproject-0.15.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fc82b61f887739a4092de612466a5ab28ec47c407b19c6caef8d54c88c1d10c0 +size 91833