15
0

Accepting request 596685 from home:a_faerber:branches:devel:languages:python

cooldict 1.02 (dependency of angr)

OBS-URL: https://build.opensuse.org/request/show/596685
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-cooldict?expand=0&rev=1
This commit is contained in:
Tomáš Chvátal
2018-04-15 13:15:42 +00:00
committed by Git OBS Bridge
commit 97a4cd9634
7 changed files with 152 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@@ -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

1
.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
.osc

24
LICENSE Normal file
View File

@@ -0,0 +1,24 @@
Copyright (c) 2015, The Regents of the University of California
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

3
cooldict-1.02.tar.gz Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:03692d336f9c3f21202cc6d9650f9671d73a5ea5cf3800af35a7105034709120
size 4745

38
cooldict_python3.patch Normal file
View File

@@ -0,0 +1,38 @@
From 516fd5a87f0332444b6bf055bb755f28e1c7c9fb Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Andreas=20F=C3=A4rber?= <afaerber@suse.de>
Date: Sun, 15 Apr 2018 13:16:35 +0200
Subject: [PATCH] Fix Python3 SyntaxError
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Python 3.6 emits the following error:
File "/usr/lib/python3.6/site-packages/cooldict.py", line 577
print da[10]
^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(da[10])?
Address this by adding the suggested parentheses.
Signed-off-by: Andreas Färber <afaerber@suse.de>
---
cooldict.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/cooldict.py b/cooldict.py
index 27bcb5c..e070714 100644
--- a/cooldict.py
+++ b/cooldict.py
@@ -574,7 +574,7 @@ def test():
l.info("Testing SinkholeCOWDict")
da = SinkholeCOWDict()
try:
- print da[10]
+ print(da[10])
assert False
except KeyError:
pass
--
2.16.3

5
python-cooldict.changes Normal file
View File

@@ -0,0 +1,5 @@
-------------------------------------------------------------------
Sun Apr 15 10:36:54 UTC 2018 - afaerber@suse.de
- Initial (1.02)
* cooldict_python3.patch: Fix a Python 3.6 SyntaxError

58
python-cooldict.spec Normal file
View File

@@ -0,0 +1,58 @@
#
# spec file for package python-cooldict
#
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
#
# 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 http://bugs.opensuse.org/
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-cooldict
Version: 1.02
Release: 0
License: BSD-2-Clause
Summary: dict-like structures
Url: https://github.com/zardus/cooldict
Group: Development/Languages/Python
Source: https://pypi.python.org/packages/9e/81/c82755762a5c17f0011e96f9d2e79dbcb6423cac184b1c49847db7fd2584/cooldict-%{version}.tar.gz
Source1: https://github.com/zardus/cooldict/raw/master/LICENSE
Patch1: cooldict_python3.patch
BuildRequires: fdupes
BuildRequires: python-rpm-macros
BuildRequires: %{python_module ana >= 0.1}
BuildRequires: %{python_module devel}
BuildRequires: %{python_module setuptools}
Requires: python-ana >= 0.1
BuildArch: noarch
%python_subpackages
%description
Some dict-like structures.
%prep
%setup -q -n cooldict-%{version}
%patch1 -p1
[ -e LICENSE ] || cp %{SOURCE1} LICENSE
%build
%python_build
%install
%python_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%files %{python_files}
%license LICENSE
%{python_sitelib}/*
%changelog