[Python-modules-commits] r14369 - in packages/tagpy/trunk/debian/patches (1 file)
nijel at users.alioth.debian.org
nijel at users.alioth.debian.org
Fri Sep 3 13:26:44 UTC 2010
Date: Friday, September 3, 2010 @ 13:26:40
Author: nijel
Revision: 14369
Port patch.
Modified:
packages/tagpy/trunk/debian/patches/optional-siteconf.patch
Modified: packages/tagpy/trunk/debian/patches/optional-siteconf.patch
===================================================================
--- packages/tagpy/trunk/debian/patches/optional-siteconf.patch 2010-09-03 13:23:33 UTC (rev 14368)
+++ packages/tagpy/trunk/debian/patches/optional-siteconf.patch 2010-09-03 13:26:40 UTC (rev 14369)
@@ -2,23 +2,155 @@
This is needed to properly build for more python versions.
--- a/aksetup_helper.py
+++ b/aksetup_helper.py
-@@ -1,5 +1,10 @@
- # dealings with ez_setup ------------------------------------------------------
- import ez_setup
+@@ -5,6 +5,12 @@
+ import setuptools
+ from setuptools import Extension
+
+import os
+try:
+ DEFAULT_SITECONF = os.environ['SITECONF_NAME']
+except KeyError:
+ DEFAULT_SITECONF = 'siteconf.py'
++
+ if 'distribute' not in setuptools.__file__:
+ print "-------------------------------------------------------------------------"
+ print "Setuptools conflict detected."
+@@ -49,7 +55,7 @@
- ez_setup.use_setuptools()
-@@ -223,7 +228,7 @@
+ class NumpyExtension(Extension):
+- # nicked from
++ # nicked from
+ # http://mail.python.org/pipermail/distutils-sig/2007-September/008253.html
+ # solution by Michael Hoffmann
+ def __init__(self, *args, **kwargs):
+@@ -109,7 +115,7 @@
+ # tools -----------------------------------------------------------------------
+ def flatten(list):
+- """For an iterable of sub-iterables, generate each member of each
++ """For an iterable of sub-iterables, generate each member of each
+ sub-iterable in turn, i.e. a flattened version of that super-iterable.
+ Example: Turn [[a,b,c],[d,e,f]] into [a,b,c,d,e,f].
+@@ -249,7 +255,7 @@
+
+
class ConfigSchema:
- def __init__(self, options, conf_file="siteconf.py", conf_dir="."):
+ def __init__(self, options, conf_file=DEFAULT_SITECONF, conf_dir="."):
self.optdict = dict((opt.name, opt) for opt in options)
self.options = options
self.conf_dir = conf_dir
+@@ -272,9 +278,9 @@
+ self.conf_dir = conf_dir
+
+ def get_default_config(self):
+- return dict((opt.name, opt.default)
++ return dict((opt.name, opt.default)
+ for opt in self.options)
+-
++
+ def read_config_from_pyfile(self, filename):
+ result = {}
+ filevars = {}
+@@ -322,7 +328,7 @@
+ result = self.get_default_config()
+
+ import os
+-
++
+ confignames = []
+ if self.global_conf_file is not None:
+ confignames.append(self.global_conf_file)
+@@ -425,13 +431,13 @@
+ return result
+
+ def value_to_str(self, default):
+- return default
++ return default
+
+ def add_to_configparser(self, parser, default=None):
+ default = default_or(default, self.default)
+ default_str = self.value_to_str(default)
+ parser.add_option(
+- "--" + self.as_option(), dest=self.name,
++ "--" + self.as_option(), dest=self.name,
+ default=default_str,
+ metavar=self.metavar(), help=self.get_help(default))
+
+@@ -452,11 +458,11 @@
+ action = "store_false"
+ else:
+ action = "store_true"
+-
++
+ parser.add_option(
+- "--" + self.as_option(),
+- dest=self.name,
+- help=self.get_help(default),
++ "--" + self.as_option(),
++ dest=self.name,
++ help=self.get_help(default),
+ default=default,
+ action=action)
+
+@@ -484,7 +490,7 @@
+ class IncludeDir(StringListOption):
+ def __init__(self, lib_name, default=None, human_name=None, help=None):
+ StringListOption.__init__(self, "%s_INC_DIR" % lib_name, default,
+- help=help or ("Include directories for %s"
++ help=help or ("Include directories for %s"
+ % (human_name or humanize(lib_name))))
+
+ class LibraryDir(StringListOption):
+@@ -496,14 +502,14 @@
+ class Libraries(StringListOption):
+ def __init__(self, lib_name, default=None, human_name=None, help=None):
+ StringListOption.__init__(self, "%s_LIBNAME" % lib_name, default,
+- help=help or ("Library names for %s (without lib or .so)"
++ help=help or ("Library names for %s (without lib or .so)"
+ % (human_name or humanize(lib_name))))
+
+ class BoostLibraries(Libraries):
+ def __init__(self, lib_base_name):
+- Libraries.__init__(self, "BOOST_%s" % lib_base_name.upper(),
++ Libraries.__init__(self, "BOOST_%s" % lib_base_name.upper(),
+ ["boost_%s-${BOOST_COMPILER}-mt" % lib_base_name],
+- help="Library names for Boost C++ %s library (without lib or .so)"
++ help="Library names for Boost C++ %s library (without lib or .so)"
+ % humanize(lib_base_name))
+
+ def set_up_shipped_boost_if_requested(conf):
+@@ -567,7 +573,7 @@
+ source_files += glob(
+ "bpl-subset/bpl_subset/libs/thread/src/pthread/*.cpp")
+
+- return (source_files,
++ return (source_files,
+ {"BOOST_MULTI_INDEX_DISABLE_SERIALIZATION": 1}
+ )
+ else:
+@@ -578,7 +584,7 @@
+ return [
+ IncludeDir("BOOST", []),
+ LibraryDir("BOOST", []),
+- Option("BOOST_COMPILER", default="gcc43",
++ Option("BOOST_COMPILER", default="gcc43",
+ help="The compiler with which Boost C++ was compiled, e.g. gcc43"),
+ ]
+
+@@ -613,10 +619,10 @@
+ help="Ignored")
+ parser.add_option("--enable-shared", help="Ignored", action="store_false")
+ parser.add_option("--disable-static", help="Ignored", action="store_false")
+- parser.add_option("--update-user", help="Update user config file (%s)" % schema.user_conf_file,
++ parser.add_option("--update-user", help="Update user config file (%s)" % schema.user_conf_file,
+ action="store_true")
+- parser.add_option("--update-global",
+- help="Update global config file (%s)" % schema.global_conf_file,
++ parser.add_option("--update-global",
++ help="Update global config file (%s)" % schema.global_conf_file,
+ action="store_true")
+
+ schema.add_to_configparser(parser, schema.read_config())
More information about the Python-modules-commits
mailing list