aboutsummaryrefslogtreecommitdiff
path: root/gis/OWSLib
diff options
context:
space:
mode:
Diffstat (limited to 'gis/OWSLib')
-rw-r--r--gis/OWSLib/OWSLib.SlackBuild11
-rw-r--r--gis/OWSLib/OWSLib.info8
-rw-r--r--gis/OWSLib/remove_dependency_on_pytz.patch103
3 files changed, 6 insertions, 116 deletions
diff --git a/gis/OWSLib/OWSLib.SlackBuild b/gis/OWSLib/OWSLib.SlackBuild
index 203e482d7f..dfd13c0bc1 100644
--- a/gis/OWSLib/OWSLib.SlackBuild
+++ b/gis/OWSLib/OWSLib.SlackBuild
@@ -2,7 +2,7 @@
# Slackware build script for OWSLib
-# Copyright 2023-2024 Giancarlo Dessi, Cagliari, IT
+# Copyright 2023-2025 Giancarlo Dessi, Cagliari, IT
# Copyright 2013-2021 Benjamin Trigona-Harany <slackbuilds@jaxartes.net>
# All rights reserved.
#
@@ -26,7 +26,7 @@
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=OWSLib
-VERSION=${VERSION:-0.31.0}
+VERSION=${VERSION:-0.34.1}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
@@ -77,13 +77,6 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
-# This removes code fragments depending on pytz, not required in -current
-# thanks to Brent Spillner
-# https://github.com/spillner/OWSLib/commit/1848bea97a9af6e2e5a69dad46af606c73cffb0c
-if [ -x /usr/bin/python3.11 ]; then
- patch -p1 < $CWD/remove_dependency_on_pytz.patch
-fi
-
python3 setup.py install --root=$PKG
find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
diff --git a/gis/OWSLib/OWSLib.info b/gis/OWSLib/OWSLib.info
index 08e904b87c..1d4c436642 100644
--- a/gis/OWSLib/OWSLib.info
+++ b/gis/OWSLib/OWSLib.info
@@ -1,10 +1,10 @@
PRGNAM="OWSLib"
-VERSION="0.31.0"
+VERSION="0.34.1"
HOMEPAGE="https://pypi.python.org/pypi/OWSLib/"
-DOWNLOAD="https://github.com/geopython/OWSLib/archive/0.31.0/OWSLib-0.31.0.tar.gz"
-MD5SUM="9aab2af59a1379e73daada198773d85f"
+DOWNLOAD="https://github.com/geopython/OWSLib/archive/0.34.1/OWSLib-0.34.1.tar.gz"
+MD5SUM="0520e0bf87e6e672713f10814856e3ba"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
-REQUIRES="python3-dateutil python3-pytz python3-lxml"
+REQUIRES="python3-dateutil python3-lxml"
MAINTAINER="Giancarlo Dessi"
EMAIL="slack@giand.it"
diff --git a/gis/OWSLib/remove_dependency_on_pytz.patch b/gis/OWSLib/remove_dependency_on_pytz.patch
deleted file mode 100644
index 85d4f6ad43..0000000000
--- a/gis/OWSLib/remove_dependency_on_pytz.patch
+++ /dev/null
@@ -1,103 +0,0 @@
-diff --git a/etc/RPM/python-owslib.spec b/etc/RPM/python-owslib.spec
-index 96f8599de..8dfad75df 100644
---- a/etc/RPM/python-owslib.spec
-+++ b/etc/RPM/python-owslib.spec
-@@ -25,7 +25,7 @@ BuildRequires: python-devel
- BuildRequires: python-setuptools
- BuildRequires: fdupes
- Requires: python
--Requires: python-dateutil python-pytz
-+Requires: python-dateutil
-
- %description
- OWSLib is a Python package for client programming with Open Geospatial Consortium (OGC) web service (hence OWS) interface standards, and their related content models.
-diff --git a/owslib/util.py b/owslib/util.py
-index 7894aa729..c715b3ce0 100644
---- a/owslib/util.py
-+++ b/owslib/util.py
-@@ -12,8 +12,7 @@
- import sys
- from collections import OrderedDict
- from dateutil import parser
--from datetime import datetime, timedelta
--import pytz
-+from datetime import datetime, timedelta, tzinfo
- from owslib.etree import etree, ParseError
- from owslib.namespaces import Namespaces
- from urllib.parse import urlsplit, urlencode, urlparse, parse_qs, urlunparse, parse_qsl
-@@ -38,6 +37,20 @@ class ServiceException(Exception):
- pass
-
-
-+# Allows marking timestamps as UTC without pulling in all of Pytz
-+class TimeZone_UTC(tzinfo):
-+ def tzname(self, dt):
-+ return "UTC"
-+
-+ def utcoffset(self, dt):
-+ return timedelta(0)
-+
-+ def dst(self, dt):
-+ return timedelta(0)
-+
-+tz_utc = TimeZone_UTC()
-+
-+
- # http://stackoverflow.com/questions/6256183/combine-two-dictionaries-of-dictionaries-python
- def dict_union(d1, d2):
- return dict((x, (dict_union(d1.get(x, {}), d2[x]) if isinstance(d2.get(x), dict) else d2.get(x, d1.get(x))))
-@@ -649,8 +662,7 @@ def extract_time(element):
- except Exception:
- att = testXMLValue(element.attrib.get('indeterminatePosition'), True)
- if att and att == 'now':
-- dt = datetime.utcnow()
-- dt.replace(tzinfo=pytz.utc)
-+ dt = datetime.utcnow().replace(tzinfo=tz_utc)
- else:
- dt = None
- return dt
-diff --git a/requirements.txt b/requirements.txt
-index c1b2c09bd..1531aa42f 100644
---- a/requirements.txt
-+++ b/requirements.txt
-@@ -1,6 +1,5 @@
- dataclasses; python_version < '3.7'
- lxml
- python-dateutil>=1.5
--pytz
- pyyaml
- requests>=1.0
-diff --git a/tests/doctests/sml_52n_network.txt b/tests/doctests/sml_52n_network.txt
-index 010fbb6b5..94add7ddc 100644
---- a/tests/doctests/sml_52n_network.txt
-+++ b/tests/doctests/sml_52n_network.txt
-@@ -3,7 +3,6 @@ Imports
- >>> from tests.utils import resource_file
- >>> from owslib.swe.sensor.sml import SensorML
- >>> from dateutil import parser
-- >>> import pytz
-
- Initialize
-
-diff --git a/tests/doctests/sml_ndbc_station.txt b/tests/doctests/sml_ndbc_station.txt
-index bd2ecf3af..bda0e559a 100644
---- a/tests/doctests/sml_ndbc_station.txt
-+++ b/tests/doctests/sml_ndbc_station.txt
-@@ -3,7 +3,7 @@ Imports
- >>> from tests.utils import resource_file
- >>> from owslib.swe.sensor.sml import SensorML
- >>> from dateutil import parser
-- >>> import pytz
-+ >>> from owslib.util import TimeZone_UTC
-
- Initialize
-
-@@ -104,7 +104,7 @@ History
- 2
-
- >>> event = his[0]
-- >>> parser.parse(event.date).replace(tzinfo=pytz.utc).isoformat()
-+ >>> parser.parse(event.date).replace(tzinfo=TimeZone_UTC()).isoformat()
- '2010-01-12T00:00:00+00:00'
- >>> event.description
- 'Deployment start event'