diff --git a/gdal.spec b/gdal.spec index ce2a070200f5447aa4e7b4294754e0c9fba89cc5..2400bb1de793b39d1286a3d4cbb82628845bc8ee 100644 --- a/gdal.spec +++ b/gdal.spec @@ -26,12 +26,11 @@ %global with_spatialite 1 %global spatialite "--with-spatialite" %endif -%global with_python2 0 Name: gdal Version: 2.3.1 -Release: 1 +Release: 2 Summary: GIS file format library Group: System Environment/Libraries License: MIT @@ -108,9 +107,6 @@ BuildRequires: poppler-devel %endif BuildRequires: postgresql-devel BuildRequires: proj-devel -%if %{?with_python2} -BuildRequires: python2-devel -%endif BuildRequires: python3-devel BuildRequires: sqlite-devel BuildRequires: swig @@ -216,22 +212,6 @@ Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $versi %description perl The GDAL Perl modules provide support to handle multiple GIS file formats. -%if %{?with_python2} -%package -n python2-gdal -%{?python_provide:%python_provide python2-gdal} -# Remove before F30 -Provides: %{name}-python = %{version}-%{release} -Provides: %{name}-python%{?_isa} = %{version}-%{release} -Obsoletes: %{name}-python < %{version}-%{release} -Summary: Python modules for the GDAL file format library -Group: Development/Libraries -Requires: numpy -Requires: %{name}-libs%{?_isa} = %{version}-%{release} - -%description -n python2-gdal -The GDAL Python modules provide support to handle multiple GIS file formats. -The package also includes a couple of useful utilities in Python. -%endif %package -n python3-gdal %{?python_provide:%python_provide python3-gdal} @@ -255,7 +235,7 @@ BuildArch: noarch This package contains HTML and PDF documentation for GDAL. # We don't want to provide private Python extension libs -%global __provides_exclude_from ^(%{python2_sitearch}|%{python3_sitearch})/.*\.so$ +%global __provides_exclude_from %{python3_sitearch}/.*\.so$ %prep %setup -q -n %{name}-%{version} @@ -319,7 +299,6 @@ pushd gdal/swig/python/samples for f in `find . -name '*.py'`; do sed 's|^#!.\+python$|#!/usr/bin/python3|' $f > ../../python3/samples/$f chmod --reference=$f ../../python3/samples/$f - sed -i 's|^#!.\+python$|#!/usr/bin/python2|' $f done popd @@ -428,9 +407,6 @@ popd # Make Python modules pushd gdal/swig/python %py3_build -%if 0%{?with_python2} - %py2_build -%endif popd # Make Python modules @@ -480,9 +456,6 @@ rm -rf %{buildroot} pushd gdal/swig/python %py3_install -%if %{?with_python2} - %py2_install -%endif popd pushd gdal/swig/perl @@ -734,28 +707,6 @@ popd %{perl_vendorarch}/* %{_mandir}/man3/*.3pm* -%if %{?with_python2} -%files -n python2-gdal -%doc gdal/swig/python/README.txt -%doc gdal/swig/python/samples -%{_bindir}/*.py -%{_mandir}/man1/pct2rgb.1* -%{_mandir}/man1/rgb2pct.1* -%{_mandir}/man1/gdal2tiles.1* -%{_mandir}/man1/gdal_fillnodata.1* -%{_mandir}/man1/gdal_merge.1* -%{_mandir}/man1/gdal_retile.1* -%{_mandir}/man1/gdal_sieve.1* -%{python2_sitearch}/osgeo -%{python2_sitearch}/GDAL-%{version}-py*.egg-info -%{python2_sitearch}/osr.py* -%{python2_sitearch}/ogr.py* -%{python2_sitearch}/gdal*.py* -%{python2_sitearch}/gnm.py* -%else -%exclude %{python2_sitearch} -%endif - %files -n python3-gdal %doc gdal/swig/python/README.txt %doc gdal/swig/python3/samples