[Git][debian-gis-team/satpy][master] Reproducible build

Antonio Valentino gitlab at salsa.debian.org
Fri Jan 18 07:52:53 GMT 2019


Antonio Valentino pushed to branch master at Debian GIS Project / satpy


Commits:
3277d472 by Antonio Valentino at 2019-01-18T07:47:10Z
Reproducible build

- - - - -


3 changed files:

- debian/changelog
- + debian/patches/0005-Reproducible-build.patch
- debian/patches/series


Changes:

=====================================
debian/changelog
=====================================
@@ -1,3 +1,10 @@
+satpy (0.11.1-3) UNRELEASED; urgency=medium
+
+  * debian/patches:
+    - new 0005-Reproducible-build.patch (Closes: #919566)
+
+ -- Antonio Valentino <antonio.valentino at tiscali.it>  Fri, 18 Jan 2019 07:45:38 +0000
+
 satpy (0.11.1-2) unstable; urgency=medium
 
   * debian/tests/control:


=====================================
debian/patches/0005-Reproducible-build.patch
=====================================
@@ -0,0 +1,103 @@
+From: Antonio Valentino <antonio.valentino at tiscali.it>
+Date: Fri, 18 Jan 2019 07:44:58 +0000
+Subject: Reproducible build
+
+---
+ satpy/composites/__init__.py | 4 +++-
+ satpy/config.py              | 4 +++-
+ satpy/readers/__init__.py    | 8 ++++++--
+ satpy/scene.py               | 4 +++-
+ 4 files changed, 15 insertions(+), 5 deletions(-)
+
+diff --git a/satpy/composites/__init__.py b/satpy/composites/__init__.py
+index b02dd86..4c5ede0 100644
+--- a/satpy/composites/__init__.py
++++ b/satpy/composites/__init__.py
+@@ -60,7 +60,9 @@ class IncompatibleTimes(Exception):
+ class CompositorLoader(object):
+     """Read composites using the configuration files on disk."""
+ 
+-    def __init__(self, ppp_config_dir=CONFIG_PATH):
++    def __init__(self, ppp_config_dir=None):
++        if ppp_config_dir is None:
++            ppp_config_dir = CONFIG_PATH
+         self.modifiers = {}
+         self.compositors = {}
+         self.ppp_config_dir = ppp_config_dir
+diff --git a/satpy/config.py b/satpy/config.py
+index c36566b..ed7cf1e 100644
+--- a/satpy/config.py
++++ b/satpy/config.py
+@@ -40,7 +40,9 @@ BASE_PATH = os.path.dirname(os.path.realpath(__file__))
+ PACKAGE_CONFIG_PATH = os.path.join(BASE_PATH, 'etc')
+ 
+ 
+-def get_environ_config_dir(default=PACKAGE_CONFIG_PATH):
++def get_environ_config_dir(default=None):
++    if default is None:
++        default = PACKAGE_CONFIG_PATH
+     return os.environ.get('PPP_CONFIG_DIR', default)
+ 
+ 
+diff --git a/satpy/readers/__init__.py b/satpy/readers/__init__.py
+index 15423a4..7a2dcc5 100644
+--- a/satpy/readers/__init__.py
++++ b/satpy/readers/__init__.py
+@@ -515,7 +515,7 @@ def available_readers(as_dict=False):
+ 
+ 
+ def find_files_and_readers(start_time=None, end_time=None, base_dir=None,
+-                           reader=None, sensor=None, ppp_config_dir=get_environ_config_dir(),
++                           reader=None, sensor=None, ppp_config_dir=None,
+                            filter_parameters=None, reader_kwargs=None):
+     """Find on-disk files matching the provided parameters.
+ 
+@@ -553,6 +553,8 @@ def find_files_and_readers(start_time=None, end_time=None, base_dir=None,
+     Returns: Dictionary mapping reader name string to list of filenames
+ 
+     """
++    if ppp_config_dir is None:
++        ppp_config_dir = get_environ_config_dir()
+     reader_files = {}
+     reader_kwargs = reader_kwargs or {}
+     filter_parameters = filter_parameters or reader_kwargs.get('filter_parameters', {})
+@@ -595,7 +597,7 @@ def find_files_and_readers(start_time=None, end_time=None, base_dir=None,
+ 
+ 
+ def load_readers(filenames=None, reader=None, reader_kwargs=None,
+-                 ppp_config_dir=get_environ_config_dir()):
++                 ppp_config_dir=None):
+     """Create specified readers and assign files to them.
+ 
+     Args:
+@@ -612,6 +614,8 @@ def load_readers(filenames=None, reader=None, reader_kwargs=None,
+     """
+     reader_instances = {}
+     reader_kwargs = reader_kwargs or {}
++    if ppp_config_dir is None:
++        ppp_config_dir = get_environ_config_dir()
+ 
+     if not filenames and not reader:
+         # used for an empty Scene
+diff --git a/satpy/scene.py b/satpy/scene.py
+index 31041bb..8f06d9d 100644
+--- a/satpy/scene.py
++++ b/satpy/scene.py
+@@ -72,7 +72,7 @@ class Scene(MetadataObject):
+     """
+ 
+     def __init__(self, filenames=None, reader=None, filter_parameters=None, reader_kwargs=None,
+-                 ppp_config_dir=get_environ_config_dir(),
++                 ppp_config_dir=None,
+                  base_dir=None,
+                  sensor=None,
+                  start_time=None,
+@@ -107,6 +107,8 @@ class Scene(MetadataObject):
+ 
+         """
+         super(Scene, self).__init__()
++        if ppp_config_dir is None:
++            ppp_config_dir = get_environ_config_dir()
+         # Set the PPP_CONFIG_DIR in the environment in case it's used elsewhere in pytroll
+         LOG.debug("Setting 'PPP_CONFIG_DIR' to '%s'", ppp_config_dir)
+         os.environ["PPP_CONFIG_DIR"] = self.ppp_config_dir = ppp_config_dir


=====================================
debian/patches/series
=====================================
@@ -2,3 +2,4 @@
 0002-Compatibility-with-Python-3.7.patch
 0003-Skip-tests-that-require-pydecorate.patch
 0004-Fix-cf-epoch.patch
+0005-Reproducible-build.patch



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

-- 
View it on GitLab: https://salsa.debian.org/debian-gis-team/satpy/commit/3277d47292ea4a8f49efe8f06d71ae0ac1f5c83b
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/20190118/9cbab31c/attachment-0001.html>


More information about the Pkg-grass-devel mailing list