From 0c97182d089f8929e6dea63f7e042af549048661aa55f9a77827d949f33924b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mark=C3=A9ta=20Machov=C3=A1?= Date: Wed, 25 Sep 2024 07:54:46 +0000 Subject: [PATCH] - Enable sle15_python_module_pythons. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-msoffcrypto-tool?expand=0&rev=12 --- .gitattributes | 23 ++++++++++ .gitignore | 1 + msoffcrypto-tool-4.10.2.tar.gz | 3 ++ python-msoffcrypto-tool.changes | 31 +++++++++++++ python-msoffcrypto-tool.spec | 78 +++++++++++++++++++++++++++++++++ 5 files changed, 136 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 msoffcrypto-tool-4.10.2.tar.gz create mode 100644 python-msoffcrypto-tool.changes create mode 100644 python-msoffcrypto-tool.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/msoffcrypto-tool-4.10.2.tar.gz b/msoffcrypto-tool-4.10.2.tar.gz new file mode 100644 index 0000000..7c91f0c --- /dev/null +++ b/msoffcrypto-tool-4.10.2.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:beda602d97ca2913a1da697f840290b2dfdf0ee1d60bc230468df1e7de41da98 +size 209348 diff --git a/python-msoffcrypto-tool.changes b/python-msoffcrypto-tool.changes new file mode 100644 index 0000000..ad81b57 --- /dev/null +++ b/python-msoffcrypto-tool.changes @@ -0,0 +1,31 @@ +------------------------------------------------------------------- +Tue Sep 24 18:36:13 UTC 2024 - Guang Yee + +- Enable sle15_python_module_pythons. + +------------------------------------------------------------------- +Sun Aug 16 15:25:25 UTC 2020 - John Vandenberg + +- Replace nose with pytest + +------------------------------------------------------------------- +Mon May 25 06:50:54 UTC 2020 - Petr Gajdos + +- %python3_only -> %python_alternative + +------------------------------------------------------------------- +Wed Apr 15 13:57:30 UTC 2020 - pgajdos@suse.com + +- version update to 4.10.2 + * Make _packUserEditAtom spec-compliant + +------------------------------------------------------------------- +Wed Sep 11 11:10:17 UTC 2019 - Tomáš Chvátal + +- Update to 4.10.1: + * ship license file + +------------------------------------------------------------------- +Thu Aug 1 04:15:10 PM UTC 2019 - John Vandenberg + +- Initial spec for v4.10.0 diff --git a/python-msoffcrypto-tool.spec b/python-msoffcrypto-tool.spec new file mode 100644 index 0000000..814555c --- /dev/null +++ b/python-msoffcrypto-tool.spec @@ -0,0 +1,78 @@ +# +# spec file for package python-msoffcrypto-tool +# +# 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-msoffcrypto-tool +Version: 4.10.2 +Release: 0 +Summary: Library for decrypting MS Office files +License: MIT +Group: Development/Languages/Python +URL: https://github.com/nolze/msoffcrypto-tool +Source: https://files.pythonhosted.org/packages/source/m/msoffcrypto-tool/msoffcrypto-tool-%{version}.tar.gz +BuildRequires: %{python_module setuptools} +BuildRequires: fdupes +BuildRequires: python-rpm-macros +Requires: python-cryptography >= 2.3 +Requires: python-olefile >= 0.45 +Requires: python-setuptools +Requires(post): update-alternatives +Requires(postun): update-alternatives +BuildArch: noarch +# SECTION test requirements +BuildRequires: %{python_module coverage} +BuildRequires: %{python_module cryptography >= 2.3} +BuildRequires: %{python_module olefile >= 0.45} +BuildRequires: %{python_module pytest} +# /SECTION +%python_subpackages + +%description +A Python tool and library for decrypting MS Office +files with passwords or other keys. + +%prep +%setup -q -n msoffcrypto-tool-%{version} +# Delete empty file as of v4.10.0 +wc -c msoffcrypto/method/xor_obfuscation.py | sed -n '/^0/{s/^0\s//;p}' | xargs rm + +%build +%python_build + +%install +%python_install +%python_clone -a %{buildroot}%{_bindir}/msoffcrypto-tool +%python_expand %fdupes %{buildroot}%{$python_sitelib} + +%check +# pytest creates an illegitimate doctest case for __main__ which then fails +%pytest --doctest-modules -k 'not __main__' + +%post +%python_install_alternative msoffcrypto-tool + +%postun +%python_uninstall_alternative msoffcrypto-tool + +%files %{python_files} +%doc README.md +%license LICENSE.txt +%python_alternative %{_bindir}/msoffcrypto-tool +%{python_sitelib}/* + +%changelog