commit 05b954851bba9955a0cc5c57d589046b1e168202e41ae4e6c55048d0d8694b91 Author: Markéta Machová Date: Mon Jun 9 14:14:44 2025 +0000 - Convert to libalternatives OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-glean-parser?expand=0&rev=9 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/fix-yaml-lint.patch b/fix-yaml-lint.patch new file mode 100644 index 0000000..cf77b63 --- /dev/null +++ b/fix-yaml-lint.patch @@ -0,0 +1,45 @@ +From 249c4f460094d84dbe000dd557ec8c423e41e70e Mon Sep 17 00:00:00 2001 +From: Guo Yunhe +Date: Sun, 4 Dec 2022 11:23:24 +0800 +Subject: [PATCH 1/2] Update test_lint.py + +--- + tests/test_lint.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/tests/test_lint.py b/tests/test_lint.py +index 0bc6d0ae..ca42e899 100644 +--- a/tests/test_lint.py ++++ b/tests/test_lint.py +@@ -204,7 +204,7 @@ def test_yaml_lint(capsys): + + nits = lint.lint_yaml_files(file_paths) + +- assert len(nits) == 3 ++ assert len(nits) == 2 + # The second rule is empty because it's a syntax error. + assert set(["indentation", None, "trailing-spaces"]) == set(v.rule for v in nits) + + +From ac22ca9fa810c5ef3d02267492f69317835b19de Mon Sep 17 00:00:00 2001 +From: Guo Yunhe +Date: Sun, 4 Dec 2022 11:29:08 +0800 +Subject: [PATCH 2/2] Update test_lint.py + +--- + tests/test_lint.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/tests/test_lint.py b/tests/test_lint.py +index ca42e899..f8f905ed 100644 +--- a/tests/test_lint.py ++++ b/tests/test_lint.py +@@ -206,7 +206,7 @@ def test_yaml_lint(capsys): + + assert len(nits) == 2 + # The second rule is empty because it's a syntax error. +- assert set(["indentation", None, "trailing-spaces"]) == set(v.rule for v in nits) ++ assert set(["indentation", None]) == set(v.rule for v in nits) + + captured = capsys.readouterr() + lines = captured.out.split("\n") diff --git a/glean_parser-6.3.0.tar.gz b/glean_parser-6.3.0.tar.gz new file mode 100644 index 0000000..437c22c --- /dev/null +++ b/glean_parser-6.3.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:946ef3d7fe24fbbe8101964791b7ad0e609d1ee6a21a87b33f805de8577e6f40 +size 230459 diff --git a/python-glean-parser.changes b/python-glean-parser.changes new file mode 100644 index 0000000..34b5e42 --- /dev/null +++ b/python-glean-parser.changes @@ -0,0 +1,26 @@ +------------------------------------------------------------------- +Mon Jun 9 14:14:27 UTC 2025 - Markéta Machová + +- Convert to libalternatives + +------------------------------------------------------------------- +Tue May 27 14:06:26 UTC 2025 - Markéta Machová + +- Convert to pip-based build + +------------------------------------------------------------------- +Thu May 16 14:48:28 UTC 2024 - Dominique Leuenberger + +- Use %autosetup macro: allows us to eliminate usage of deprecated + %patchN syntax. + +------------------------------------------------------------------- +Tue Dec 27 18:15:46 UTC 2022 - Matej Cepl + +- Fix the name, it should be glean-parser, not glean_parser. + +------------------------------------------------------------------- +Sun Dec 4 03:31:10 UTC 2022 - Yunhe Guo + +- Version 6.3.0 + * events: Increase extras limit to 15 ([bug 1798713](https://bugzilla.mozilla.org/show_bug.cgi?id=1798713)) diff --git a/python-glean-parser.spec b/python-glean-parser.spec new file mode 100644 index 0000000..dcab075 --- /dev/null +++ b/python-glean-parser.spec @@ -0,0 +1,85 @@ +# +# spec file for package python-glean-parser +# +# 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 +Name: python-glean-parser +Version: 6.3.0 +Release: 0 +Summary: Parser tools for Mozilla's Glean telemetry +License: MPL-2.0 +URL: https://github.com/mozilla/glean_parser +Source: https://files.pythonhosted.org/packages/source/g/glean_parser/glean_parser-%{version}.tar.gz +Patch1: remove-pytest.patch +Patch2: fix-yaml-lint.patch +BuildRequires: %{python_module pip} +BuildRequires: %{python_module setuptools_scm >= 7} +BuildRequires: %{python_module setuptools} +BuildRequires: %{python_module wheel} +BuildRequires: alts +BuildRequires: fdupes +BuildRequires: python-rpm-macros +Requires: alts +Requires: python-Jinja2 >= 2.10.1 +Requires: python-MarkupSafe >= 1.1.1 +Requires: python-PyYAML >= 5.3.1 +Requires: python-appdirs >= 1.4 +Requires: python-click >= 7 +Requires: python-diskcache >= 4 +Requires: python-jsonschema >= 3.0.2 +Requires: python-yamllint >= 1.18.0 +Suggests: python-iso8601 >= 0.1.10 +BuildArch: noarch +# SECTION test requirements +BuildRequires: %{python_module Jinja2 >= 2.10.1} +BuildRequires: %{python_module MarkupSafe >= 1.1.1} +BuildRequires: %{python_module PyYAML >= 5.3.1} +BuildRequires: %{python_module appdirs >= 1.4} +BuildRequires: %{python_module click >= 7} +BuildRequires: %{python_module diskcache >= 4} +BuildRequires: %{python_module jsonschema >= 3.0.2} +BuildRequires: %{python_module pytest} +BuildRequires: %{python_module yamllint >= 1.18.0} +# /SECTION +%python_subpackages + +%description +Parser tools for Mozilla's Glean telemetry + +%prep +%autosetup -p1 -n glean_parser-%{version} + +%build +%pyproject_wheel + +%install +%pyproject_install +%python_clone -a %{buildroot}%{_bindir}/glean_parser +%python_expand %fdupes %{buildroot}%{$python_sitelib} + +%check +%pytest + +%pre +%python_libalternatives_reset_alternative glean_parser + +%files %{python_files} +%python_alternative %{_bindir}/glean_parser +%{python_sitelib}/glean_parser +%{python_sitelib}/glean_parser-%{version}*-info + +%changelog diff --git a/remove-pytest.patch b/remove-pytest.patch new file mode 100644 index 0000000..3e791a9 --- /dev/null +++ b/remove-pytest.patch @@ -0,0 +1,27 @@ +From 390a0e180f69c43bff3dd1fe04695f5c37b4369b Mon Sep 17 00:00:00 2001 +From: Guo Yunhe +Date: Sun, 4 Dec 2022 00:44:26 +0800 +Subject: [PATCH] remove pytest + +--- + setup.py | 2 -- + 1 file changed, 2 deletions(-) + +diff --git a/setup.py b/setup.py +index 09f121d1..04a517e2 100755 +--- a/setup.py ++++ b/setup.py +@@ -36,13 +36,11 @@ + ] + + setup_requirements = [ +- "pytest-runner", + "setuptools-scm<7; python_version<='3.6'", + "setuptools-scm>=7; python_version>'3.6'", + ] + + test_requirements = [ +- "pytest", + ] + + setup(