[python-mapnik] 04/06: Drop patches, included upstream.

Sebastiaan Couwenberg sebastic at moszumanska.debian.org
Sun Sep 20 13:07:29 UTC 2015


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

sebastic pushed a commit to branch master
in repository python-mapnik.

commit 802950db1250c1c88ee0fe0e541d186ef1809b91
Author: Bas Couwenberg <sebastic at xs4all.nl>
Date:   Sun Sep 13 01:23:37 2015 +0200

    Drop patches, included upstream.
---
 debian/changelog                                   |   2 +-
 debian/patches/series                              |   2 -
 ...r-pattern-for-finding-boost-library-names.patch | 151 --------------------
 .../patches/try-to-guess-boost-library-names.patch | 154 ---------------------
 4 files changed, 1 insertion(+), 308 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 29fc492..7ff4d38 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,7 +1,7 @@
 python-mapnik (1:0.0~20150909-1489d53-1) UNRELEASED; urgency=medium
 
   * New upstream git snapshot.
-  * Add upstream patch for boost library improvements.
+  * Drop patches, included upstream.
 
  -- Bas Couwenberg <sebastic at debian.org>  Sun, 13 Sep 2015 01:21:35 +0200
 
diff --git a/debian/patches/series b/debian/patches/series
deleted file mode 100644
index 6ed5fa8..0000000
--- a/debian/patches/series
+++ /dev/null
@@ -1,2 +0,0 @@
-try-to-guess-boost-library-names.patch
-simpler-pattern-for-finding-boost-library-names.patch
diff --git a/debian/patches/simpler-pattern-for-finding-boost-library-names.patch b/debian/patches/simpler-pattern-for-finding-boost-library-names.patch
deleted file mode 100644
index 0976576..0000000
--- a/debian/patches/simpler-pattern-for-finding-boost-library-names.patch
+++ /dev/null
@@ -1,151 +0,0 @@
-From 85ae4fe9e624b660ea47e7e967ee039080339618 Mon Sep 17 00:00:00 2001
-From: Yohan Boniface <yb at enix.org>
-Date: Wed, 2 Sep 2015 18:07:54 +0200
-Subject: Simpler pattern for finding boost library names
-Origin: https://github.com/yohanboniface/python-mapnik/commit/85ae4fe9e624b660ea47e7e967ee039080339618
-
----
- setup.py | 100 +++++++++++++++++++++++----------------------------------------
- 1 file changed, 36 insertions(+), 64 deletions(-)
-
---- a/setup.py
-+++ b/setup.py
-@@ -2,16 +2,16 @@
- 
- import os
- import os.path
--import platform
- import re
- import shutil
- import subprocess
- import sys
- from distutils import sysconfig
-+from ctypes.util import find_library
- 
- from setuptools import Command, Extension, setup
- 
--PYTHON3 = sys.version_info[0] == 3
-+PYTHON3 = sys.version_info.major == 3
- 
- 
- # Utils
-@@ -30,69 +30,41 @@ def clean_boost_name(name):
-     return name
- 
- 
--def find_boost_library(_dir, _id):
--    if not os.path.exists(_dir):
--        return
--    for name in os.listdir(_dir):
--        if _id in name:
--            # Special case for boost_python, as it could contain python version
--            # number.
--            if "python" in _id:
--                if PYTHON3:
--                    if "3" not in name:
--                        continue
--                else:
--                    if "3" in name:
--                        continue
--            return clean_boost_name(name)
-+def find_boost_library(_id):
-+    suffixes = [
-+        "",  # standard naming
-+        "-mt"  # former naming schema for multithreading build
-+    ]
-+    if "python" in _id:
-+        # Debian naming convention for versions installed in parallel
-+        suffixes.insert(0, "-py%d%d" % (sys.version_info.major,
-+                                        sys.version_info.minor))
-+        # standard suffix for Python3
-+        suffixes.insert(1, sys.version_info.major)
-+    for suf in suffixes:
-+        name = "%s%s" % (_id, suf)
-+        lib = find_library(name)
-+        if lib is not None:
-+            return name
- 
- 
- def get_boost_library_names():
--    # A few examples:
--    # - Ubuntu 15.04 Multiarch or Debian sid:
--    #   /usr/lib/x86_64-linux-gnu/libboost_python.a -> libboost_python-py27.a
--    #   /usr/lib/x86_64-linux-gnu/libboost_python-py27.a
--    #   /usr/lib/x86_64-linux-gnu/libboost_python-py34.a
--    #   /usr/lib/x86_64-linux-gnu/libboost_system.a
--    #   /usr/lib/x86_64-linux-gnu/libboost_thread.a
--    # - Fedora 64 bits:
--    #   /usr/lib64/libboost_python.so
--    #   /usr/lib64/libboost_python3.so
--    #   /usr/lib64/libboost_system.so
--    #   /usr/lib64/libboost_thread.so
--    # - OSX with homebrew
--    #   /usr/local/lib/libboost_thread-mt.a -> ../Cellar/boost/1.57.0/lib/libboost_thread-mt.a  # noqa
--    # - Debian Wheezy
--    #   /usr/lib/libboost_python-py27.so
--    #   /usr/lib/libboost_python-mt-py27.so
--    names = {
--        "boost_python": os.environ.get("BOOST_PYTHON_LIB"),
--        "boost_system": os.environ.get("BOOST_SYSTEM_LIB"),
--        "boost_thread": os.environ.get("BOOST_THREAD_LIB")
--    }
--    if all(names.values()):
--        return names.values()
--    if os.name == 'posix':  # Unix system (Linux, MacOS)
--        libdirs = ['/lib', '/lib64', '/usr/lib', '/usr/lib64']
--        multiarch = sysconfig.get_config_var("MULTIARCH")
--        if multiarch:
--            libdirs.extend(['/lib/%s' % multiarch, '/usr/lib/%s' % multiarch])
--        if platform.system() == "Darwin":
--            libdirs.extend(['/opt/local/lib/'])
--        if os.environ.get('BOOST_ROOT'):
--            libdirs.append(os.environ.get('BOOST_ROOT'))
--        for _dir in libdirs:
--            for key, value in names.items():
--                if not value:
--                    value = find_boost_library(_dir, key)
--                    if value:
--                        names[key] = value
--            if all(names.values()):
--                break
--    for key, value in names.items():
--        if not value:
--            names[key] = key  # Set default.
--    return names.values()
-+    wanted = ['boost_python', 'boost_system', 'boost_thread']
-+    found = []
-+    missing = []
-+    for _id in wanted:
-+        name = os.environ.get("%s_LIB" % _id.upper(), find_boost_library(_id))
-+        if name:
-+            found.append(name)
-+        else:
-+            missing.append(_id)
-+    if missing:
-+        msg = ""
-+        for name in missing:
-+            msg += ("\nMissing {} boost library, try to add its name with "
-+                    "{}_LIB environment var.").format(name, name.upper())
-+        raise EnvironmentError(msg)
-+    return found
- 
- 
- class WhichBoostCommand(Command):
-@@ -106,7 +78,7 @@ class WhichBoostCommand(Command):
-         pass
- 
-     def run(self):
--        print("\n".join(list(get_boost_library_names())))
-+        print("\n".join(get_boost_library_names()))
- 
- 
- cflags = sysconfig.get_config_var('CFLAGS')
-@@ -335,7 +307,7 @@ setup(
-                 'mapnik',
-                 'mapnik-wkt',
-                 'mapnik-json',
--            ] + list(get_boost_library_names()),
-+            ] + get_boost_library_names(),
-             extra_compile_args=extra_comp_args,
-             extra_link_args=linkflags,
-         )
diff --git a/debian/patches/try-to-guess-boost-library-names.patch b/debian/patches/try-to-guess-boost-library-names.patch
deleted file mode 100644
index c66a3a5..0000000
--- a/debian/patches/try-to-guess-boost-library-names.patch
+++ /dev/null
@@ -1,154 +0,0 @@
-From 07c671f70e4fa16607e57510e38edc24559819f8 Mon Sep 17 00:00:00 2001
-From: Yohan Boniface <yb at enix.org>
-Date: Fri, 28 Aug 2015 13:10:51 +0200
-Subject: Try to guess boost library names (fix #12)
-Origin: https://github.com/yohanboniface/python-mapnik/commit/07c671f70e4fa16607e57510e38edc24559819f8
-
----
- setup.py | 101 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-----
- 1 file changed, 93 insertions(+), 8 deletions(-)
-
---- a/setup.py
-+++ b/setup.py
-@@ -1,13 +1,15 @@
- #! /usr/bin/env python
- 
- import os
-+import os.path
-+import platform
- import re
- import shutil
- import subprocess
- import sys
- from distutils import sysconfig
- 
--from setuptools import Extension, setup
-+from setuptools import Command, Extension, setup
- 
- PYTHON3 = sys.version_info[0] == 3
- 
-@@ -21,6 +23,92 @@ def check_output(args):
-     return output.rstrip('\n')
- 
- 
-+def clean_boost_name(name):
-+    name = name.split('.')[0]
-+    if name.startswith('lib'):
-+        name = name[3:]
-+    return name
-+
-+
-+def find_boost_library(_dir, _id):
-+    if not os.path.exists(_dir):
-+        return
-+    for name in os.listdir(_dir):
-+        if _id in name:
-+            # Special case for boost_python, as it could contain python version
-+            # number.
-+            if "python" in _id:
-+                if PYTHON3:
-+                    if "3" not in name:
-+                        continue
-+                else:
-+                    if "3" in name:
-+                        continue
-+            return clean_boost_name(name)
-+
-+
-+def get_boost_library_names():
-+    # A few examples:
-+    # - Ubuntu 15.04 Multiarch or Debian sid:
-+    #   /usr/lib/x86_64-linux-gnu/libboost_python.a -> libboost_python-py27.a
-+    #   /usr/lib/x86_64-linux-gnu/libboost_python-py27.a
-+    #   /usr/lib/x86_64-linux-gnu/libboost_python-py34.a
-+    #   /usr/lib/x86_64-linux-gnu/libboost_system.a
-+    #   /usr/lib/x86_64-linux-gnu/libboost_thread.a
-+    # - Fedora 64 bits:
-+    #   /usr/lib64/libboost_python.so
-+    #   /usr/lib64/libboost_python3.so
-+    #   /usr/lib64/libboost_system.so
-+    #   /usr/lib64/libboost_thread.so
-+    # - OSX with homebrew
-+    #   /usr/local/lib/libboost_thread-mt.a -> ../Cellar/boost/1.57.0/lib/libboost_thread-mt.a  # noqa
-+    # - Debian Wheezy
-+    #   /usr/lib/libboost_python-py27.so
-+    #   /usr/lib/libboost_python-mt-py27.so
-+    names = {
-+        "boost_python": os.environ.get("BOOST_PYTHON_LIB"),
-+        "boost_system": os.environ.get("BOOST_SYSTEM_LIB"),
-+        "boost_thread": os.environ.get("BOOST_THREAD_LIB")
-+    }
-+    if all(names.values()):
-+        return names.values()
-+    if os.name == 'posix':  # Unix system (Linux, MacOS)
-+        libdirs = ['/lib', '/lib64', '/usr/lib', '/usr/lib64']
-+        multiarch = sysconfig.get_config_var("MULTIARCH")
-+        if multiarch:
-+            libdirs.extend(['/lib/%s' % multiarch, '/usr/lib/%s' % multiarch])
-+        if platform.system() == "Darwin":
-+            libdirs.extend(['/opt/local/lib/'])
-+        if os.environ.get('BOOST_ROOT'):
-+            libdirs.append(os.environ.get('BOOST_ROOT'))
-+        for _dir in libdirs:
-+            for key, value in names.items():
-+                if not value:
-+                    value = find_boost_library(_dir, key)
-+                    if value:
-+                        names[key] = value
-+            if all(names.values()):
-+                break
-+    for key, value in names.items():
-+        if not value:
-+            names[key] = key  # Set default.
-+    return names.values()
-+
-+
-+class WhichBoostCommand(Command):
-+    description = 'Output found boost names. Useful for debug.'
-+    user_options = []
-+
-+    def initialize_options(self):
-+        pass
-+
-+    def finalize_options(self):
-+        pass
-+
-+    def run(self):
-+        print("\n".join(list(get_boost_library_names())))
-+
-+
- cflags = sysconfig.get_config_var('CFLAGS')
- sysconfig._config_vars['CFLAGS'] = re.sub(
-     ' +', ' ', cflags.replace('-g', '').replace('-Os', '').replace('-arch i386', ''))
-@@ -48,9 +136,6 @@ else:
-     mapnik_config = 'mapnik-config'
-     mason_build = False
- 
--boost_python_lib = os.environ.get("BOOST_PYTHON_LIB", 'boost_python-mt')
--boost_system_lib = os.environ.get("BOOST_SYSTEM_LIB", 'boost_system-mt')
--boost_thread_lib = os.environ.get("BOOST_THREAD_LIB", 'boost_thread-mt')
- 
- try:
-     linkflags = check_output([mapnik_config, '--libs']).split(' ')
-@@ -204,6 +289,9 @@ setup(
-         'mapnik': ['libmapnik.*', 'plugins/*/*'],
-     },
-     test_suite='nose.collector',
-+    cmdclass={
-+        'whichboost': WhichBoostCommand,
-+    },
-     ext_modules=[
-         Extension('mapnik._mapnik', [
-             'src/mapnik_color.cpp',
-@@ -247,10 +335,7 @@ setup(
-                 'mapnik',
-                 'mapnik-wkt',
-                 'mapnik-json',
--                boost_python_lib,
--                boost_thread_lib,
--                boost_system_lib
--        ],
-+            ] + list(get_boost_library_names()),
-             extra_compile_args=extra_comp_args,
-             extra_link_args=linkflags,
-         )

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-grass/python-mapnik.git



More information about the Pkg-grass-devel mailing list