From 1453ebf70d80d4760d6c4abfc1e756baf5b8312605af3c8fc950999745eecd18 Mon Sep 17 00:00:00 2001 From: Daniel Garcia Date: Thu, 22 Dec 2022 10:15:44 +0000 Subject: [PATCH] Accepting request 1044070 from home:bnavigator:branches:devel:languages:python required by py7zr OBS-URL: https://build.opensuse.org/request/show/1044070 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pyppmd?expand=0&rev=1 --- .gitattributes | 23 ++++++++++++ .gitignore | 1 + pyppmd-1.0.0.tar.gz | 3 ++ python-pyppmd.changes | 5 +++ python-pyppmd.spec | 84 +++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 116 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 pyppmd-1.0.0.tar.gz create mode 100644 python-pyppmd.changes create mode 100644 python-pyppmd.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/pyppmd-1.0.0.tar.gz b/pyppmd-1.0.0.tar.gz new file mode 100644 index 0000000..b1ad6e7 --- /dev/null +++ b/pyppmd-1.0.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:075c9bd297e3b0a87dd7aeabca7fee668218acbe69ecc1c6511064558de8840f +size 1350611 diff --git a/python-pyppmd.changes b/python-pyppmd.changes new file mode 100644 index 0000000..e131607 --- /dev/null +++ b/python-pyppmd.changes @@ -0,0 +1,5 @@ +------------------------------------------------------------------- +Wed Dec 21 11:05:13 UTC 2022 - Ben Greiner + +- Initial specfile for v1.0.0 +- Required by py7zr diff --git a/python-pyppmd.spec b/python-pyppmd.spec new file mode 100644 index 0000000..007fd57 --- /dev/null +++ b/python-pyppmd.spec @@ -0,0 +1,84 @@ +# +# spec file for package python-pyppmd +# +# 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/ +# + + +%define skip_python2 1 +Name: python-pyppmd +Version: 1.0.0 +Release: 0 +Summary: PPMd compression/decompression library +License: LGPL-2.1-or-later +URL: https://codeberg.org/miurahr/pyppmd +Source: https://files.pythonhosted.org/packages/source/p/pyppmd/pyppmd-%{version}.tar.gz +BuildRequires: %{python_module devel >= 3.6} +BuildRequires: %{python_module pip} +BuildRequires: %{python_module setuptools >= 58.0} +BuildRequires: %{python_module setuptools_scm >= 6.0.1} +BuildRequires: %{python_module wheel} +BuildRequires: fdupes +BuildRequires: python-rpm-macros +# SECTION test +BuildRequires: %{python_module hypothesis} +BuildRequires: %{python_module py-cpuinfo} +BuildRequires: %{python_module pytest >= 6} +BuildRequires: %{python_module pytest-benchmark} +BuildRequires: %{python_module pytest-timeout} +# /SECTION +%python_subpackages + +%description +The pyppmd module provides classes and functions for compressing and +decompressing text data, using PPM(Prediction by partial matching) +compression algorithm which has several variations of implementations. +PPMd is the implementation by Dmitry Shkarin. PyPPMD use Igor Pavlov's +range coder introduced in 7-zip. + +The API is similar to Python's bz2/lzma/zlib module. + +Some parts of th codes are derived from 7-zip, pyzstd and ppmd-cffi. + +%prep +%setup -q -n pyppmd-%{version} +# increase test deadline for slow obs executions (e.g. on s390x) +echo " + +import hypothesis +hypothesis.settings.register_profile( + 'obs', + deadline=5000, + suppress_health_check=[hypothesis.HealthCheck.too_slow] +) +" >> tests/conftest.py + +%build +export CFLAGS="%{optflags}" +%pyproject_wheel + +%install +%pyproject_install +%python_expand %fdupes %{buildroot}%{$python_sitearch} + +%check +%pytest_arch --hypothesis-profile=obs + +%files %{python_files} +%doc Changelog.rst README.rst +%license LICENSE +%{python_sitearch}/pyppmd +%{python_sitearch}/pyppmd-%{version}.dist-info + +%changelog