From 9b551e4583efd12f72e3508e4b28e5de89587d18c68f0cba4181f3a9d7cfd5f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mark=C3=A9ta=20Machov=C3=A1?= Date: Wed, 11 Jun 2025 11:44:04 +0000 Subject: [PATCH] - Convert to pip-based build OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-rencode?expand=0&rev=8 --- .gitattributes | 23 +++++++++++++++ .gitignore | 1 + python-rencode.changes | 23 +++++++++++++++ python-rencode.spec | 67 ++++++++++++++++++++++++++++++++++++++++++ v1.0.6.tar.gz | 3 ++ 5 files changed, 117 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 python-rencode.changes create mode 100644 python-rencode.spec create mode 100644 v1.0.6.tar.gz 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/python-rencode.changes b/python-rencode.changes new file mode 100644 index 0000000..d13bfc3 --- /dev/null +++ b/python-rencode.changes @@ -0,0 +1,23 @@ +------------------------------------------------------------------- +Wed Jun 11 11:43:51 UTC 2025 - Markéta Machová + +- Convert to pip-based build + +------------------------------------------------------------------- +Fri Mar 1 09:43:25 UTC 2019 - Tomáš Chvátal + +- Update to 1.0.6: + * Various packaging fixes +- Switch to github tarball to get all needed files (missing pyx on pypi) +- Run tests + +------------------------------------------------------------------- +Thu Jul 20 17:26:53 UTC 2017 - aloisio@gmx.com + +- Set correct license + +------------------------------------------------------------------- +Mon Jun 5 12:48:15 UTC 2017 - aloisio@gmx.com + +- Initial package (v. 1.0.5) + diff --git a/python-rencode.spec b/python-rencode.spec new file mode 100644 index 0000000..be1d0ac --- /dev/null +++ b/python-rencode.spec @@ -0,0 +1,67 @@ +# +# spec file for package python-rencode +# +# Copyright (c) 2025 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/ +# + + +Name: python-rencode +Version: 1.0.6 +Release: 0 +Summary: Web safe object pickling/unpickling +License: GPL-3.0-or-later +Group: Development/Languages/Python +URL: https://github.com/aresch/rencode +Source0: https://github.com/aresch/rencode/archive/v%{version}.tar.gz +Source1: %{name}.changes +BuildRequires: %{python_module Cython} +BuildRequires: %{python_module devel} +BuildRequires: %{python_module pip} +BuildRequires: %{python_module setuptools} +BuildRequires: %{python_module wheel} +BuildRequires: fdupes +BuildRequires: python-rpm-macros +%python_subpackages + +%description +The rencode module is a modified version of bencode from the +BitTorrent project. For complex, heterogeneous data structures with +many small elements, r-encodings take up significantly less space than +b-encodings. Python2 version of package + +%prep +%setup -q -n rencode-%{version} +# to "avoid python-bytecode-inconsistent-mtime" warnings +FAKE_TIMESTAMP=$(LC_ALL=C date -u -r %{SOURCE1} +%%y%%m%%d%%H%%M) +find . -name '*.py' -exec touch -mat $FAKE_TIMESTAMP {} \; +# do not use O3 +sed -i -e '/extra_compile_args/d' setup.py + +%build +export CFLAGS="%{optflags} -fno-strict-aliasing" +%pyproject_wheel + +%install +%pyproject_install +%python_expand %fdupes %{buildroot}%{$python_sitearch}/rencode + +%check +%python_expand PYTHONPATH=%{buildroot}%{$python_sitearch} $python tests/test_rencode.py + +%files %{python_files} +%license COPYING +%{python_sitearch}/rencode +%{python_sitearch}/rencode-%{version}*-info + +%changelog diff --git a/v1.0.6.tar.gz b/v1.0.6.tar.gz new file mode 100644 index 0000000..cab213a --- /dev/null +++ b/v1.0.6.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0ed61111f053ea37511da86ca7aed2a3cfda6bdaa1f54a237c4b86eea52f0733 +size 25455