From ec5971c638dd7fdc43d7a636a85fcd1a18f2beed65091f99c2a6e47e1a07db83 Mon Sep 17 00:00:00 2001 From: Martin Pluskal Date: Mon, 20 Apr 2020 08:37:47 +0000 Subject: [PATCH] Accepting request 795702 from home:scarabeus_iv:branches:Application:Geo - Fix build without py2 available OBS-URL: https://build.opensuse.org/request/show/795702 OBS-URL: https://build.opensuse.org/package/show/Application:Geo/gdal?expand=0&rev=114 --- gdal.changes | 5 +++++ gdal.spec | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/gdal.changes b/gdal.changes index a541a3f..fabb471 100644 --- a/gdal.changes +++ b/gdal.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Mon Apr 20 08:31:33 UTC 2020 - Tomáš Chvátal + +- Fix build without py2 available + ------------------------------------------------------------------- Fri Apr 17 09:58:35 UTC 2020 - Guillaume GARDET diff --git a/gdal.spec b/gdal.spec index 5f28a78..ab80551 100644 --- a/gdal.spec +++ b/gdal.spec @@ -25,6 +25,7 @@ %bcond_with ecw_support %bcond_with ecw5_support %bcond_with fgdb_support +%bcond_without python2 Name: gdal Version: 3.0.4 Release: 0 @@ -60,8 +61,10 @@ BuildRequires: opencl-headers BuildRequires: perl-ExtUtils-MakeMaker BuildRequires: perl-macros BuildRequires: pkgconfig +%if %{with python2} BuildRequires: python-numpy-devel BuildRequires: python-setuptools +%endif BuildRequires: python3-numpy-devel BuildRequires: python3-setuptools BuildRequires: swig @@ -449,10 +452,12 @@ sed -i 's,\(#define PACKAGE_.*\),/* \1 */,' %{buildroot}%{_includedir}/gdal/cpl_ %attr(755,root,root) %{perl_vendorarch}/auto/Geo/OSR/OSR.so %{_mandir}/man3/Geo::GDAL.3pm%{?ext_man} +%if %{with python2} %files -n python2-%{pypi_package_name} %license LICENSE.TXT %doc NEWS PROVENANCE.TXT %{python_sitearch}/* +%endif %files -n python3-%{pypi_package_name} %license LICENSE.TXT