New version 0.9.0 with Python 3 sub-package
This commit is contained in:
parent
3c7bcbfd84
commit
35954f3baa
1 changed files with 62 additions and 6 deletions
|
|
@ -1,11 +1,9 @@
|
|||
# Python3 support doesn't seem to be complete yet
|
||||
# https://github.com/geopython/OWSLib/issues/81
|
||||
|
||||
# Works with either ElementTree or python-lxml
|
||||
%global modname OWSLib
|
||||
%global with_python3 1
|
||||
|
||||
Name: python-%{modname}
|
||||
Version: 0.8.13
|
||||
Version: 0.9.0
|
||||
Release: 1%{?dist}
|
||||
Summary: Client library for OGC web services
|
||||
License: BSD
|
||||
|
|
@ -16,23 +14,70 @@ BuildArch: noarch
|
|||
BuildRequires: python2-devel
|
||||
BuildRequires: python-setuptools
|
||||
Requires: python-dateutil
|
||||
Requires: python-requests
|
||||
Requires: pytz
|
||||
|
||||
%if 0%{?with_python3}
|
||||
BuildRequires: python3-devel
|
||||
BuildRequires: python3-setuptools
|
||||
%endif # if with_python3
|
||||
|
||||
%description
|
||||
Package for client programming with Open Geospatial Consortium (OGC) web
|
||||
service (hence OWS) interface standards, and their related content models.
|
||||
|
||||
%if 0%{?with_python3}
|
||||
%package -n python3-OWSLib
|
||||
Summary: Client library for OGC web services
|
||||
|
||||
Requires: python3-dateutil
|
||||
Requires: python3-requests
|
||||
Requires: python3-pytz
|
||||
|
||||
%description -n python3-OWSLib
|
||||
Package for client programming with Open Geospatial Consortium (OGC) web
|
||||
service (hence OWS) interface standards, and their related content models.
|
||||
%endif # if with_python3
|
||||
|
||||
%prep
|
||||
%setup -q -n %{modname}-%{version}
|
||||
rm -rf %{modname}.egg-info
|
||||
%setup -qc -n %{modname}-%{version}
|
||||
rm -rf %{modname}-%{version}/%{modname}.egg-info
|
||||
mv %{modname}-%{version} python2
|
||||
|
||||
%if 0%{?with_python3}
|
||||
cp -a python2 python3
|
||||
find python3 -name '*.py' | xargs sed -i '1s|^#!python|#!%{__python3}|'
|
||||
%endif # with_python3
|
||||
|
||||
find python2 -name '*.py' | xargs sed -i '1s|^#!python|#!%{__python2}|'
|
||||
|
||||
pushd python2
|
||||
cp -pr LICENSE.txt README.txt CHANGES.txt CREDITS.txt ../
|
||||
popd
|
||||
|
||||
|
||||
%build
|
||||
pushd python2
|
||||
%{__python2} setup.py build
|
||||
popd
|
||||
|
||||
%if 0%{?with_python3}
|
||||
pushd python3
|
||||
%{__python3} setup.py build
|
||||
popd
|
||||
%endif # if with_python3
|
||||
|
||||
|
||||
%install
|
||||
pushd python2
|
||||
%{__python2} setup.py install --skip-build --root %{buildroot}
|
||||
popd
|
||||
|
||||
%if 0%{?with_python3}
|
||||
pushd python3
|
||||
%{__python3} setup.py install --skip-build --root %{buildroot}
|
||||
popd
|
||||
%endif # if with_python3
|
||||
|
||||
|
||||
%files
|
||||
|
|
@ -40,7 +85,18 @@ rm -rf %{modname}.egg-info
|
|||
%{python_sitelib}/owslib
|
||||
%{python_sitelib}/%{modname}-%{version}-py*.egg-info
|
||||
|
||||
%if 0%{?with_python3}
|
||||
%files -n python3-OWSLib
|
||||
%doc LICENSE.txt README.txt CHANGES.txt CREDITS.txt
|
||||
%{python3_sitelib}/owslib
|
||||
%{python3_sitelib}/%{modname}-%{version}-py*.egg-info
|
||||
%endif # if with_python3
|
||||
|
||||
%changelog
|
||||
* 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
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue