diff --git a/libbytesize.spec b/libbytesize.spec index f247a54..12119a9 100644 --- a/libbytesize.spec +++ b/libbytesize.spec @@ -1,11 +1,13 @@ Name: libbytesize Version: 0.4 -Release: 1%{?dist} +Release: 2%{?dist} Summary: A library for working with sizes in bytes License: LGPLv2+ URL: https://github.com/rhinstaller/libbytesize Source0: https://github.com/rhinstaller/libbytesize/archive/%{name}-%{version}.tar.gz +Patch0: not_delete_twice.patch + %define realname bytesize BuildRequires: gmp-devel @@ -51,6 +53,7 @@ the library from Python 3 easier and more convenient. %prep %setup -q -n %{name}-%{version} +%patch0 -p1 %build %configure @@ -85,6 +88,9 @@ find %{buildroot} -type f -name "*.la" | xargs %{__rm} %{python3_sitearch}/bytesize/__pycache__/* %changelog +* Fri Mar 11 2016 Vratislav Podzimek - 0.4-2 +- Do not try to delete the C struct twice (vpodzime) + * Wed Mar 09 2016 Vratislav Podzimek - 0.4-1 - Add the __init__.py file to provide a proper package (vpodzime) - Merge pull request #7 from vpodzime/master-decimal_locale (vpodzime) diff --git a/not_delete_twice.patch b/not_delete_twice.patch new file mode 100644 index 0000000..1f198a6 --- /dev/null +++ b/not_delete_twice.patch @@ -0,0 +1,27 @@ +From 482e4c3936a9ba84b3bfed797520ff3e8a525f9c Mon Sep 17 00:00:00 2001 +From: Vratislav Podzimek +Date: Fri, 11 Mar 2016 16:01:20 +0100 +Subject: [PATCH] Do not try to delete the C struct twice + +The default destructor takes care about calling the C struct's __del__ +implicitly. + +Signed-off-by: Vratislav Podzimek +--- + src/python/bytesize.py | 3 --- + 1 file changed, 3 deletions(-) + +diff --git a/src/python/bytesize.py b/src/python/bytesize.py +index 3a32b65..21b2a1e 100644 +--- a/src/python/bytesize.py ++++ b/src/python/bytesize.py +@@ -557,6 +557,3 @@ class Size(object): + + def __hash__(self): + return self.get_bytes() +- +- def __del__(self): +- del(self._c_size) +-- +2.5.0 +