From f208d141a65be9db8e78373448270e0d3f0e3754ae9581d4c0166970c25f4d5b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mark=C3=A9ta=20Machov=C3=A1?= Date: Thu, 15 May 2025 11:02:59 +0000 Subject: [PATCH] - Convert to pip-based build OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-bencode?expand=0&rev=17 --- .gitattributes | 23 +++++++++++++++ .gitignore | 1 + bencode.py-4.0.0.tar.gz | 3 ++ python-bencode.changes | 59 +++++++++++++++++++++++++++++++++++++ python-bencode.spec | 64 +++++++++++++++++++++++++++++++++++++++++ 5 files changed, 150 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 bencode.py-4.0.0.tar.gz create mode 100644 python-bencode.changes create mode 100644 python-bencode.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/bencode.py-4.0.0.tar.gz b/bencode.py-4.0.0.tar.gz new file mode 100644 index 0000000..f66d841 --- /dev/null +++ b/bencode.py-4.0.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2a24ccda1725a51a650893d0b63260138359eaa299bb6e7a09961350a2a6e05c +size 19842 diff --git a/python-bencode.changes b/python-bencode.changes new file mode 100644 index 0000000..5abaf81 --- /dev/null +++ b/python-bencode.changes @@ -0,0 +1,59 @@ +------------------------------------------------------------------- +Wed May 14 09:12:50 UTC 2025 - Markéta Machová + +- Convert to pip-based build + +------------------------------------------------------------------- +Mon Mar 6 21:13:14 UTC 2023 - Dirk Müller + +- update to 4.0.0: + * Improved API has been moved to the `bencodepy` package + * Implemented backwards-compatible `bencode` package (#16) + * Exception raised while attempting to decode strings on + Python 3+ + * Improvements to the handling of binary values (#14) + * Dropped support for Python 2.6, 3.4 + +------------------------------------------------------------------- +Mon Oct 14 11:42:38 UTC 2019 - Matej Cepl + +- Replace %fdupes -s with plain %fdupes; hardlinks are better. + +------------------------------------------------------------------- +Mon Jun 10 05:46:29 UTC 2019 - pgajdos@suse.com + +- version update to 2.1.0 + * added: Type information + * fixed: Inconsistent return behavior +- deleted sources + - BitTorrent-1.1.txt (not needed) + +------------------------------------------------------------------- +Tue Jun 4 07:01:19 UTC 2019 - pgajdos@suse.com + +- version update to 2.0.0 + * Support for bytes + * File read/write functions: bread(fp), bwrite(data, fp) + * Improved support for unicode strings +- added sources + https://github.com/fuzeman/bencode.py/issues/12 + + BitTorrent-1.1.txt + +------------------------------------------------------------------- +Tue Dec 4 12:46:04 UTC 2018 - Matej Cepl + +- Remove superfluous devel dependency for noarch package + +------------------------------------------------------------------- +Tue May 2 20:54:08 UTC 2017 - Greg.Freemyer@gmail.com + +- update to match bencode v1.2.0 + * See bencode v.2.0 for history. This package is a simple fork of the metadata decode logic. +- add buildrequires: python-pbr which is used to provide reasonable defaults python's setup tool +- convert to python singlespec + +------------------------------------------------------------------- +Sat Aug 23 19:27:37 UTC 2014 - mardnh@gmx.de + +- Initial package release, version 1.0 + diff --git a/python-bencode.spec b/python-bencode.spec new file mode 100644 index 0000000..7c45dc3 --- /dev/null +++ b/python-bencode.spec @@ -0,0 +1,64 @@ +# +# spec file for package python-bencode +# +# 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-bencode +Version: 4.0.0 +Release: 0 +Summary: The BitTorrent bencode module as light-weight, standalone package +License: BitTorrent-1.1 +URL: https://github.com/fuzeman/bencode.py +Source0: https://files.pythonhosted.org/packages/source/b/bencode.py/bencode.py-%{version}.tar.gz +BuildRequires: %{python_module pbr} +BuildRequires: %{python_module pip} +BuildRequires: %{python_module setuptools} +BuildRequires: %{python_module wheel} +BuildRequires: fdupes +BuildRequires: python-rpm-macros +BuildArch: noarch +# SECTION test requirements +BuildRequires: %{python_module pytest} +# /SECTION +%python_subpackages + +%description +This package simply re-packages the existing bencoding and bdecoding +implemention from the 'official' BitTorrent client as a separate, +leight-weight package for re-using them without having the entire +BitTorrent software as a dependency. + +%prep +%setup -q -n bencode.py-%{version} + +%build +%pyproject_wheel + +%install +%pyproject_install +%python_expand %fdupes %{buildroot}%{$python_sitelib} + +%check +%pytest + +%files %{python_files} +%license LICENSE +%doc README.rst +%{python_sitelib}/bencode +%{python_sitelib}/bencodepy +%{python_sitelib}/bencode[._]py-%{version}*-info + +%changelog