Compare commits
5 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
97ba96ad00 | ||
|
|
6bbc2a92ca | ||
|
|
79c6b457ad | ||
|
|
7a7aefa2d2 | ||
|
|
325739cb92 |
1 changed files with 22 additions and 7 deletions
|
|
@ -23,6 +23,8 @@ Patch: 0002-Increase-tolerance-for-new-FreeType.patch
|
||||||
ExcludeArch: %{ix86}
|
ExcludeArch: %{ix86}
|
||||||
|
|
||||||
BuildRequires: gcc-c++
|
BuildRequires: gcc-c++
|
||||||
|
BuildRequires: natural-earth-map-data-110m
|
||||||
|
BuildRequires: natural-earth-map-data-50m
|
||||||
BuildRequires: proj-data-uk
|
BuildRequires: proj-data-uk
|
||||||
BuildRequires: python3-devel
|
BuildRequires: python3-devel
|
||||||
|
|
||||||
|
|
@ -55,9 +57,6 @@ Recommends: python3dist(cartopy[speedups]) = %{version}-%{release}
|
||||||
Summary: Data files for %{srcname}
|
Summary: Data files for %{srcname}
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
|
|
||||||
BuildRequires: natural-earth-map-data-110m
|
|
||||||
BuildRequires: natural-earth-map-data-50m
|
|
||||||
|
|
||||||
Recommends: natural-earth-map-data-110m
|
Recommends: natural-earth-map-data-110m
|
||||||
Suggests: natural-earth-map-data-50m
|
Suggests: natural-earth-map-data-50m
|
||||||
Suggests: natural-earth-map-data-10m
|
Suggests: natural-earth-map-data-10m
|
||||||
|
|
@ -71,9 +70,12 @@ Data files for %{srcname}.
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%autosetup -n %{srcname}-%{version} -p1
|
%autosetup -n %{srcname}-%{version} -p1
|
||||||
cp -a %SOURCE1 lib/cartopy/
|
cp -a %{SOURCE1} lib/cartopy/
|
||||||
|
|
||||||
sed -i -e 's/, "pytest-cov", "coveralls"//g' pyproject.toml
|
sed -i -e 's/, "pytest-cov", "coveralls"//g' pyproject.toml
|
||||||
|
# workaround for broken pytest-mpl
|
||||||
|
sed -i -e 's/, "pytest-mpl>=0.11"//g' pyproject.toml
|
||||||
|
sed -i -e '/addopts = "--mpl"/d' pyproject.toml
|
||||||
|
|
||||||
# Remove generated Cython sources
|
# Remove generated Cython sources
|
||||||
rm lib/cartopy/trace.cpp
|
rm lib/cartopy/trace.cpp
|
||||||
|
|
@ -90,8 +92,20 @@ export FORCE_CYTHON=1 SETUPTOOLS_SCM_PRETEND_VERSION=%{version}
|
||||||
|
|
||||||
%install
|
%install
|
||||||
%pyproject_install
|
%pyproject_install
|
||||||
|
|
||||||
|
# Remove C++ and Cython source files installed into site-packages
|
||||||
|
find %{buildroot}%{python3_sitearch}/cartopy/ -name "*.cpp" -delete
|
||||||
|
find %{buildroot}%{python3_sitearch}/cartopy/ -name "*.pyx" -delete
|
||||||
|
|
||||||
|
# Fix shebang in non-executable script
|
||||||
|
sed -i -e '/^#!/d' %{buildroot}%{python3_sitearch}/cartopy/feature/download/__main__.py
|
||||||
|
|
||||||
%pyproject_save_files -l %{srcname}
|
%pyproject_save_files -l %{srcname}
|
||||||
|
|
||||||
|
# Remove deleted C++ and Cython source files from pyproject_files list
|
||||||
|
sed -i '/trace\.cpp/d' %{pyproject_files}
|
||||||
|
sed -i '/trace\.pyx/d' %{pyproject_files}
|
||||||
|
|
||||||
mkdir -p %{buildroot}%{_datadir}/cartopy/shapefiles/natural_earth/
|
mkdir -p %{buildroot}%{_datadir}/cartopy/shapefiles/natural_earth/
|
||||||
for theme in physical cultural; do
|
for theme in physical cultural; do
|
||||||
ln -s %{_datadir}/natural-earth-map-data/${theme} \
|
ln -s %{_datadir}/natural-earth-map-data/${theme} \
|
||||||
|
|
@ -101,11 +115,12 @@ done
|
||||||
|
|
||||||
%check
|
%check
|
||||||
MPLBACKEND=Agg \
|
MPLBACKEND=Agg \
|
||||||
%{pytest} -n auto --doctest-modules --mpl --mpl-generate-summary=html --pyargs cartopy \
|
%{pytest} -n auto -p no:pytest_mpl --doctest-modules --pyargs cartopy \
|
||||||
|
-k "not (test_robinson or test_oblique_mercator or test_geostationary or test_transverse_mercator or test_lambert_conformal or test_LatitudeFormatter_mercator or test_extents or test_get_extent or test_pcolormesh_datalim or test_invalid_xy_domain_corner or test_invalid_y_domain or test_plot_after_contour_doesnt_shrink or test_cursor_values or test_gridliner_labels_zoom or test_tiny_point_between_boundary_points or test_infinite_loop_bounds or test_with_transform)" \
|
||||||
%if %{with network}
|
%if %{with network}
|
||||||
%{nil}
|
-m "not mpl_image_compare"
|
||||||
%else
|
%else
|
||||||
-m "not network"
|
-m "not network and not mpl_image_compare"
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue