[Git][debian-gis-team/satpy][master] Add patch to not use deprecated distutils module.

Bas Couwenberg (@sebastic) gitlab at salsa.debian.org
Tue Feb 21 06:51:33 GMT 2023



Bas Couwenberg pushed to branch master at Debian GIS Project / satpy


Commits:
46b08dbd by Bas Couwenberg at 2023-02-21T07:51:13+01:00
Add patch to not use deprecated distutils module.

- - - - -


4 changed files:

- debian/changelog
- debian/control
- + debian/patches/no-distutils.patch
- debian/patches/series


Changes:

=====================================
debian/changelog
=====================================
@@ -6,6 +6,7 @@ satpy (0.39.0-3) UNRELEASED; urgency=medium
 
   [ Bas Couwenberg ]
   * Bump Standards-Version to 4.6.2, no changes.
+  * Add patch to not use deprecated distutils module.
 
  -- Antonio Valentino <antonio.valentino at tiscali.it>  Tue, 03 Jan 2023 18:46:30 +0100
 


=====================================
debian/control
=====================================
@@ -32,6 +32,7 @@ Build-Depends: debhelper-compat (= 12),
                python3-imageio,
                python3-netcdf4,
                python3-numpy,
+               python3-packaging,
                python3-pil,
                python3-pint,
                python3-pooch,
@@ -77,6 +78,7 @@ Depends: python3-appdirs,
          python3-eccodes,
          python3-grib,
          python3-hdf4 (>= 0.10.1),
+         python3-packaging,
          python3-pil,
          python3-pooch,
          python3-pykdtree,


=====================================
debian/patches/no-distutils.patch
=====================================
@@ -0,0 +1,39 @@
+Description: Don't use deprecated distutils module.
+Author: Bas Couwenberg <sebastic at debian.org>
+Forwarded: https://github.com/pytroll/satpy/pull/2397
+
+--- a/satpy/writers/cf_writer.py
++++ b/satpy/writers/cf_writer.py
+@@ -145,11 +145,11 @@ import logging
+ import warnings
+ from collections import OrderedDict, defaultdict
+ from datetime import datetime
+-from distutils.version import LooseVersion
+ 
+ import numpy as np
+ import xarray as xr
+ from dask.base import tokenize
++from packaging.version import Version
+ from pyresample.geometry import AreaDefinition, SwathDefinition
+ from xarray.coding.times import CFDatetimeCoder
+ 
+@@ -199,7 +199,7 @@ CF_VERSION = 'CF-1.7'
+ def create_grid_mapping(area):
+     """Create the grid mapping instance for `area`."""
+     import pyproj
+-    if LooseVersion(pyproj.__version__) < LooseVersion('2.4.1'):
++    if Version(pyproj.__version__) < Version('2.4.1'):
+         # technically 2.2, but important bug fixes in 2.4.1
+         raise ImportError("'cf' writer requires pyproj 2.4.1 or greater")
+     # let pyproj do the heavily lifting
+--- a/setup.py
++++ b/setup.py
+@@ -33,7 +33,7 @@ from setuptools import find_packages, se
+ requires = ['numpy >=1.13', 'pillow', 'pyresample >=1.24.0', 'trollsift',
+             'trollimage >1.10.1', 'pykdtree', 'pyyaml >=5.1', 'xarray >=0.10.1, !=0.13.0',
+             'dask[array] >=0.17.1', 'pyproj>=2.2', 'zarr', 'donfig', 'appdirs',
+-            'pooch', 'pyorbital']
++            'packaging', 'pooch', 'pyorbital']
+ 
+ test_requires = ['behave', 'h5py', 'netCDF4', 'pyhdf', 'imageio',
+                  'rasterio', 'trollimage', 'fsspec', 'bottleneck',  # 'geoviews',


=====================================
debian/patches/series
=====================================
@@ -6,3 +6,4 @@
 0006-Relax-test-tolerance.patch
 0007-Fix-privacy-breach.patch
 0008-Fix-compatibility-with-old-dask-versions.patch
+no-distutils.patch



View it on GitLab: https://salsa.debian.org/debian-gis-team/satpy/-/commit/46b08dbd4493c7511ecbcdd6700632ed63972467

-- 
View it on GitLab: https://salsa.debian.org/debian-gis-team/satpy/-/commit/46b08dbd4493c7511ecbcdd6700632ed63972467
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-grass-devel/attachments/20230221/80680152/attachment-0001.htm>


More information about the Pkg-grass-devel mailing list