Switch to the GitHub source archive and run the offline tests
This commit is contained in:
parent
bcf8c16765
commit
5d046039a1
2 changed files with 60 additions and 2 deletions
|
|
@ -7,7 +7,9 @@ Summary: Client library for OGC web services
|
|||
|
||||
License: BSD-3-Clause
|
||||
URL: http://geopython.github.io/OWSLib
|
||||
Source0: %{pypi_source OWSLib}
|
||||
%global forgeurl https://github.com/geopython/OWSLib
|
||||
Source0: %{forgeurl}/archive/%{version}/OWSLib-%{version}.tar.gz
|
||||
|
||||
BuildArch: noarch
|
||||
|
||||
%global common_description %{expand:
|
||||
|
|
@ -24,6 +26,7 @@ Summary: %{summary}
|
|||
|
||||
BuildRequires: python2-devel
|
||||
BuildRequires: python2-setuptools
|
||||
BuildRequires: python2-pytest
|
||||
|
||||
BuildRequires: python2-dateutil
|
||||
BuildRequires: python2-requests
|
||||
|
|
@ -43,6 +46,7 @@ Summary: %{summary}
|
|||
|
||||
BuildRequires: python%{python3_pkgversion}-devel
|
||||
BuildRequires: python%{python3_pkgversion}-setuptools
|
||||
BuildRequires: python%{python3_pkgversion}-pytest
|
||||
|
||||
BuildRequires: python%{python3_pkgversion}-dateutil
|
||||
BuildRequires: python%{python3_pkgversion}-requests
|
||||
|
|
@ -65,6 +69,9 @@ find 'owslib' -type f -name '*.py' \
|
|||
-exec gawk '/^#!/ { print FILENAME }; { nextfile }' '{}' '+' |
|
||||
xargs -r sed -r -i '1{/^#!/d}'
|
||||
|
||||
# https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/#_linters
|
||||
sed -r -i 's/--cov[^[:blank:]=]*([=[:blank:]][^-][^[:blank:]]+)?//g' tox.ini
|
||||
|
||||
|
||||
%build
|
||||
%py2_build
|
||||
|
|
@ -76,6 +83,56 @@ find 'owslib' -type f -name '*.py' \
|
|||
%py3_install
|
||||
|
||||
|
||||
%check
|
||||
# Otherwise, pytest finds the package twice in the Python path and complains.
|
||||
rm -rf owslib
|
||||
|
||||
# In recent versions, there is a convenient “online” mark for deselecting tests
|
||||
# that require Internet access, but we still have to manually deselect doctests
|
||||
# that try to make network requests.
|
||||
k="${k-}${k+ and }not (wms_geoserver_mass_gis and txt)"
|
||||
k="${k-}${k+ and }not (wfs_MapServerWFSFeature and txt)"
|
||||
k="${k-}${k+ and }not (wfs_MapServerWFSCapabilities and txt)"
|
||||
k="${k-}${k+ and }not (wfs2_storedqueries and txt)"
|
||||
k="${k-}${k+ and }not (wfs1_generic and txt)"
|
||||
k="${k-}${k+ and }not (wcs_thredds and txt)"
|
||||
k="${k-}${k+ and }not (test_wmts_example_informatievlaanderen and txt)"
|
||||
|
||||
# These require network access, and would be covered by the “online” mark:
|
||||
k="${k-}${k+ and }not (WebMapService and getmap)"
|
||||
k="${k-}${k+ and }not (WebMapTileService and buildTileRequest)"
|
||||
k="${k-}${k+ and }not (WebMapTileService and gettile)"
|
||||
k="${k-}${k+ and }not (csw_gdp and txt)"
|
||||
k="${k-}${k+ and }not (csw_geoserver and txt)"
|
||||
k="${k-}${k+ and }not (csw_ngdc and txt)"
|
||||
k="${k-}${k+ and }not (csw_nlr and txt)"
|
||||
k="${k-}${k+ and }not (csw_pycsw and txt)"
|
||||
k="${k-}${k+ and }not (csw_pycsw_skip_caps and txt)"
|
||||
k="${k-}${k+ and }not (csw_skgeodsy and txt)"
|
||||
k="${k-}${k+ and }not (csw_uuid_constrain and txt)"
|
||||
k="${k-}${k+ and }not (ows_interfaces and txt)"
|
||||
k="${k-}${k+ and }not (sos_10_ndbc_getobservation and txt)"
|
||||
k="${k-}${k+ and }not (tms and txt)"
|
||||
k="${k-}${k+ and }not (wcs_idee and txt)"
|
||||
k="${k-}${k+ and }not (wfs_USDASSURGO and txt)"
|
||||
k="${k-}${k+ and }not (wms_JPLCapabilities and txt)"
|
||||
k="${k-}${k+ and }not (wmts and txt)"
|
||||
k="${k-}${k+ and }not (wps_execute and txt)"
|
||||
k="${k-}${k+ and }not (wps_execute_invalid_request and txt)"
|
||||
|
||||
# Unknown problem—check if it is fixed in a later version:
|
||||
k="${k-}${k+ and } not (TestOffline and test_wfs_110_remotemd_parse_all)"
|
||||
k="${k-}${k+ and } not (TestOffline and test_wfs_110_remotemd_parse_single)"
|
||||
k="${k-}${k+ and } not (TestOffline and test_wfs_200_remotemd_parse_single)"
|
||||
k="${k-}${k+ and } not (TestOffline and test_wms_130_remotemd_parse_all)"
|
||||
k="${k-}${k+ and } not (TestOffline and test_wms_130_remotemd_parse_single)"
|
||||
|
||||
PYTHONPATH='%{buildroot}%{python2_sitelib}' PYTHONDONTWRITEBYTECODE=1 \
|
||||
%{python2} -m pytest -m 'not online' -k "${k-}"
|
||||
PYTHONPATH='%{buildroot}%{python3_sitelib}' PYTHONDONTWRITEBYTECODE=1 \
|
||||
%{python3} -m pytest -m 'not online' -k "${k-}"
|
||||
|
||||
|
||||
%files -n python2-OWSLib
|
||||
%license LICENSE.txt
|
||||
%doc README.txt CHANGES.txt CREDITS.txt
|
||||
|
|
@ -97,6 +154,7 @@ find 'owslib' -type f -name '*.py' \
|
|||
- Generally “modernize” packaging (by EPEL7 standards)
|
||||
- Update License to SPDX
|
||||
- Build the Python 3 sub-package on EPEL7
|
||||
- Switch to the GitHub source archive and run the offline tests
|
||||
|
||||
* Sat Jun 13 2015 Volker Fröhlich <volker27@gmx.at> - 0.9.0-1
|
||||
- New upstream release
|
||||
|
|
|
|||
2
sources
2
sources
|
|
@ -1 +1 @@
|
|||
e511e8bdddce0e59abefc892f090e033 OWSLib-0.9.0.tar.gz
|
||||
SHA512 (OWSLib-0.9.0.tar.gz) = 4367d8de31c07499e450f05d78bded15926ed369963fa59b4372c5e658244d5c244443691dc31a436b26027109d99c827a7daf2d678f92ad41f1f51fe9de48f9
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue