1
0
forked from pool/python-geomet

Accepting request 1086483 from home:pgajdos:python

- version update to 1.0.0
  * Fix bug in _round_and_pad with exponential coordinate values (#73)
  * Use assertNotEqual instead of assertNotEquals in tests, for Python 3.11 compatibility (#77)
  * Add support for Python 3.8, 3.9, and 3.10 (#79, #84)
  * Drop support for end-of-life Python versions 2.7, 3.4, 3.5, and 3.6 (#84)
  * Fix structure of coordinate values in GeoJSON to EsriJSON conversion (#82)
  * Update README with to add History and Limitations sections, and to expand on functionality (#86)
- added patches
  fix https://github.com/geomet/geomet/issues/90
  + python-geomet-no-six.patch

OBS-URL: https://build.opensuse.org/request/show/1086483
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-geomet?expand=0&rev=8
This commit is contained in:
Matej Cepl 2023-05-11 13:25:51 +00:00 committed by Git OBS Bridge
parent c37a1c5d96
commit 6f98a62965
5 changed files with 86 additions and 20 deletions

View File

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

3
1.0.0.tar.gz Normal file
View File

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

View File

@ -0,0 +1,61 @@
Index: geomet-1.0.0/geomet/util.py
===================================================================
--- geomet-1.0.0.orig/geomet/util.py
+++ geomet-1.0.0/geomet/util.py
@@ -12,7 +12,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.
import itertools
-import six
import collections.abc as collections
@@ -115,7 +114,7 @@ def flatten_multi_dim(sequence):
"""
for x in sequence:
if (isinstance(x, collections.Iterable)
- and not isinstance(x, six.string_types)):
+ and not isinstance(x, str)):
for y in flatten_multi_dim(x):
yield y
else:
Index: geomet-1.0.0/geomet/wkt.py
===================================================================
--- geomet-1.0.0.orig/geomet/wkt.py
+++ geomet-1.0.0/geomet/wkt.py
@@ -13,7 +13,6 @@
# limitations under the License.
import geomet
import itertools
-import six
import tokenize
try:
@@ -134,7 +133,7 @@ def loads(string):
if importer is None:
_unsupported_geom_type(geom_type)
- peek = six.advance_iterator(tokens)
+ peek = next(tokens)
if peek == 'EMPTY':
if geom_type == 'GEOMETRYCOLLECTION':
return dict(type='GeometryCollection', geometries=[])
Index: geomet-1.0.0/requirements.txt
===================================================================
--- geomet-1.0.0.orig/requirements.txt
+++ geomet-1.0.0/requirements.txt
@@ -1,2 +1 @@
click
-six
Index: geomet-1.0.0/setup.py
===================================================================
--- geomet-1.0.0.orig/setup.py
+++ geomet-1.0.0/setup.py
@@ -65,6 +65,6 @@ setup(
'Topic :: Scientific/Engineering :: GIS',
],
zip_safe=False,
- install_requires=['click', 'six'],
+ install_requires=['click'],
python_requires=">=3.7, <4",
)

View File

@ -1,3 +1,17 @@
-------------------------------------------------------------------
Thu May 11 10:38:08 UTC 2023 - pgajdos@suse.com
- version update to 1.0.0
* Fix bug in _round_and_pad with exponential coordinate values (#73)
* Use assertNotEqual instead of assertNotEquals in tests, for Python 3.11 compatibility (#77)
* Add support for Python 3.8, 3.9, and 3.10 (#79, #84)
* Drop support for end-of-life Python versions 2.7, 3.4, 3.5, and 3.6 (#84)
* Fix structure of coordinate values in GeoJSON to EsriJSON conversion (#82)
* Update README with to add History and Limitations sections, and to expand on functionality (#86)
- added patches
fix https://github.com/geomet/geomet/issues/90
+ python-geomet-no-six.patch
-------------------------------------------------------------------
Wed Nov 4 16:23:36 UTC 2020 - Johannes Grassler <johannes.grassler@suse.com>

View File

@ -1,7 +1,7 @@
#
# spec file for package python-geomet
#
# Copyright (c) 2020 SUSE LLC
# Copyright (c) 2023 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -16,27 +16,26 @@
#
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-geomet
Version: 0.2.1
Version: 1.0.0
Release: 0
Summary: GeoJSON <-> WKT/WKB conversion utilities
License: Apache-2.0
Group: Development/Languages/Python
URL: https://github.com/geomet/geomet
Source: https://github.com/geomet/geomet/archive/%{version}.tar.gz
# https://github.com/geomet/geomet/issues/90
Patch0: python-geomet-no-six.patch
BuildRequires: %{python_module setuptools}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
Requires: python-click
Requires: python-six
Requires(post): update-alternatives
Requires(postun): update-alternatives
Requires(postun):update-alternatives
BuildArch: noarch
# SECTION test requirements
BuildRequires: %{python_module click}
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module six}
# /SECTION
%python_subpackages
@ -44,27 +43,19 @@ BuildRequires: %{python_module six}
GeoJSON <-> WKT/WKB conversion utilities
%prep
%setup -q -n geomet-%{version}
%autosetup -p1 -n geomet-%{version}
%build
sed -i '1{/^#!/ d}' geomet/*.py
%python_build
%install
%python_install
%python_clone -a %{buildroot}%{_bindir}/geomet
rm %{buildroot}%{_prefix}/LICENSE
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%check
export PATH=$PATH:%{buildroot}%{_bindir}
export PYTHONDONTWRITEBYTECODE=1
cp geomet/tests/test_cli.py geomet/tests/test_cli.py.orig
%{python_expand \
cp geomet/tests/test_cli.py.orig geomet/tests/test_cli.py
sed -i 's:geomet:geomet-%{$python_version}:' geomet/tests/test_cli.py
export PYTHONPATH=:%{buildroot}%{$python_sitelib}
$python -m pytest
}
%pytest
%post
%python_install_alternative geomet