- Stop skipping on Python versions.
- Add patch use-importlib.patch: * Use importlib to support Python 3.12+ - Switch to autosetup and pyproject macros. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-sat-stac?expand=0&rev=11
This commit is contained in:
commit
8dae12afa3
23
.gitattributes
vendored
Normal file
23
.gitattributes
vendored
Normal 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
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
.osc
|
50
python-sat-stac.changes
Normal file
50
python-sat-stac.changes
Normal file
@ -0,0 +1,50 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed Dec 4 06:20:59 UTC 2024 - Steve Kowalik <steven.kowalik@suse.com>
|
||||
|
||||
- Stop skipping on Python versions.
|
||||
- Add patch use-importlib.patch:
|
||||
* Use importlib to support Python 3.12+
|
||||
- Switch to autosetup and pyproject macros.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Oct 29 08:13:50 UTC 2024 - Dirk Müller <dmueller@suse.com>
|
||||
|
||||
- skip build on python313 as well
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Mar 14 10:05:18 UTC 2024 - Dirk Müller <dmueller@suse.com>
|
||||
|
||||
- skip building for python312
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Oct 7 15:22:59 UTC 2022 - Yogalakshmi Arunachalam <yarunachalam@suse.com>
|
||||
|
||||
- Update to version 0.4.1
|
||||
Added
|
||||
* User can now provide custom headers to download function
|
||||
* id and description keywords added to itemcollection.save() and itemcollection.geojson() for user to supply values to save single file STAC
|
||||
Changed
|
||||
* Allow reading in of ItemCollections without collections
|
||||
* Default STAC_VERSION updated to 1.0.0-beta.2
|
||||
Fixed
|
||||
* Saved ItemCollections now adhere to STAC single-file-stac spec
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Aug 17 07:08:06 UTC 2020 - Tomáš Chvátal <tchvatal@suse.com>
|
||||
|
||||
- Fix download url
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Aug 10 11:46:34 UTC 2020 - Tomáš Chvátal <tchvatal@suse.com>
|
||||
|
||||
- Fix few minor issues with alternatives
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Jul 31 15:33:36 UTC 2020 - andy great <andythe_great@pm.me>
|
||||
|
||||
- Update spec file to use python alternative.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sun Jul 26 14:20:25 UTC 2020 - andy great <andythe_great@pm.me>
|
||||
|
||||
- Initial package release.
|
78
python-sat-stac.spec
Normal file
78
python-sat-stac.spec
Normal file
@ -0,0 +1,78 @@
|
||||
#
|
||||
# spec file for package python-sat-stac
|
||||
#
|
||||
# Copyright (c) 2024 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/
|
||||
#
|
||||
|
||||
|
||||
%{?sle15_python_module_pythons}
|
||||
%define packagename sat-stac
|
||||
Name: python-sat-stac
|
||||
Version: 0.4.1
|
||||
Release: 0
|
||||
Summary: A library for reading and working with Spatio-Temporal Asset Catalogs
|
||||
License: MIT
|
||||
URL: https://github.com/sat-utils/sat-stac
|
||||
Source: https://files.pythonhosted.org/packages/source/s/sat-stac/sat-stac-%{version}.tar.gz
|
||||
# PATCH-FIX-UPSTREAM gh#sat-utils/sat-stac#75
|
||||
Patch0: use-importlib.patch
|
||||
BuildRequires: %{python_module pip}
|
||||
BuildRequires: %{python_module python-dateutil >= 2.7.5}
|
||||
BuildRequires: %{python_module requests >= 2.19.1}
|
||||
BuildRequires: %{python_module setuptools}
|
||||
BuildRequires: %{python_module wheel}
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: python-rpm-macros
|
||||
Requires: python-python-dateutil >= 2.7.5
|
||||
Requires: python-requests >= 2.19.1
|
||||
Requires(post): update-alternatives
|
||||
Requires(postun): update-alternatives
|
||||
BuildArch: noarch
|
||||
%python_subpackages
|
||||
|
||||
%description
|
||||
Sat-search is a Python 3 library and a command line tool for discovering
|
||||
and downloading publicly available satellite imagery using a conformant
|
||||
API such as sat-api.
|
||||
|
||||
%prep
|
||||
%autosetup -p1 -n %{packagename}-%{version}
|
||||
|
||||
%build
|
||||
%pyproject_wheel
|
||||
|
||||
%install
|
||||
%pyproject_install
|
||||
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
||||
for p in %{packagename} ; do
|
||||
%python_clone -a %{buildroot}%{_bindir}/$p
|
||||
done
|
||||
|
||||
%post
|
||||
%python_install_alternative %{packagename}
|
||||
|
||||
%postun
|
||||
%python_uninstall_alternative %{packagename}
|
||||
|
||||
%check
|
||||
# This archive does not have test files.
|
||||
# The archive in github has it, but need network connection for test.
|
||||
|
||||
%files %{python_files}
|
||||
%doc README.md
|
||||
%python_alternative %{_bindir}/%{packagename}
|
||||
%{python_sitelib}/satstac
|
||||
%{python_sitelib}/sat_stac-%{version}.dist-info
|
||||
|
||||
%changelog
|
3
sat-stac-0.4.1.tar.gz
Normal file
3
sat-stac-0.4.1.tar.gz
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:a06bb3491ee49497262d228e9c8aed4d68d89e7dff140e2439f199dd92864f2c
|
||||
size 16298
|
36
use-importlib.patch
Normal file
36
use-importlib.patch
Normal file
@ -0,0 +1,36 @@
|
||||
From 31dfa7c419c3bae3bab090631cb6a13486e0ffb9 Mon Sep 17 00:00:00 2001
|
||||
From: Victor Engmark <victor@engmark.name>
|
||||
Date: Fri, 6 Sep 2024 09:00:10 +1200
|
||||
Subject: [PATCH] fix: Use new importlib
|
||||
|
||||
As recommended by <https://docs.python.org/3/whatsnew/3.12.html#imp>.
|
||||
---
|
||||
setup.py | 13 ++++++++++++-
|
||||
1 file changed, 12 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/setup.py b/setup.py
|
||||
index b2bd3d7..692d0cd 100755
|
||||
--- a/setup.py
|
||||
+++ b/setup.py
|
||||
@@ -1,9 +1,20 @@
|
||||
#!/usr/bin/env python
|
||||
+import importlib.util
|
||||
+import importlib.machinery
|
||||
from setuptools import setup, find_packages
|
||||
-from imp import load_source
|
||||
from os import path
|
||||
import io
|
||||
|
||||
+def load_source(modname, filename):
|
||||
+ loader = importlib.machinery.SourceFileLoader(modname, filename)
|
||||
+ spec = importlib.util.spec_from_file_location(modname, filename, loader=loader)
|
||||
+ module = importlib.util.module_from_spec(spec)
|
||||
+ # The module is always executed and not cached in sys.modules.
|
||||
+ # Uncomment the following line to cache the module.
|
||||
+ # sys.modules[module.__name__] = module
|
||||
+ loader.exec_module(module)
|
||||
+ return module
|
||||
+
|
||||
__version__ = load_source('satstac.version', 'satstac/version.py').__version__
|
||||
|
||||
here = path.abspath(path.dirname(__file__))
|
Loading…
x
Reference in New Issue
Block a user