From 713ff931f2deba8f96d6bd98b6cd463189f5df48 Mon Sep 17 00:00:00 2001 From: Jos de Kloe Date: Jun 30 2017 15:53:11 +0000 Subject: rename pygrib to python2-pygrib following the new package naming scheme --- diff --git a/pygrib.spec b/pygrib.spec index 17cb53e..3baecde 100644 --- a/pygrib.spec +++ b/pygrib.spec @@ -1,11 +1,10 @@ -# This module works with Python 2 and 3 %if 0%{?fedora} || 0%{?rhel} > 6 %global with_python3 1 %endif Name: pygrib Version: 2.0.2 -Release: 5%{?dist} +Release: 6%{?dist} Summary: Python module for reading and writing GRIB (editions 1 and 2) files License: MIT @@ -16,17 +15,22 @@ Source0: https://files.pythonhosted.org/packages/source/p/pygrib/%{name}-%{ve # Adapt setup.py to not use packaged g2clib source code Patch0: %{name}-%{version}-2-build.patch -BuildRequires: python2-devel BuildRequires: grib_api-devel BuildRequires: g2clib-static -BuildRequires: numpy -BuildRequires: Cython -BuildRequires: pyproj BuildRequires: openjpeg-devel + +# python2 specific +BuildRequires: python2-devel +BuildRequires: python2-numpy +BuildRequires: python2-Cython +BuildRequires: python2-pyproj + +# python3 specific %if 0%{?with_python3} -BuildRequires: python3-devel -BuildRequires: python3-numpy -BuildRequires: python3-pyproj +BuildRequires: python3-devel +BuildRequires: python3-numpy +BuildRequires: python3-Cython +BuildRequires: python3-pyproj %endif # if with_python3 # a note on the build requirements: @@ -52,7 +56,7 @@ BuildRequires: python3-pyproj # inserted manually (see bug #996834) Requires: grib_api -Requires: pyproj +Requires: python2-pyproj # specifying this is not needed. rpmbuild figures it out without help # Requires: jasper-libs openjpeg-libs libpng zlib @@ -70,40 +74,45 @@ Requires: pyproj } %endif # if with_python3 -%description -Cython wrapper to provide python interfaces to the grib library. - -GRIB is the the World Meteorological Organization (WMO) standard for -distributing gridded data. This module contains python interfaces for reading -and writing GRIB data using the ECMWF GRIB API C library, and the NCEP GRIB2 -C library, as well as command-line utilities for listing and re-packing GRIB +%global _description \ +Cython wrapper to provide python interfaces to the grib library. \ + \ +GRIB is the the World Meteorological Organization (WMO) standard for \ +distributing gridded data. This module contains python interfaces for reading \ +and writing GRIB data using the ECMWF GRIB API C library, and the NCEP GRIB2 \ +C library, as well as command-line utilities for listing and re-packing GRIB \ files. -# provide python2.pygrib as well -%python_provide python2-%{name} +%description %_description + +# explicitly prepend python2 to the name of the binary package +%package -n python2-%{name} + +Summary: %summary -# this should evaluate to Provides: python2-pygrib -%{?python_provide:%python_provide python-%{name}} +# ensure python provides are provided as long as python2 is the default runtime +%{?python_provide:%python_provide python2-%{name}} + +# define provides/obsoletes following the package name change that +# prepends python2 to the python2 version of the module +Provides: %{name} = %{version}-%{release} +Obsoletes: %{name} < 2.0.2-5 + +%description -n python2-%{name} %_description %if 0%{?with_python3} %package -n python3-%{name} -Summary: Python3 module for reading and writing GRIB (editions 1 and 2) files + +Summary: %summary # ensure python provides are provided when python3 becomes the default runtime %{?python_provide:%python_provide python3-%{name}} - + # it seems this requires must be specified before the description section # or it will be ignored ... Requires: python3-pyproj -%description -n python3-%{name} -Cython wrapper to provide python3 interfaces to the grib library. - -GRIB is the the World Meteorological Organization (WMO) standard for -distributing gridded data. This module contains python interfaces for reading -and writing GRIB data using the ECMWF GRIB API C library, and the NCEP GRIB2 -C library, as well as command-line utilities for listing and re-packing GRIB -files. +%description -n python3-%{name} %_description %endif # if with_python3 @@ -134,9 +143,9 @@ cython pygrib.pyx %if 0%{?with_python3} pushd %{py3dir} -cython -3 g2clib.pyx -cython -3 redtoreg.pyx -cython -3 pygrib.pyx +cython3 g2clib.pyx +cython3 redtoreg.pyx +cython3 pygrib.pyx %endif # if with_python3 %build @@ -178,7 +187,7 @@ export PYTHONPATH=%{buildroot}/%{python3_sitearch} %{__python3} test.py %endif # if with_python3 -%files +%files -n python2-%{name} %doc COPYING PKG-INFO README.md %doc docs ncepgrib2_docs @@ -209,13 +218,15 @@ export PYTHONPATH=%{buildroot}/%{python3_sitearch} %endif # with_python3 %changelog +* Fri Jun 30 2017 Jos de Kloe 2.0.2-6 +- rename pygrib to python2-pygrib following the new package naming scheme + * Sat Feb 11 2017 Fedora Release Engineering - 2.0.2-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild * Mon Dec 19 2016 Miro HronĨok - 2.0.2-4 - Rebuild for Python 3.6 - * Sat Dec 3 2016 Jos de Kloe 2.0.2-3 - force a rebuild, needed due to libjasper so version bump