From 229f17576b1840fb7afe48daf3b5a0b30bbdcf0c Mon Sep 17 00:00:00 2001 From: Jos de Kloe Date: Mar 24 2019 15:41:31 +0000 Subject: update to new upstream version 2.0.4 --- diff --git a/.gitignore b/.gitignore index 174e52f..581ca2d 100644 --- a/.gitignore +++ b/.gitignore @@ -1,8 +1 @@ -/pygrib-1.9.5.tar.gz -/pygrib-1.9.6.tar.gz -/pygrib-1.9.7.tar.gz -/pygrib-1.9.9.tar.gz -/pygrib-2.0.0.tar.gz -/pygrib-2.0.1.tar.gz -/pygrib-2.0.2.tar.gz -/pygrib-2.0.3.tar.gz +/pygrib-2.0.4.tar.gz diff --git a/pygrib-2.0.3-build.patch b/pygrib-2.0.3-build.patch deleted file mode 100644 index cd3a572..0000000 --- a/pygrib-2.0.3-build.patch +++ /dev/null @@ -1,80 +0,0 @@ ---- setup.py.orig 2018-08-20 18:52:50.000000000 +0200 -+++ setup.py 2018-08-24 14:48:35.577217066 +0200 -@@ -92,7 +92,8 @@ - libraries=[] - libdirs=[] - incdirs=[numpy.get_include()] --if "pygrib" in packages_to_install: libraries+=[grib_api_libname] -+g2clibname = 'g2c_v1.6.0' -+if "pygrib" in packages_to_install: libraries+=[grib_api_libname, g2clibname] - - if grib_api_libdir is None and grib_api_dir is not None: - libdirs.append(os.path.join(grib_api_dir,'lib')) -@@ -133,23 +134,28 @@ - if zlib_incdir is None and zlib_dir is not None: - incdirs.append(os.path.join(zlib_dir,'include')) - --g2clib_deps = glob.glob('g2clib_src/*.c') --g2clib_deps.append(g2clib_pyx) --incdirs.append("g2clib_src") -+#g2clib_deps = glob.glob('g2clib_src/*.c') -+#g2clib_deps.append(g2clib_pyx) -+g2clib_deps = [g2clib_pyx,] -+g2clib_dir = '/usr/lib64' -+g2clib_incdir = '/usr/include' -+libdirs.append(g2clib_dir) -+incdirs.append(g2clib_incdir) -+#incdirs.append("g2clib_src") - macros=[] - - # if jasper or openjpeg lib not available... --if 'jasper' not in libraries and 'openjpeg' not in libraries: -- g2clib_deps.remove(os.path.join('g2clib_src', 'jpcpack.c')) -- g2clib_deps.remove(os.path.join('g2clib_src', 'jpcunpack.c')) --else: -- macros.append(('USE_JPEG2000',1)) --# if png lib not available... --if 'png' not in libraries: -- g2clib_deps.remove(os.path.join('g2clib_src', 'pngpack.c')) -- g2clib_deps.remove(os.path.join('g2clib_src', 'pngunpack.c')) --else: -- macros.append(('USE_PNG',1)) -+#if 'jasper' not in libraries and 'openjpeg' not in libraries: -+# g2clib_deps.remove(os.path.join('g2clib_src', 'jpcpack.c')) -+# g2clib_deps.remove(os.path.join('g2clib_src', 'jpcunpack.c')) -+#else: -+# macros.append(('USE_JPEG2000',1)) -+## if png lib not available... -+#if 'png' not in libraries: -+# g2clib_deps.remove(os.path.join('g2clib_src', 'pngpack.c')) -+# g2clib_deps.remove(os.path.join('g2clib_src', 'pngunpack.c')) -+#else: -+# macros.append(('USE_PNG',1)) - - if hasattr(sys,'maxsize'): - if sys.maxsize > 2**31-1: macros.append(('__64BIT__',1)) -@@ -172,12 +178,22 @@ - else: - data_files = None - -+# don't provide the man pages for the python2 version, -+# to prevent rpm ownership collisions in case a user installs both -+# a python2 and a python3 version of the module -+if sys.version_info[0] < 3: -+ data_files = None -+ - install_scripts = [] - install_ext_modules = [] - install_py_modules = [] -- - if "pygrib" in packages_to_install: -- install_scripts += ['utils/grib_list','utils/grib_repack','utils/cnvgrib1to2','utils/cnvgrib2to1'] -+ # don't provide the scripts for the python2 version, -+ # to prevent rpm ownership collisions in case a user installs both -+ # a python2 and a python3 version of the module -+ if sys.version_info[0] >= 3: -+ install_scripts += ['utils/grib_list','utils/grib_repack', -+ 'utils/cnvgrib1to2','utils/cnvgrib2to1'] - install_ext_modules += [pygribext,redtoregext] - - if "ncepgrib2" in packages_to_install: diff --git a/pygrib-2.0.3-missing-samplefile.patch b/pygrib-2.0.3-missing-samplefile.patch deleted file mode 100644 index e633a0f..0000000 --- a/pygrib-2.0.3-missing-samplefile.patch +++ /dev/null @@ -1,15 +0,0 @@ ---- test.py.orig 2018-08-20 18:52:50.000000000 +0200 -+++ test.py 2018-08-24 15:07:17.644007909 +0200 -@@ -233,12 +233,6 @@ - >>> grbs.close() - >>> str('min/max %5.2f %5.2f' % (data.min(), data.max())) - 'min/max 295.40 308.10' -- >>> grbs = pygrib.open('sampledata/no-radius-shapeOfEarth-7.grb2') -- >>> for grb in grbs: print(grb) -- 1:Total precipitation:kg m-2 (accum):lambert:surface:level 0:fcst time 15-30 mins (accum):from 201804100000 -- >>> str(grb.packingType) -- 'grid_simple' -- >>> grbs.close() - """ - - if __name__ == "__main__": diff --git a/pygrib-2.0.4-build.patch b/pygrib-2.0.4-build.patch new file mode 100644 index 0000000..1e3dbb5 --- /dev/null +++ b/pygrib-2.0.4-build.patch @@ -0,0 +1,55 @@ +--- setup.py.orig 2019-02-14 17:27:14.000000000 +0100 ++++ setup.py 2019-03-24 16:11:44.597959525 +0100 +@@ -93,7 +93,8 @@ libraries=[] + libdirs=[] + import numpy + incdirs=[numpy.get_include()] +-if "pygrib" in packages_to_install: libraries+=[grib_api_libname] ++g2clibname = 'g2c_v1.6.0' ++if "pygrib" in packages_to_install: libraries+=[grib_api_libname, g2clibname] + + if grib_api_libdir is None and grib_api_dir is not None: + libdirs.append(os.path.join(grib_api_dir,'lib')) +@@ -134,23 +135,28 @@ if zlib_libdir is None and zlib_dir is n + if zlib_incdir is None and zlib_dir is not None: + incdirs.append(os.path.join(zlib_dir,'include')) + +-g2clib_deps = glob.glob('g2clib_src/*.c') +-g2clib_deps.append(g2clib_pyx) +-incdirs.append("g2clib_src") ++#g2clib_deps = glob.glob('g2clib_src/*.c') ++#g2clib_deps.append(g2clib_pyx) ++g2clib_deps = [g2clib_pyx,] ++g2clib_dir = '/usr/lib64' ++g2clib_incdir = '/usr/include' ++libdirs.append(g2clib_dir) ++incdirs.append(g2clib_incdir) ++#incdirs.append("g2clib_src") + macros=[] + + # if jasper or openjpeg lib not available... +-if 'jasper' not in libraries and 'openjpeg' not in libraries: +- g2clib_deps.remove(os.path.join('g2clib_src', 'jpcpack.c')) +- g2clib_deps.remove(os.path.join('g2clib_src', 'jpcunpack.c')) +-else: +- macros.append(('USE_JPEG2000',1)) +-# if png lib not available... +-if 'png' not in libraries: +- g2clib_deps.remove(os.path.join('g2clib_src', 'pngpack.c')) +- g2clib_deps.remove(os.path.join('g2clib_src', 'pngunpack.c')) +-else: +- macros.append(('USE_PNG',1)) ++#if 'jasper' not in libraries and 'openjpeg' not in libraries: ++# g2clib_deps.remove(os.path.join('g2clib_src', 'jpcpack.c')) ++# g2clib_deps.remove(os.path.join('g2clib_src', 'jpcunpack.c')) ++#else: ++# macros.append(('USE_JPEG2000',1)) ++## if png lib not available... ++#if 'png' not in libraries: ++# g2clib_deps.remove(os.path.join('g2clib_src', 'pngpack.c')) ++# g2clib_deps.remove(os.path.join('g2clib_src', 'pngunpack.c')) ++#else: ++# macros.append(('USE_PNG',1)) + + if hasattr(sys,'maxsize'): + if sys.maxsize > 2**31-1: macros.append(('__64BIT__',1)) diff --git a/pygrib.spec b/pygrib.spec index 7beaa82..b81a2b6 100644 --- a/pygrib.spec +++ b/pygrib.spec @@ -11,8 +11,8 @@ %endif Name: pygrib -Version: 2.0.3 -Release: 3%{?dist} +Version: 2.0.4 +Release: 1%{?dist} Summary: Python module for reading and writing GRIB (editions 1 and 2) files License: MIT @@ -22,12 +22,6 @@ Source0: https://files.pythonhosted.org/packages/source/p/%{name}/%{name}-%{v # Adapt setup.py to not use packaged g2clib source code Patch0: %{name}-%{version}-build.patch -# Remove a test case for which the test data file was (by mistake) -# not included in the released package -# Reported upstream, see pull request: -# https://github.com/jswhit/pygrib/pull/88 -Patch1: %{name}-%{version}-missing-samplefile.patch - # general BR # note: build requires are global for the whole spec file # but the python BR packages have been sorted anyway for readibility @@ -39,6 +33,7 @@ BuildRequires: grib_api-devel %endif BuildRequires: g2clib-static BuildRequires: openjpeg-devel +BuildRequires: python3-numpy # a note on the build requirements: # pygrib installation instructions mention these requirements: @@ -101,7 +96,6 @@ Requires: python3-pyproj %prep %setup -q %patch0 -p0 -b .build -%patch1 -p0 -b .missingsamplefile # Delete g2clib sources rm -rf g2clib_src @@ -164,10 +158,12 @@ export PYTHONPATH=%{buildroot}/%{python3_sitearch} %{_mandir}/man1/grib_* %changelog +* Sun Mar 24 2019 Jos de Kloe 2.0.4-1 +- update to new upstream version 2.0.4 + * Sat Feb 02 2019 Fedora Release Engineering - 2.0.3-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild - * Thu Sep 13 2018 Jos de Kloe 2.0.3-2 - remove python2 sub-package as per Mass Python 2 Package Removal for f30 diff --git a/sources b/sources index 9422943..80a4262 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (pygrib-2.0.3.tar.gz) = 6c1258d368176efd35564e822180861e886bedb641f943def996f13fcd5f743f4724f50a7537184629479607a31b6b5861dfde8c42a9e3dccf50301a9b527db6 +SHA512 (pygrib-2.0.4.tar.gz) = e934c3d57be80625fd988450e63753bbfb3975f68cf06aaa7c42bb4c135d1d1b2cfdda50dfbd37b4c6f06ff1063f25666616362bd4138e73fa304559e205817e