From 030fbc37f82488d33083a46baabda2e65fc3d38738fd2c6b3f9268d1a7fada4b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mark=C3=A9ta=20Machov=C3=A1?= Date: Thu, 19 Sep 2024 08:46:43 +0000 Subject: [PATCH] Accepting request 1201900 from home:yarunachalam:branches:home:yeey:OpenWebUI Initial Package OBS-URL: https://build.opensuse.org/request/show/1201900 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-envier?expand=0&rev=1 --- .gitattributes | 23 +++++++++++ .gitignore | 1 + envier-0.5.2-source1.tar.gz | 3 ++ envier-0.5.2.tar.gz | 3 ++ envier-test_types_assert.patch | 20 ++++++++++ python-envier.changes | 14 +++++++ python-envier.spec | 71 ++++++++++++++++++++++++++++++++++ 7 files changed, 135 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 envier-0.5.2-source1.tar.gz create mode 100644 envier-0.5.2.tar.gz create mode 100644 envier-test_types_assert.patch create mode 100644 python-envier.changes create mode 100644 python-envier.spec 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/envier-0.5.2-source1.tar.gz b/envier-0.5.2-source1.tar.gz new file mode 100644 index 0000000..a4301d3 --- /dev/null +++ b/envier-0.5.2-source1.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ed235728802ee2c33f91cf1d933b42681a7de78551b6fe243b0808314d8c38d5 +size 13052 diff --git a/envier-0.5.2.tar.gz b/envier-0.5.2.tar.gz new file mode 100644 index 0000000..a8a2cdf --- /dev/null +++ b/envier-0.5.2.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4e7e398cb09a8dd360508ef7e12511a152355426d2544b8487a34dad27cc20ad +size 9503 diff --git a/envier-test_types_assert.patch b/envier-test_types_assert.patch new file mode 100644 index 0000000..77cd1f0 --- /dev/null +++ b/envier-test_types_assert.patch @@ -0,0 +1,20 @@ +diff -ruN envier-0.5.2-source1.orig/tests/test_types.py envier-0.5.2-source1.new/tests/test_types.py +--- envier-0.5.2-source1/tests/test_types.py 2024-07-05 05:32:42.000000000 -0500 ++++ envier-0.5.2-source1/tests/test_types.py 2024-09-10 19:39:24.092484956 -0500 +@@ -20,12 +20,12 @@ + out.decode() + == """tests/types_test.py:43: error: Incompatible types in assignment (expression has type "int", variable has type "str") [assignment] + tests/types_test.py:44: error: Incompatible types in assignment (expression has type "str", variable has type "CustomObject") [assignment] +-tests/types_test.py:45: error: Incompatible types in assignment (expression has type "bool", variable has type "Optional[str]") [assignment] +-tests/types_test.py:46: error: Incompatible types in assignment (expression has type "bytes", variable has type "Optional[CustomObject]") [assignment] ++tests/types_test.py:45: error: Incompatible types in assignment (expression has type "bool", variable has type "str | None") [assignment] ++tests/types_test.py:46: error: Incompatible types in assignment (expression has type "bytes", variable has type "CustomObject | None") [assignment] + tests/types_test.py:48: error: Incompatible types in assignment (expression has type "int", variable has type "str") [assignment] + tests/types_test.py:49: error: Incompatible types in assignment (expression has type "str", variable has type "CustomObject") [assignment] +-tests/types_test.py:50: error: Incompatible types in assignment (expression has type "bool", variable has type "Optional[str]") [assignment] +-tests/types_test.py:51: error: Incompatible types in assignment (expression has type "bytes", variable has type "Optional[CustomObject]") [assignment] ++tests/types_test.py:50: error: Incompatible types in assignment (expression has type "bool", variable has type "str | None") [assignment] ++tests/types_test.py:51: error: Incompatible types in assignment (expression has type "bytes", variable has type "CustomObject | None") [assignment] + Found 8 errors in 1 file (checked 1 source file) + """ + ) diff --git a/python-envier.changes b/python-envier.changes new file mode 100644 index 0000000..b66ae4c --- /dev/null +++ b/python-envier.changes @@ -0,0 +1,14 @@ +------------------------------------------------------------------- +Tue Sep 10 20:58:14 UTC 2024 - Yogalakshmi Arunachalam + +- Included Source1 to enable test + +------------------------------------------------------------------- +Mon Sep 9 18:43:08 UTC 2024 - Yogalakshmi Arunachalam + +- Fixed Description and enable test + +------------------------------------------------------------------- +Fri Aug 30 04:23:48 UTC 2024 - Yogalakshmi Arunachalam + +- Initial Package diff --git a/python-envier.spec b/python-envier.spec new file mode 100644 index 0000000..be8bc54 --- /dev/null +++ b/python-envier.spec @@ -0,0 +1,71 @@ +# +# spec file for package python-envier +# +# Copyright (c) 2024 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/ +# + +%{?sle15_python_module_pythons} +Name: python-envier +Version: 0.5.2 +Release: 0 +Summary: Python application configuration via the environment +License: BSD-3-Clause +URL: None +Source: https://files.pythonhosted.org/packages/source/e/envier/envier-%{version}.tar.gz +Source1: https://github.com/DataDog/envier/archive/refs/tags/v%{version}.tar.gz#/envier-%{version}-source1.tar.gz +Patch0: envier-test_types_assert.patch +BuildRequires: python-rpm-macros +BuildRequires: %{python_module hatch-vcs} +BuildRequires: %{python_module hatchling} +BuildRequires: %{python_module pip} +BuildRequires: %{python_module setuptools} +BuildRequires: %{python_module pytest} +BuildRequires: %{python_module mypy} +BuildRequires: fdupes +Requires: mypy +Suggests: python-mypy +BuildArch: noarch +%python_subpackages + +%description +Envier is a Python library for extracting configuration from environment +variables in a declarative and (eventually) 12-factor-app-compliant way. + +%prep +%setup -q -n envier-%{version} +mkdir -p envier-%{version}-source1 +tar -xzf %{SOURCE1} -C envier-%{version}-source1 --strip-components=1 +# Apply the patch to the files from Source1 +pushd envier-%{version}-source1 +%patch0 -p1 +popd + +%build +%pyproject_wheel + +%install +%pyproject_install +%python_expand %fdupes %{buildroot}%{$python_sitelib} + +%check +cd envier-%{version}-source1 +%pytest -v + +%files %{python_files} +%doc README.md +%license LICENSE +%{python_sitelib}/envier +%{python_sitelib}/envier-%{version}.dist-info + +%changelog