forked from pool/python-ssdeep
Accepting request 1035250 from home:pgajdos:python
- silent rpmlint
- version update to 3.4.1
* Add internal build improvements
* Update CI pipelines
- do not require python-six
- added patches
fix 6cf96d63e9
+ python-ssdeep-no-six.patch
OBS-URL: https://build.opensuse.org/request/show/1035250
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-ssdeep?expand=0&rev=15
This commit is contained in:
3
python-ssdeep-3.4.1.tar.gz
Normal file
3
python-ssdeep-3.4.1.tar.gz
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:6f984a1248ee6b434bab0e2b274621f1888d81b8241858d30f981214263b17fa
|
||||||
|
size 111532
|
@@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:1924ca700aedd6563b9939cac6519d5aa24c4c3c24e09a748b31c09955b09ad4
|
|
||||||
size 107465
|
|
92
python-ssdeep-no-six.patch
Normal file
92
python-ssdeep-no-six.patch
Normal file
@@ -0,0 +1,92 @@
|
|||||||
|
diff --git a/setup.py b/setup.py
|
||||||
|
index 3a32b13..c99d33d 100755
|
||||||
|
--- a/setup.py
|
||||||
|
+++ b/setup.py
|
||||||
|
@@ -182,11 +182,9 @@ def get_objects():
|
||||||
|
keywords="ssdeep",
|
||||||
|
install_requires=[
|
||||||
|
"cffi>=1.0.0",
|
||||||
|
- "six>=1.4.1",
|
||||||
|
],
|
||||||
|
setup_requires=[
|
||||||
|
"cffi>=1.0.0",
|
||||||
|
- "six>=1.4.1",
|
||||||
|
] + setup_requires,
|
||||||
|
tests_require=[
|
||||||
|
"pytest",
|
||||||
|
diff --git a/src/ssdeep/__init__.py b/src/ssdeep/__init__.py
|
||||||
|
index 5735d51..7aaf884 100644
|
||||||
|
--- a/src/ssdeep/__init__.py
|
||||||
|
+++ b/src/ssdeep/__init__.py
|
||||||
|
@@ -5,8 +5,6 @@
|
||||||
|
|
||||||
|
import os
|
||||||
|
|
||||||
|
-import six
|
||||||
|
-
|
||||||
|
# Ignore flake8 F401 warning for unused vars
|
||||||
|
from ssdeep.__about__ import ( # noqa: F401
|
||||||
|
__author__, __copyright__, __email__, __license__, __summary__, __title__,
|
||||||
|
@@ -104,10 +102,10 @@ def update(self, buf, encoding="utf-8"):
|
||||||
|
if self._state == ffi.NULL:
|
||||||
|
raise InternalError("State object is NULL")
|
||||||
|
|
||||||
|
- if isinstance(buf, six.text_type):
|
||||||
|
+ if isinstance(buf, str):
|
||||||
|
buf = buf.encode(encoding)
|
||||||
|
|
||||||
|
- if not isinstance(buf, six.binary_type):
|
||||||
|
+ if not isinstance(buf, bytes):
|
||||||
|
raise TypeError(
|
||||||
|
"Argument must be of string, unicode or bytes type not "
|
||||||
|
"'%r'" % type(buf)
|
||||||
|
@@ -179,10 +177,10 @@ def update(self, buf, encoding="utf-8"):
|
||||||
|
|
||||||
|
"""
|
||||||
|
|
||||||
|
- if isinstance(buf, six.text_type):
|
||||||
|
+ if isinstance(buf, str):
|
||||||
|
buf = buf.encode(encoding)
|
||||||
|
|
||||||
|
- if not isinstance(buf, six.binary_type):
|
||||||
|
+ if not isinstance(buf, bytes):
|
||||||
|
raise TypeError(
|
||||||
|
"Argument must be of string, unicode or bytes type not "
|
||||||
|
"'%r'" % type(buf)
|
||||||
|
@@ -222,18 +220,18 @@ def compare(sig1, sig2):
|
||||||
|
|
||||||
|
"""
|
||||||
|
|
||||||
|
- if isinstance(sig1, six.text_type):
|
||||||
|
+ if isinstance(sig1, str):
|
||||||
|
sig1 = sig1.encode("ascii")
|
||||||
|
- if isinstance(sig2, six.text_type):
|
||||||
|
+ if isinstance(sig2, str):
|
||||||
|
sig2 = sig2.encode("ascii")
|
||||||
|
|
||||||
|
- if not isinstance(sig1, six.binary_type):
|
||||||
|
+ if not isinstance(sig1, bytes):
|
||||||
|
raise TypeError(
|
||||||
|
"First argument must be of string, unicode or bytes type not "
|
||||||
|
"'%s'" % type(sig1)
|
||||||
|
)
|
||||||
|
|
||||||
|
- if not isinstance(sig2, six.binary_type):
|
||||||
|
+ if not isinstance(sig2, bytes):
|
||||||
|
raise TypeError(
|
||||||
|
"Second argument must be of string, unicode or bytes type not "
|
||||||
|
"'%r'" % type(sig2)
|
||||||
|
@@ -258,10 +256,10 @@ def hash(buf, encoding="utf-8"):
|
||||||
|
|
||||||
|
"""
|
||||||
|
|
||||||
|
- if isinstance(buf, six.text_type):
|
||||||
|
+ if isinstance(buf, str):
|
||||||
|
buf = buf.encode(encoding)
|
||||||
|
|
||||||
|
- if not isinstance(buf, six.binary_type):
|
||||||
|
+ if not isinstance(buf, bytes):
|
||||||
|
raise TypeError(
|
||||||
|
"Argument must be of string, unicode or bytes type not "
|
||||||
|
"'%r'" % type(buf)
|
||||||
|
|
@@ -1,3 +1,19 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri Nov 11 13:09:00 UTC 2022 - pgajdos@suse.com
|
||||||
|
|
||||||
|
- silent rpmlint
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri Nov 11 12:41:42 UTC 2022 - pgajdos@suse.com
|
||||||
|
|
||||||
|
- version update to 3.4.1
|
||||||
|
* Add internal build improvements
|
||||||
|
* Update CI pipelines
|
||||||
|
- do not require python-six
|
||||||
|
- added patches
|
||||||
|
fix https://github.com/DinoTools/python-ssdeep/commit/6cf96d63e9512fa14b6557d0d8afaa5128e0e853
|
||||||
|
+ python-ssdeep-no-six.patch
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Tue Dec 7 19:29:56 UTC 2021 - pgajdos@suse.com
|
Tue Dec 7 19:29:56 UTC 2021 - pgajdos@suse.com
|
||||||
|
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package python-ssdeep
|
# spec file for package python-ssdeep
|
||||||
#
|
#
|
||||||
# Copyright (c) 2021 SUSE LLC
|
# Copyright (c) 2022 SUSE LLC
|
||||||
#
|
#
|
||||||
# All modifications and additions to the file contributed by third parties
|
# All modifications and additions to the file contributed by third parties
|
||||||
# remain the property of their copyright owners, unless otherwise agreed
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
@@ -16,10 +16,9 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
|
||||||
%define skip_python2 1
|
%define skip_python2 1
|
||||||
Name: python-ssdeep
|
Name: python-ssdeep
|
||||||
Version: 3.4
|
Version: 3.4.1
|
||||||
Release: 0
|
Release: 0
|
||||||
Summary: Python wrapper for the ssdeep library
|
Summary: Python wrapper for the ssdeep library
|
||||||
License: LGPL-3.0-or-later
|
License: LGPL-3.0-or-later
|
||||||
@@ -27,15 +26,15 @@ Group: Development/Languages/Python
|
|||||||
URL: https://github.com/DinoTools/python-ssdeep
|
URL: https://github.com/DinoTools/python-ssdeep
|
||||||
#Source: https://files.pythonhosted.org/packages/source/s/ssdeep/ssdeep-%%{version}.tar.gz # no docs here, see https://github.com/DinoTools/python-ssdeep/issues/37
|
#Source: https://files.pythonhosted.org/packages/source/s/ssdeep/ssdeep-%%{version}.tar.gz # no docs here, see https://github.com/DinoTools/python-ssdeep/issues/37
|
||||||
Source: https://github.com/DinoTools/python-ssdeep/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz
|
Source: https://github.com/DinoTools/python-ssdeep/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz
|
||||||
|
# https://github.com/DinoTools/python-ssdeep/commit/6cf96d63e9512fa14b6557d0d8afaa5128e0e853
|
||||||
|
Patch0: python-ssdeep-no-six.patch
|
||||||
BuildRequires: %{python_module cffi >= 0.8.6}
|
BuildRequires: %{python_module cffi >= 0.8.6}
|
||||||
BuildRequires: %{python_module devel}
|
BuildRequires: %{python_module devel}
|
||||||
BuildRequires: %{python_module setuptools}
|
BuildRequires: %{python_module setuptools}
|
||||||
BuildRequires: %{python_module six}
|
|
||||||
BuildRequires: fdupes
|
BuildRequires: fdupes
|
||||||
BuildRequires: libfuzzy-devel
|
BuildRequires: libfuzzy-devel
|
||||||
BuildRequires: python-rpm-macros
|
BuildRequires: python-rpm-macros
|
||||||
Requires: python-cffi
|
Requires: python-cffi
|
||||||
Requires: python-six
|
|
||||||
Requires: ssdeep
|
Requires: ssdeep
|
||||||
# SECTION tests
|
# SECTION tests
|
||||||
BuildRequires: %{python_module pytest}
|
BuildRequires: %{python_module pytest}
|
||||||
@@ -49,6 +48,7 @@ content and length.
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n python-ssdeep-%{version}
|
%setup -q -n python-ssdeep-%{version}
|
||||||
|
%patch0 -p1
|
||||||
# https://github.com/DinoTools/python-ssdeep/issues/57
|
# https://github.com/DinoTools/python-ssdeep/issues/57
|
||||||
sed -i 's:"pytest-runner.*"::' setup.py
|
sed -i 's:"pytest-runner.*"::' setup.py
|
||||||
|
|
||||||
@@ -63,7 +63,8 @@ sed -i 's:"pytest-runner.*"::' setup.py
|
|||||||
%pytest_arch
|
%pytest_arch
|
||||||
|
|
||||||
%files %{python_files}
|
%files %{python_files}
|
||||||
%{python_sitearch}/*
|
%{python_sitearch}/ssdeep
|
||||||
|
%{python_sitearch}/ssdeep-*egg-info
|
||||||
%doc README.rst CHANGELOG.rst
|
%doc README.rst CHANGELOG.rst
|
||||||
%license LICENSE
|
%license LICENSE
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user