python-OWSLib/python-OWSLib.spec
Benjamin A. Beasley 417d4722f6 Update License to SPDX
2023-03-08 07:53:39 -05:00

138 lines
3.6 KiB
RPMSpec

# Works with either ElementTree or python-lxml
%global with_python3 0%{?fedora}
Name: python-OWSLib
Version: 0.9.0
Release: 2%{?dist}
Summary: Client library for OGC web services
License: BSD-3-Clause
URL: http://geopython.github.io/OWSLib
Source0: %{pypi_source OWSLib}
BuildArch: noarch
%global common_description %{expand:
Package for client programming with Open Geospatial Consortium (OGC) web
service (hence OWS) interface standards, and their related content models.}
%description %{common_description}
%package -n python2-OWSLib
Summary: %{summary}
%{?python_provide:%python_provide python2-OWSLib}
BuildRequires: python2-devel
BuildRequires: python2-setuptools
BuildRequires: python2-dateutil
BuildRequires: python2-requests
BuildRequires: python2-pytz
Requires: python2-dateutil
Requires: python2-requests
Requires: python2-pytz
%description -n python2-OWSLib %{common_description}
%if 0%{?with_python3}
%package -n python%{python3_pkgversion}-OWSLib
Summary: %{summary}
%{?python_provide:%python_provide python%{python3_pkgversion}-OWSLib}
BuildRequires: python%{python3_pkgversion}-devel
BuildRequires: python%{python3_pkgversion}-setuptools
BuildRequires: python%{python3_pkgversion}-dateutil
BuildRequires: python%{python3_pkgversion}-requests
BuildRequires: python%{python3_pkgversion}-pytz
Requires: python%{python3_pkgversion}-dateutil
Requires: python%{python3_pkgversion}-requests
Requires: python%{python3_pkgversion}-pytz
%description -n python%{python3_pkgversion}-OWSLib %{common_description}
%endif # if with_python3
%prep
%autosetup -n OWSLib-%{version}
rm -rf OWSLib.egg-info
# Remove shebangs from non-script sources. The find-then-modify pattern
# preserves mtimes on sources that did not need to be modified.
find 'owslib' -type f -name '*.py' \
-exec gawk '/^#!/ { print FILENAME }; { nextfile }' '{}' '+' |
xargs -r sed -r -i '1{/^#!/d}'
%build
%py2_build
%if 0%{?with_python3}
%py3_build
%endif
%install
%py2_install
%if 0%{?with_python3}
%py3_install
%endif # if with_python3
%files -n python2-OWSLib
%license LICENSE.txt
%doc README.txt CHANGES.txt CREDITS.txt
%{python2_sitelib}/owslib/
%{python2_sitelib}/OWSLib-%{version}-py%{python2_version}.egg-info
%if 0%{?with_python3}
%files -n python%{python3_pkgversion}-OWSLib
%license LICENSE.txt
%doc README.txt CHANGES.txt CREDITS.txt
%{python3_sitelib}/owslib/
%{python3_sitelib}/OWSLib-%{version}-py%{python3_version}.egg-info
%endif # if with_python3
%changelog
* Wed Mar 08 2023 Benjamin A. Beasley <code@musicinmybrain.net> - 0.9.0-2
- Generally “modernize” packaging (by EPEL7 standards)
- Update License to SPDX
* Sat Jun 13 2015 Volker Fröhlich <volker27@gmx.at> - 0.9.0-1
- New upstream release
- Add Python 3 sub-package
* Sat Feb 14 2015 Volker Fröhlich <volker27@gmx.at> - 0.8.13-1
- New upstream release
* Tue Dec 23 2014 Volker Fröhlich <volker27@gmx.at> - 0.8.12-1
- New upstream release
* Wed Dec 17 2014 Volker Fröhlich <volker27@gmx.at> - 0.8.11-1
- New upstream release
* Mon Oct 13 2014 Volker Fröhlich <volker27@gmx.at> - 0.8.10-1
- New upstream release
* Wed Sep 24 2014 Volker Fröhlich <volker27@gmx.at> - 0.8.9-1
- New upstream release
* Mon Jul 7 2014 Volker Fröhlich <volker27@gmx.at> - 0.8.8-1
- New upstream release
* Wed Jul 2 2014 Volker Fröhlich <volker27@gmx.at> - 0.8.7-3
- Changed package summary
* Tue Jul 1 2014 Volker Fröhlich <volker27@gmx.at> - 0.8.7-2
- Correct BR python-setuptools-devel to python-setuptools
* Mon Jun 30 2014 Volker Fröhlich <volker27@gmx.at> - 0.8.7-1
- Initial package for Fedora