From 07bdc9187fac30a210e98d81ee61833c9d1f53fbc50b8cb1532a6ea2ff4ad757 Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Tue, 27 Dec 2022 17:42:23 +0000 Subject: [PATCH] Accepting request 1045376 from home:guoyunhe needed for mozilla vpn OBS-URL: https://build.opensuse.org/request/show/1045376 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-glean-parser?expand=0&rev=1 --- .gitattributes | 23 ++++++++++ .gitignore | 1 + fix-yaml-lint.patch | 45 ++++++++++++++++++++ glean_parser-6.3.0.tar.gz | 3 ++ python-glean_parser.changes | 5 +++ python-glean_parser.spec | 85 +++++++++++++++++++++++++++++++++++++ remove-pytest.patch | 27 ++++++++++++ 7 files changed, 189 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 fix-yaml-lint.patch create mode 100644 glean_parser-6.3.0.tar.gz create mode 100644 python-glean_parser.changes create mode 100644 python-glean_parser.spec create mode 100644 remove-pytest.patch 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..3be369e --- /dev/null +++ b/python-glean_parser.changes @@ -0,0 +1,5 @@ +------------------------------------------------------------------- +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..9320cb6 --- /dev/null +++ b/python-glean_parser.spec @@ -0,0 +1,85 @@ +# +# spec file for package python-glean_parser +# +# Copyright (c) 2022 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/ +# + + +%{?!python_module:%define python_module() python-%{**} python3-%{**}} +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-rpm-macros +BuildRequires: %{python_module setuptools} +BuildRequires: %{python_module setuptools_scm >= 7} +# SECTION test requirements +BuildRequires: %{python_module appdirs >= 1.4} +BuildRequires: %{python_module click >= 7} +BuildRequires: %{python_module diskcache >= 4} +BuildRequires: %{python_module Jinja2 >= 2.10.1} +BuildRequires: %{python_module jsonschema >= 3.0.2} +BuildRequires: %{python_module MarkupSafe >= 1.1.1} +BuildRequires: %{python_module PyYAML >= 5.3.1} +BuildRequires: %{python_module yamllint >= 1.18.0} +BuildRequires: %{python_module pytest} +# /SECTION +BuildRequires: fdupes +Requires: python-appdirs >= 1.4 +Requires: python-click >= 7 +Requires: python-diskcache >= 4 +Requires: python-Jinja2 >= 2.10.1 +Requires: python-jsonschema >= 3.0.2 +Requires: python-MarkupSafe >= 1.1.1 +Requires: python-PyYAML >= 5.3.1 +Requires: python-yamllint >= 1.18.0 +Suggests: python-iso8601 >= 0.1.10 +BuildArch: noarch +%python_subpackages + +%description +Parser tools for Mozilla's Glean telemetry + +%prep +%setup -q -n glean_parser-%{version} +%patch1 -p1 +%patch2 -p1 + +%build +%python_build + +%install +%python_install +%python_clone -a %{buildroot}%{_bindir}/glean_parser +%python_expand %fdupes %{buildroot}%{$python_sitelib} + +%check +%pytest + +%post +%python_install_alternative glean_parser + +%postun +%python_uninstall_alternative glean_parser + +%files %{python_files} +%python_alternative %{_bindir}/glean_parser +%{python_sitelib}/* + +%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(