1
0

Compare commits

2 Commits

2 changed files with 18 additions and 9 deletions

View File

@@ -1,3 +1,9 @@
-------------------------------------------------------------------
Tue Jun 17 04:38:02 UTC 2025 - Steve Kowalik <steven.kowalik@suse.com>
- Use pyproject macros to build and install.
- Explicitly list files and directories in %files.
------------------------------------------------------------------- -------------------------------------------------------------------
Wed Mar 6 19:31:16 UTC 2019 - Todd R <toddrme2178@gmail.com> Wed Mar 6 19:31:16 UTC 2019 - Todd R <toddrme2178@gmail.com>

View File

@@ -1,7 +1,7 @@
# #
# spec file for package python-pyModis # spec file for package python-pyModis
# #
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. # Copyright (c) 2025 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
@@ -12,10 +12,10 @@
# license that conforms to the Open Source Definition (Version 1.9) # license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative. # published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/ # Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%{!?license: %global license %doc} %{!?license: %global license %doc}
%define oldpython python %define oldpython python
Name: python-pyModis Name: python-pyModis
@@ -23,10 +23,12 @@ Version: 2.0.9
Release: 0 Release: 0
License: GPL-2.0-or-later License: GPL-2.0-or-later
Summary: Python library for MODIS data Summary: Python library for MODIS data
Url: http://www.pymodis.org URL: http://www.pymodis.org
Group: Development/Languages/Python Group: Development/Languages/Python
Source: https://files.pythonhosted.org/packages/source/p/pymodis/pyModis-%{version}.tar.gz Source: https://files.pythonhosted.org/packages/source/p/pymodis/pyModis-%{version}.tar.gz
BuildRequires: %{python_module pip}
BuildRequires: %{python_module setuptools} BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module wheel}
BuildRequires: fdupes BuildRequires: fdupes
BuildRequires: python-rpm-macros BuildRequires: python-rpm-macros
%ifpython2 %ifpython2
@@ -34,8 +36,8 @@ Provides: %{oldpython}-pymodis = %{version}
Obsoletes: %{oldpython}-pymodis < %{version} Obsoletes: %{oldpython}-pymodis < %{version}
%endif %endif
BuildArch: noarch BuildArch: noarch
Requires(post): update-alternatives Requires(post): update-alternatives
Requires(postun): update-alternatives Requires(postun): update-alternatives
%python_subpackages %python_subpackages
@@ -53,10 +55,10 @@ NASA servers.
sed -i -e '/^#!\//, 1d' pymodis/*.py sed -i -e '/^#!\//, 1d' pymodis/*.py
%build %build
%python_build %pyproject_wheel
%install %install
%python_install %pyproject_install
%python_expand %fdupes %{buildroot}%{$python_sitelib} %python_expand %fdupes %{buildroot}%{$python_sitelib}
mv %{buildroot}%{_bindir}/modis_convert.py %{buildroot}%{_bindir}/modis_convert mv %{buildroot}%{_bindir}/modis_convert.py %{buildroot}%{_bindir}/modis_convert
@@ -91,6 +93,7 @@ mv %{buildroot}%{_bindir}/modis_quality.py %{buildroot}%{_bindir}/modis_quality
%python_alternative %{_bindir}/modis_multiparse %python_alternative %{_bindir}/modis_multiparse
%python_alternative %{_bindir}/modis_parse %python_alternative %{_bindir}/modis_parse
%python_alternative %{_bindir}/modis_quality %python_alternative %{_bindir}/modis_quality
%{python_sitelib}/* %{python_sitelib}/pymodis
%{python_sitelib}/py[Mm]odis-%{version}.dist-info
%changelog %changelog