Accepting request 827000 from home:andythe_great

Uncertain to why it failed on leap 15.1
Also, did I fix the fromstring warning correctly?
Thanks

OBS-URL: https://build.opensuse.org/request/show/827000
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:numeric/python-gwyfile?expand=0&rev=1
This commit is contained in:
Tomáš Chvátal 2020-08-17 06:29:06 +00:00 committed by Git OBS Bridge
commit c628ab5d37
6 changed files with 107 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

View File

@ -0,0 +1,12 @@
diff -ruN a/gwyfile/objects.py b/gwyfile/objects.py
--- a/gwyfile/objects.py 2017-02-20 02:36:19.000000000 +0700
+++ b/gwyfile/objects.py 2020-08-16 16:39:00.455203869 +0700
@@ -348,7 +348,7 @@
}
dtype = typelookup[typecode]
pos, endpos = endpos, endpos + dtype.itemsize * numitems
- data = np.fromstring(buf[pos:endpos], dtype=dtype)
+ data = np.frombuffer(buf[pos:endpos], dtype=dtype)
elif typecode == 'S':
numitems = struct.unpack('<I', buf[pos:pos + 4])[0]
endpos += 4

3
gwyfile-0.2.0.tar.gz Normal file
View File

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

4
python-gwyfile.changes Normal file
View File

@ -0,0 +1,4 @@
-------------------------------------------------------------------
Sun Aug 16 09:31:20 UTC 2020 - andy great <andythe_great@pm.me>
- Initial package release.

64
python-gwyfile.spec Normal file
View File

@ -0,0 +1,64 @@
#
# spec file for package python-gwyfile
#
# Copyright (c) 2020 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/
#
%define packagename gwyfile
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-gwyfile
Version: 0.2.0
Release: 0
Summary: Pure Python implementation of the Gwyddion file format
License: MIT
Group: Development/Languages/Python
URL: https://github.com/tuxu/gwyfile
Source: https://github.com/tuxu/gwyfile/archive/%{version}.tar.gz#/%{packagename}-%{version}.tar.gz
# PATCH-FIX-OPENSUSE Fix_depreciated_fromstring_warning.patch andythe_great@pm.me -- Fix fromstring depreciated to frombuffer warning during testing.
Patch0: Fix_depreciated_fromstring_warning.patch
BuildRequires: %{python_module numpy}
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module six}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
Requires: python-numpy
Requires: python-six
BuildArch: noarch
%python_subpackages
%description
Pure Python implementation of the Gwyddion file format.
%prep
%autosetup -p1 -n %{packagename}-%{version}
%build
%python_build
%install
%python_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%check
%pytest
%files %{python_files}
%doc CHANGELOG.rst README.rst
%license LICENSE.rst
%{python_sitelib}/*egg-info
%{python_sitelib}/%{packagename}
%changelog