[python-fabio] 08/11: remove all patches.

Frédéric-Emmanuel Picca picca at moszumanska.debian.org
Wed Jul 27 18:20:28 UTC 2016


This is an automated email from the git hooks/post-receive script.

picca pushed a commit to branch master
in repository python-fabio.

commit 304fc98c76d6791ca80d4555b4bba2c7fa30bb22
Author: Picca Frédéric-Emmanuel <picca at synchrotron-soleil.fr>
Date:   Wed Jul 27 18:31:09 2016 +0200

    remove all patches.
---
 .../0001-fix-the-documentation-build-process.patch |  35 -----
 .../0002-fix-upstream-wrong-six-import.patch       | 150 ---------------------
 debian/patches/series                              |   2 -
 3 files changed, 187 deletions(-)

diff --git a/debian/patches/0001-fix-the-documentation-build-process.patch b/debian/patches/0001-fix-the-documentation-build-process.patch
deleted file mode 100644
index 0558d7c..0000000
--- a/debian/patches/0001-fix-the-documentation-build-process.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From: =?utf-8?q?Picca_Fr=C3=A9d=C3=A9ric-Emmanuel?=
- <picca at synchrotron-soleil.fr>
-Date: Mon, 4 Jan 2016 14:12:29 +0100
-Subject: fix the documentation build process
-
----
- doc/source/conf.py | 15 +--------------
- 1 file changed, 1 insertion(+), 14 deletions(-)
-
-diff --git a/doc/source/conf.py b/doc/source/conf.py
-index ce0c421..696b421 100644
---- a/doc/source/conf.py
-+++ b/doc/source/conf.py
-@@ -21,20 +21,7 @@ import subprocess
- # documentation root, use os.path.abspath to make it absolute, like shown here.
- # sys.path.insert(0, os.path.abspath('.'))
- 
--root_dir = os.path.abspath("../..")
--build_dir = [os.path.abspath(i) for i in glob.glob('../../build/lib*')]
--# if (not build_dir) or ("__init__.py" not in os.listdir(os.path.join(build_dir[0], "fabio"))):
--curr_dir = os.path.abspath(os.getcwd())
--os.chdir(root_dir)
--errno = subprocess.call([sys.executable, 'setup.py', 'build'])
--if errno != 0:
--    print("Unable to build FabIO, needed for the documentation")
--    raise SystemExit(errno)
--os.chdir(curr_dir)
--build_dir = glob.glob('../../build/lib*')
--sys.path.insert(0, build_dir[0])
--os.environ["PATH"] = os.path.join(root_dir, "scripts") + os.pathsep + os.environ.get("PATH", "")
--os.environ["PYTHONPATH"] = build_dir[0] + os.pathsep + os.environ.get("PYTHONPATH", "")
-+sys.path.insert(0, os.path.join(os.pardir, os.pardir))
- 
- # -- General configuration -----------------------------------------------------
- 
diff --git a/debian/patches/0002-fix-upstream-wrong-six-import.patch b/debian/patches/0002-fix-upstream-wrong-six-import.patch
deleted file mode 100644
index 617e005..0000000
--- a/debian/patches/0002-fix-upstream-wrong-six-import.patch
+++ /dev/null
@@ -1,150 +0,0 @@
-From: =?utf-8?q?Picca_Fr=C3=A9d=C3=A9ric-Emmanuel?=
- <picca at synchrotron-soleil.fr>
-Date: Tue, 5 Jan 2016 10:41:14 +0100
-Subject: fix upstream wrong six import
-
-The six check logic in fabioimage was wrong.
-let's deal with the six import in only one place (fabioutils)
-Then import six from there. This reduce the ducplication code.
-Use also the distutils.version module to deal with module
-version comparisons.
----
- fabio-src/cbfimage.py    |  5 +++--
- fabio-src/compression.py |  8 +-------
- fabio-src/fabioimage.py  | 13 ++-----------
- fabio-src/fabioutils.py  |  7 ++++++-
- test/testcbfimage.py     |  4 ++--
- test/testedfimage.py     |  2 +-
- test/testfabioimage.py   |  2 +-
- 7 files changed, 16 insertions(+), 25 deletions(-)
-
-diff --git a/fabio-src/cbfimage.py b/fabio-src/cbfimage.py
-index c3892d9..9440ecb 100644
---- a/fabio-src/cbfimage.py
-+++ b/fabio-src/cbfimage.py
-@@ -49,7 +49,8 @@ __version__ = ["Generated by CIF.py: Jan 2005 - Oct 2015",
- import os, logging
- import numpy
- from .fabioimage import FabioImage
--from .compression import compByteOffset, decByteOffset, md5sum, six
-+from .fabioutils import six
-+from .compression import compByteOffset, decByteOffset, md5sum
- 
- logger = logging.getLogger("CbfImage")
- 
-@@ -863,4 +864,4 @@ class CIF(dict):
-         except ValueError:
-             return False
- 
--cbfimage = CbfImage
-\ No newline at end of file
-+cbfimage = CbfImage
-diff --git a/fabio-src/compression.py b/fabio-src/compression.py
-index 335bb7e..1748caf 100644
---- a/fabio-src/compression.py
-+++ b/fabio-src/compression.py
-@@ -44,13 +44,7 @@ import struct
- import logging
- logger = logging.getLogger("compression")
- 
--try:
--    import six
--    if tuple(int(i) for i in six.__version__.split(".")[:2]) < (1, 8):
--        raise ImportError("Six version is too old")
--except ImportError:
--    from .third_party import six
--
-+from .fabioutils import six
- 
- if six.PY2:
-     bytes = str
-diff --git a/fabio-src/fabioimage.py b/fabio-src/fabioimage.py
-index b678123..0c81b25 100644
---- a/fabio-src/fabioimage.py
-+++ b/fabio-src/fabioimage.py
-@@ -50,16 +50,7 @@ except ImportError:
-     Image = None
- from . import fabioutils, converters
- 
--try:
--    import six
--    six_version = tuple(int(i) for i in six.__version__.split() if i.isdigit())
--    if six_version < (1, 8):
--        for i in ("six", "six.moves"):
--            sys.modules.pop(i, None)
--        raise ImportError("Old version")
--    from six import with_metaclass
--except ImportError:
--    from .third_party.six import with_metaclass
-+from .fabioutils import six
- 
- try:
-     from collections import OrderedDict
-@@ -79,7 +70,7 @@ class FabioMeta(type):
-         super(FabioMeta, cls).__init__(name, bases, dct)
- 
- 
--class FabioImage(with_metaclass(FabioMeta, object)):
-+class FabioImage(six.with_metaclass(FabioMeta, object)):
-     """
-     A common object for images in fable
-     Contains a numpy array (.data) and dict of meta data (.header)
-diff --git a/fabio-src/fabioutils.py b/fabio-src/fabioutils.py
-index 74f4730..d98f7d7 100644
---- a/fabio-src/fabioutils.py
-+++ b/fabio-src/fabioutils.py
-@@ -37,7 +37,12 @@ import re, os, logging, threading, sys
- logger = logging.getLogger("fabioutils")
- try:
-     import six
--    if tuple(int(i) for i in six.__version__.split(".")[:2]) < (1, 8):
-+
-+    from distutils.version import StrictVersion as V
-+
-+    if V(six.__version__) < V("1.8"):
-+        for i in ("six", "six.moves"):
-+            sys.modules.pop(i, None)
-         raise ImportError("Six version is too old")
- except ImportError:
-     from .third_party import six
-diff --git a/test/testcbfimage.py b/test/testcbfimage.py
-index ca6f921..d6f303d 100755
---- a/test/testcbfimage.py
-+++ b/test/testcbfimage.py
-@@ -48,8 +48,8 @@ logger = UtilsTest.get_logger(__file__)
- fabio = sys.modules["fabio"]
- from fabio.cbfimage import cbfimage
- from fabio.compression import decByteOffset_numpy, decByteOffset_cython
--from fabio.third_party.six import PY3
--if PY3:
-+from fabio.fabioutils import six
-+if six.PY3:
-     from fabio.fabioutils import unicode
- 
- 
-diff --git a/test/testedfimage.py b/test/testedfimage.py
-index 47fe2f6..0b2f48d 100755
---- a/test/testedfimage.py
-+++ b/test/testedfimage.py
-@@ -44,7 +44,7 @@ from .utilstest import UtilsTest
- logger = UtilsTest.get_logger(__file__)
- fabio = sys.modules["fabio"]
- from fabio.edfimage import edfimage
--from fabio.third_party import six
-+from fabio.fabioutils import six
- 
- 
- class TestFlatEdfs(unittest.TestCase):
-diff --git a/test/testfabioimage.py b/test/testfabioimage.py
-index 5d6ef20..8927020 100644
---- a/test/testfabioimage.py
-+++ b/test/testfabioimage.py
-@@ -44,7 +44,7 @@ from .utilstest import UtilsTest
- logger = UtilsTest.get_logger(__file__)
- fabio = sys.modules["fabio"]
- from fabio.fabioimage import fabioimage
--from fabio.third_party import six
-+from fabio.fabioutils import six
- 
- class test50000(unittest.TestCase):
-     """ test with 50000 everywhere"""
diff --git a/debian/patches/series b/debian/patches/series
deleted file mode 100644
index 92184fa..0000000
--- a/debian/patches/series
+++ /dev/null
@@ -1,2 +0,0 @@
-0001-fix-the-documentation-build-process.patch
-0002-fix-upstream-wrong-six-import.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/python-fabio.git



More information about the debian-science-commits mailing list