From 0472d3ebdce4ed3f6d0a688aa1ea4d5eca5decc65fc8f8a305a39f6bba2fc970 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mark=C3=A9ta=20Machov=C3=A1?= Date: Mon, 5 Jun 2023 12:55:34 +0000 Subject: [PATCH] Accepting request 1090701 from home:XRevan86 OBS-URL: https://build.opensuse.org/request/show/1090701 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-omemo-dr?expand=0&rev=1 --- .gitattributes | 23 +++++++++++++ .gitignore | 1 + omemo-dr-python-3.9.patch | 36 ++++++++++++++++++++ omemo-dr-v1.0.0.tar.bz2 | 3 ++ python-omemo-dr.changes | 4 +++ python-omemo-dr.spec | 72 +++++++++++++++++++++++++++++++++++++++ 6 files changed, 139 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 omemo-dr-python-3.9.patch create mode 100644 omemo-dr-v1.0.0.tar.bz2 create mode 100644 python-omemo-dr.changes create mode 100644 python-omemo-dr.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/omemo-dr-python-3.9.patch b/omemo-dr-python-3.9.patch new file mode 100644 index 0000000..8dcfec4 --- /dev/null +++ b/omemo-dr-python-3.9.patch @@ -0,0 +1,36 @@ +--- a/pyproject.toml ++++ b/pyproject.toml +@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" + + [project] + name = "omemo-dr" +-requires-python = ">=3.10" ++requires-python = ">=3.9" + description = "OMEMO Double Ratchet" + readme = "README.md" + license = {file = "LICENSE"} +@@ -46,7 +46,7 @@ skip = "*__pycache__*,build,dist,test,*. + ignore-words-list = "claus,pres,ser,trough" + + [tool.pyright] +-pythonVersion = "3.10" ++pythonVersion = "3.9" + pythonPlatform = "All" + typeCheckingMode = "strict" + +--- a/tests/test_sessionbuilder.py ++++ b/tests/test_sessionbuilder.py +@@ -1,3 +1,5 @@ ++from __future__ import annotations ++ + import time + import unittest + +--- a/tests/test_sessioncipher.py ++++ b/tests/test_sessioncipher.py +@@ -1,3 +1,5 @@ ++from __future__ import annotations ++ + import unittest + + from omemo_dr.ecc.curve import Curve diff --git a/omemo-dr-v1.0.0.tar.bz2 b/omemo-dr-v1.0.0.tar.bz2 new file mode 100644 index 0000000..a70b054 --- /dev/null +++ b/omemo-dr-v1.0.0.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:aa8175b946689c1dcb2b62cf2b56f0c8e413d7b455a287949a5f459ac5fdfe24 +size 118320 diff --git a/python-omemo-dr.changes b/python-omemo-dr.changes new file mode 100644 index 0000000..2bab56d --- /dev/null +++ b/python-omemo-dr.changes @@ -0,0 +1,4 @@ +------------------------------------------------------------------- +Sat May 27 13:15:22 UTC 2023 - Alexei Sorokin + +- Initial package. diff --git a/python-omemo-dr.spec b/python-omemo-dr.spec new file mode 100644 index 0000000..06038f8 --- /dev/null +++ b/python-omemo-dr.spec @@ -0,0 +1,72 @@ +# +# spec file for package python-omemo-dr +# +# Copyright (c) 2023 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} +%define _name omemo-dr +Name: python-omemo-dr +Version: 1.0.0 +Release: 0 +Summary: OMEMO Encryption Library +License: GPL-3.0-or-later +Group: Development/Languages/Python +URL: https://dev.gajim.org/gajim/omemo-dr +Source: %{url}/-/archive/%{version}/%{_name}-v%{version}.tar.bz2 +# PATCH-FIX-OPENSUSE omemo-dr-python-3.9.patch -- Reduce required Python version to 3.9. +Patch0: omemo-dr-python-3.9.patch +BuildRequires: %{python_module base >= 3.9} +BuildRequires: %{python_module cryptography} +BuildRequires: %{python_module devel} +BuildRequires: %{python_module packaging} +BuildRequires: %{python_module pip} +# For testing +BuildRequires: %{python_module protobuf >= 4.21.0} +BuildRequires: %{python_module setuptools >= 65.0} +BuildRequires: %{python_module wheel} +BuildRequires: fdupes +BuildRequires: python-rpm-generators >= 20220912 +BuildRequires: python-rpm-macros >= 20220912 +Requires: python-cryptography +Requires: python-protobuf >= 4.21.0 +%{?python_enable_dependency_generator} + +%python_subpackages + +%description +Python library for handling OMEMO encryption. + +%prep +%autosetup -n %{_name}-v%{version} -p1 + +%build +export CFLAGS="%{optflags}" +%pyproject_wheel + +%install +%pyproject_install +%python_expand %fdupes %{buildroot}%{$python_sitearch}/ + +%check +%pyunittest_arch discover -v + +%files %{python_files} +%license LICENSE +%doc README.md +%{python_sitearch}/omemo_dr/ +%{python_sitearch}/omemo_dr-* + +%changelog