From 213a21c806683341b153dd846a36ab243659a20de60201fd35795be2fd7a3192 Mon Sep 17 00:00:00 2001 From: Greg Freemyer Date: Wed, 3 May 2017 21:59:27 +0000 Subject: [PATCH] Accepting request 492754 from home:gregfreemyer:Tools-for-forensic-boot-cd Update to python singlespec OBS-URL: https://build.opensuse.org/request/show/492754 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-bencode?expand=0&rev=4 --- python-bencode.changes | 1 + python-bencode.spec | 22 +++++++++++----------- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/python-bencode.changes b/python-bencode.changes index 895d8c6..12d1188 100644 --- a/python-bencode.changes +++ b/python-bencode.changes @@ -4,6 +4,7 @@ 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 diff --git a/python-bencode.spec b/python-bencode.spec index d500ca1..8784dad 100644 --- a/python-bencode.spec +++ b/python-bencode.spec @@ -16,6 +16,8 @@ # +%{?!python_module:%define python_module() python-%{**} python3-%{**}} +%define oldpython python Name: python-bencode Version: 1.2.0 Release: 0 @@ -24,16 +26,14 @@ License: BitTorrent-1.1 Group: Development/Languages/Python Url: http://bittorrent.com/ Source: https://files.pythonhosted.org/packages/source/b/bencode.py/bencode.py-1.2.0.tar.gz +BuildRequires: python-rpm-macros +BuildRequires: %{python_module devel} +BuildRequires: %{python_module setuptools} +BuildRequires: %{python_module pbr} BuildRequires: fdupes -BuildRequires: python-devel -BuildRequires: python-pbr -BuildRequires: python-setuptools BuildRoot: %{_tmppath}/%{name}-%{version}-build -%if 0%{?suse_version} && 0%{?suse_version} <= 1110 -%{!?python_sitelib: %global python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} -%else BuildArch: noarch -%endif +%python_subpackages %description This package simply re-packages the existing bencoding and bdecoding @@ -45,13 +45,13 @@ BitTorrent software as a dependency. %setup -q -n bencode.py-%{version} %build -python setup.py build +%python_build %install -python setup.py install --prefix=%{_prefix} --root=%{buildroot} -%fdupes %{buildroot}/%{python_sitelib} +%python_install +%python_expand %fdupes -s %{buildroot}%{$python_sitelib} -%files +%files %{python_files} %defattr(-,root,root,-) %doc README.rst %{python_sitelib}/*