packages: python3/python3-lib64.patch - removed .orig junk
qboosh
qboosh at pld-linux.org
Sun May 22 17:23:44 CEST 2011
Author: qboosh Date: Sun May 22 15:23:44 2011 GMT
Module: packages Tag: HEAD
---- Log message:
- removed .orig junk
---- Files affected:
packages/python3:
python3-lib64.patch (1.7 -> 1.8)
---- Diffs:
================================================================
Index: packages/python3/python3-lib64.patch
diff -u packages/python3/python3-lib64.patch:1.7 packages/python3/python3-lib64.patch:1.8
--- packages/python3/python3-lib64.patch:1.7 Sat May 21 22:33:52 2011
+++ packages/python3/python3-lib64.patch Sun May 22 17:23:39 2011
@@ -1,5 +1,5 @@
-diff -Nur Python-3.2.orig//configure.in Python-3.2/configure.in
---- Python-3.2.orig//configure.in 2011-02-19 08:58:23.000000000 +0000
+diff -Nur Python-3.2.orig/configure.in Python-3.2/configure.in
+--- Python-3.2.orig/configure.in 2011-02-19 08:58:23.000000000 +0000
+++ Python-3.2/configure.in 2011-05-21 21:16:30.000000000 +0100
@@ -580,6 +580,41 @@
esac;;
@@ -43,8 +43,8 @@
AC_SUBST(LIBRARY)
AC_MSG_CHECKING(LIBRARY)
-diff -Nur Python-3.2.orig//Include/pythonrun.h Python-3.2/Include/pythonrun.h
---- Python-3.2.orig//Include/pythonrun.h 2010-12-27 01:49:31.000000000 +0000
+diff -Nur Python-3.2.orig/Include/pythonrun.h Python-3.2/Include/pythonrun.h
+--- Python-3.2.orig/Include/pythonrun.h 2010-12-27 01:49:31.000000000 +0000
+++ Python-3.2/Include/pythonrun.h 2011-05-21 21:16:30.000000000 +0100
@@ -175,6 +175,8 @@
/* In their own files */
@@ -55,263 +55,8 @@
PyAPI_FUNC(const char *) Py_GetCopyright(void);
PyAPI_FUNC(const char *) Py_GetCompiler(void);
PyAPI_FUNC(const char *) Py_GetBuildInfo(void);
-diff -Nur Python-3.2.orig//Include/pythonrun.h.orig Python-3.2/Include/pythonrun.h.orig
---- Python-3.2.orig//Include/pythonrun.h.orig 1970-01-01 01:00:00.000000000 +0100
-+++ Python-3.2/Include/pythonrun.h.orig 2010-12-27 01:49:31.000000000 +0000
-@@ -0,0 +1,251 @@
-+
-+/* Interfaces to parse and execute pieces of python code */
-+
-+#ifndef Py_PYTHONRUN_H
-+#define Py_PYTHONRUN_H
-+#ifdef __cplusplus
-+extern "C" {
-+#endif
-+
-+#define PyCF_MASK (CO_FUTURE_DIVISION | CO_FUTURE_ABSOLUTE_IMPORT | \
-+ CO_FUTURE_WITH_STATEMENT | CO_FUTURE_PRINT_FUNCTION | \
-+ CO_FUTURE_UNICODE_LITERALS | CO_FUTURE_BARRY_AS_BDFL)
-+#define PyCF_MASK_OBSOLETE (CO_NESTED)
-+#define PyCF_SOURCE_IS_UTF8 0x0100
-+#define PyCF_DONT_IMPLY_DEDENT 0x0200
-+#define PyCF_ONLY_AST 0x0400
-+#define PyCF_IGNORE_COOKIE 0x0800
-+
-+#ifndef Py_LIMITED_API
-+typedef struct {
-+ int cf_flags; /* bitmask of CO_xxx flags relevant to future */
-+} PyCompilerFlags;
-+#endif
-+
-+PyAPI_FUNC(void) Py_SetProgramName(wchar_t *);
-+PyAPI_FUNC(wchar_t *) Py_GetProgramName(void);
-+
-+PyAPI_FUNC(void) Py_SetPythonHome(wchar_t *);
-+PyAPI_FUNC(wchar_t *) Py_GetPythonHome(void);
-+
-+PyAPI_FUNC(void) Py_Initialize(void);
-+PyAPI_FUNC(void) Py_InitializeEx(int);
-+PyAPI_FUNC(void) Py_Finalize(void);
-+PyAPI_FUNC(int) Py_IsInitialized(void);
-+PyAPI_FUNC(PyThreadState *) Py_NewInterpreter(void);
-+PyAPI_FUNC(void) Py_EndInterpreter(PyThreadState *);
-+
-+#ifndef Py_LIMITED_API
-+PyAPI_FUNC(int) PyRun_SimpleStringFlags(const char *, PyCompilerFlags *);
-+PyAPI_FUNC(int) PyRun_AnyFileFlags(FILE *, const char *, PyCompilerFlags *);
-+PyAPI_FUNC(int) PyRun_AnyFileExFlags(
-+ FILE *fp,
-+ const char *filename, /* decoded from the filesystem encoding */
-+ int closeit,
-+ PyCompilerFlags *flags);
-+PyAPI_FUNC(int) PyRun_SimpleFileExFlags(
-+ FILE *fp,
-+ const char *filename, /* decoded from the filesystem encoding */
-+ int closeit,
-+ PyCompilerFlags *flags);
-+PyAPI_FUNC(int) PyRun_InteractiveOneFlags(
-+ FILE *fp,
-+ const char *filename, /* decoded from the filesystem encoding */
-+ PyCompilerFlags *flags);
-+PyAPI_FUNC(int) PyRun_InteractiveLoopFlags(
-+ FILE *fp,
-+ const char *filename, /* decoded from the filesystem encoding */
-+ PyCompilerFlags *flags);
-+
-+PyAPI_FUNC(struct _mod *) PyParser_ASTFromString(
-+ const char *s,
-+ const char *filename, /* decoded from the filesystem encoding */
-+ int start,
-+ PyCompilerFlags *flags,
-+ PyArena *arena);
-+PyAPI_FUNC(struct _mod *) PyParser_ASTFromFile(
-+ FILE *fp,
-+ const char *filename, /* decoded from the filesystem encoding */
-+ const char* enc,
-+ int start,
-+ char *ps1,
-+ char *ps2,
-+ PyCompilerFlags *flags,
-+ int *errcode,
-+ PyArena *arena);
-+#endif
-+
-+#ifndef PyParser_SimpleParseString
-+#define PyParser_SimpleParseString(S, B) \
-+ PyParser_SimpleParseStringFlags(S, B, 0)
-+#define PyParser_SimpleParseFile(FP, S, B) \
-+ PyParser_SimpleParseFileFlags(FP, S, B, 0)
-+#endif
-+PyAPI_FUNC(struct _node *) PyParser_SimpleParseStringFlags(const char *, int,
-+ int);
-+PyAPI_FUNC(struct _node *) PyParser_SimpleParseFileFlags(FILE *, const char *,
-+ int, int);
-+
-+#ifndef Py_LIMITED_API
-+PyAPI_FUNC(PyObject *) PyRun_StringFlags(const char *, int, PyObject *,
-+ PyObject *, PyCompilerFlags *);
-+
-+PyAPI_FUNC(PyObject *) PyRun_FileExFlags(
-+ FILE *fp,
-+ const char *filename, /* decoded from the filesystem encoding */
-+ int start,
-+ PyObject *globals,
-+ PyObject *locals,
-+ int closeit,
-+ PyCompilerFlags *flags);
-+#endif
-+
-+#ifdef Py_LIMITED_API
-+PyAPI_FUNC(PyObject *) Py_CompileString(const char *, const char *, int);
-+#else
-+#define Py_CompileString(str, p, s) Py_CompileStringExFlags(str, p, s, NULL, -1)
-+#define Py_CompileStringFlags(str, p, s, f) Py_CompileStringExFlags(str, p, s, f, -1)
-+PyAPI_FUNC(PyObject *) Py_CompileStringExFlags(
-+ const char *str,
-+ const char *filename, /* decoded from the filesystem encoding */
-+ int start,
-+ PyCompilerFlags *flags,
-+ int optimize);
-+#endif
-+PyAPI_FUNC(struct symtable *) Py_SymtableString(
-+ const char *str,
-+ const char *filename, /* decoded from the filesystem encoding */
-+ int start);
-+
-+PyAPI_FUNC(void) PyErr_Print(void);
-+PyAPI_FUNC(void) PyErr_PrintEx(int);
-+PyAPI_FUNC(void) PyErr_Display(PyObject *, PyObject *, PyObject *);
-+
-+/* Py_PyAtExit is for the atexit module, Py_AtExit is for low-level
-+ * exit functions.
-+ */
-+#ifndef Py_LIMITED_API
-+PyAPI_FUNC(void) _Py_PyAtExit(void (*func)(void));
-+#endif
-+PyAPI_FUNC(int) Py_AtExit(void (*func)(void));
-+
-+PyAPI_FUNC(void) Py_Exit(int);
-+
-+/* Restore signals that the interpreter has called SIG_IGN on to SIG_DFL. */
-+#ifndef Py_LIMITED_API
-+PyAPI_FUNC(void) _Py_RestoreSignals(void);
-+
-+PyAPI_FUNC(int) Py_FdIsInteractive(FILE *, const char *);
-+#endif
-+
-+/* Bootstrap */
-+PyAPI_FUNC(int) Py_Main(int argc, wchar_t **argv);
-+
-+#ifndef Py_LIMITED_API
-+/* Use macros for a bunch of old variants */
-+#define PyRun_String(str, s, g, l) PyRun_StringFlags(str, s, g, l, NULL)
-+#define PyRun_AnyFile(fp, name) PyRun_AnyFileExFlags(fp, name, 0, NULL)
-+#define PyRun_AnyFileEx(fp, name, closeit) \
-+ PyRun_AnyFileExFlags(fp, name, closeit, NULL)
-+#define PyRun_AnyFileFlags(fp, name, flags) \
-+ PyRun_AnyFileExFlags(fp, name, 0, flags)
-+#define PyRun_SimpleString(s) PyRun_SimpleStringFlags(s, NULL)
-+#define PyRun_SimpleFile(f, p) PyRun_SimpleFileExFlags(f, p, 0, NULL)
-+#define PyRun_SimpleFileEx(f, p, c) PyRun_SimpleFileExFlags(f, p, c, NULL)
-+#define PyRun_InteractiveOne(f, p) PyRun_InteractiveOneFlags(f, p, NULL)
-+#define PyRun_InteractiveLoop(f, p) PyRun_InteractiveLoopFlags(f, p, NULL)
-+#define PyRun_File(fp, p, s, g, l) \
-+ PyRun_FileExFlags(fp, p, s, g, l, 0, NULL)
-+#define PyRun_FileEx(fp, p, s, g, l, c) \
-+ PyRun_FileExFlags(fp, p, s, g, l, c, NULL)
-+#define PyRun_FileFlags(fp, p, s, g, l, flags) \
-+ PyRun_FileExFlags(fp, p, s, g, l, 0, flags)
-+#endif
-+
-+/* In getpath.c */
-+PyAPI_FUNC(wchar_t *) Py_GetProgramFullPath(void);
-+PyAPI_FUNC(wchar_t *) Py_GetPrefix(void);
-+PyAPI_FUNC(wchar_t *) Py_GetExecPrefix(void);
-+PyAPI_FUNC(wchar_t *) Py_GetPath(void);
-+PyAPI_FUNC(void) Py_SetPath(const wchar_t *);
-+#ifdef MS_WINDOWS
-+int _Py_CheckPython3();
-+#endif
-+
-+/* In their own files */
-+PyAPI_FUNC(const char *) Py_GetVersion(void);
-+PyAPI_FUNC(const char *) Py_GetPlatform(void);
-+PyAPI_FUNC(const char *) Py_GetCopyright(void);
-+PyAPI_FUNC(const char *) Py_GetCompiler(void);
-+PyAPI_FUNC(const char *) Py_GetBuildInfo(void);
-+#ifndef Py_LIMITED_API
-+PyAPI_FUNC(const char *) _Py_svnversion(void);
-+PyAPI_FUNC(const char *) Py_SubversionRevision(void);
-+PyAPI_FUNC(const char *) Py_SubversionShortBranch(void);
-+#endif
-+
-+/* Internal -- various one-time initializations */
-+#ifndef Py_LIMITED_API
-+PyAPI_FUNC(PyObject *) _PyBuiltin_Init(void);
-+PyAPI_FUNC(PyObject *) _PySys_Init(void);
-+PyAPI_FUNC(void) _PyImport_Init(void);
-+PyAPI_FUNC(void) _PyExc_Init(void);
-+PyAPI_FUNC(void) _PyImportHooks_Init(void);
-+PyAPI_FUNC(int) _PyFrame_Init(void);
-+PyAPI_FUNC(void) _PyFloat_Init(void);
-+PyAPI_FUNC(int) PyByteArray_Init(void);
-+#endif
-+
-+/* Various internal finalizers */
-+#ifndef Py_LIMITED_API
-+PyAPI_FUNC(void) _PyExc_Fini(void);
-+PyAPI_FUNC(void) _PyImport_Fini(void);
-+PyAPI_FUNC(void) PyMethod_Fini(void);
-+PyAPI_FUNC(void) PyFrame_Fini(void);
-+PyAPI_FUNC(void) PyCFunction_Fini(void);
-+PyAPI_FUNC(void) PyDict_Fini(void);
-+PyAPI_FUNC(void) PyTuple_Fini(void);
-+PyAPI_FUNC(void) PyList_Fini(void);
-+PyAPI_FUNC(void) PySet_Fini(void);
-+PyAPI_FUNC(void) PyBytes_Fini(void);
-+PyAPI_FUNC(void) PyByteArray_Fini(void);
-+PyAPI_FUNC(void) PyFloat_Fini(void);
-+PyAPI_FUNC(void) PyOS_FiniInterrupts(void);
-+PyAPI_FUNC(void) _PyGC_Fini(void);
-+#endif
-+
-+/* Stuff with no proper home (yet) */
-+#ifndef Py_LIMITED_API
-+PyAPI_FUNC(char *) PyOS_Readline(FILE *, FILE *, char *);
-+#endif
-+PyAPI_DATA(int) (*PyOS_InputHook)(void);
-+PyAPI_DATA(char) *(*PyOS_ReadlineFunctionPointer)(FILE *, FILE *, char *);
-+#ifndef Py_LIMITED_API
-+PyAPI_DATA(PyThreadState*) _PyOS_ReadlineTState;
-+#endif
-+
-+/* Stack size, in "pointers" (so we get extra safety margins
-+ on 64-bit platforms). On a 32-bit platform, this translates
-+ to a 8k margin. */
-+#define PYOS_STACK_MARGIN 2048
-+
-+#if defined(WIN32) && !defined(MS_WIN64) && defined(_MSC_VER) && _MSC_VER >= 1300
-+/* Enable stack checking under Microsoft C */
-+#define USE_STACKCHECK
-+#endif
-+
-+#ifdef USE_STACKCHECK
-+/* Check that we aren't overflowing our stack */
-+PyAPI_FUNC(int) PyOS_CheckStack(void);
-+#endif
-+
-+/* Signals */
-+typedef void (*PyOS_sighandler_t)(int);
-+PyAPI_FUNC(PyOS_sighandler_t) PyOS_getsig(int);
-+PyAPI_FUNC(PyOS_sighandler_t) PyOS_setsig(int, PyOS_sighandler_t);
-+
-+
-+#ifdef __cplusplus
-+}
-+#endif
-+#endif /* !Py_PYTHONRUN_H */
-diff -Nur Python-3.2.orig//Lib/distutils/command/install.py Python-3.2/Lib/distutils/command/install.py
---- Python-3.2.orig//Lib/distutils/command/install.py 2010-11-25 03:46:44.000000000 +0000
+diff -Nur Python-3.2.orig/Lib/distutils/command/install.py Python-3.2/Lib/distutils/command/install.py
+--- Python-3.2.orig/Lib/distutils/command/install.py 2010-11-25 03:46:44.000000000 +0000
+++ Python-3.2/Lib/distutils/command/install.py 2011-05-21 21:16:30.000000000 +0100
@@ -27,6 +27,8 @@
from site import USER_SITE
@@ -339,8 +84,8 @@
'headers': '$base/include/python/$dist_name',
'scripts': '$base/bin',
'data' : '$base',
-diff -Nur Python-3.2.orig//Lib/distutils/sysconfig.py Python-3.2/Lib/distutils/sysconfig.py
---- Python-3.2.orig//Lib/distutils/sysconfig.py 2010-11-24 19:43:47.000000000 +0000
+diff -Nur Python-3.2.orig/Lib/distutils/sysconfig.py Python-3.2/Lib/distutils/sysconfig.py
+--- Python-3.2.orig/Lib/distutils/sysconfig.py 2010-11-24 19:43:47.000000000 +0000
+++ Python-3.2/Lib/distutils/sysconfig.py 2011-05-21 21:16:30.000000000 +0100
@@ -124,8 +124,12 @@
prefix = plat_specific and EXEC_PREFIX or PREFIX
@@ -356,595 +101,8 @@
if standard_lib:
return libpython
else:
-diff -Nur Python-3.2.orig//Lib/distutils/sysconfig.py.orig Python-3.2/Lib/distutils/sysconfig.py.orig
---- Python-3.2.orig//Lib/distutils/sysconfig.py.orig 1970-01-01 01:00:00.000000000 +0100
-+++ Python-3.2/Lib/distutils/sysconfig.py.orig 2010-11-24 19:43:47.000000000 +0000
-@@ -0,0 +1,583 @@
-+"""Provide access to Python's configuration information. The specific
-+configuration variables available depend heavily on the platform and
-+configuration. The values may be retrieved using
-+get_config_var(name), and the list of variables is available via
-+get_config_vars().keys(). Additional convenience functions are also
-+available.
-+
-+Written by: Fred L. Drake, Jr.
-+Email: <fdrake at acm.org>
-+"""
-+
-+__revision__ = "$Id$"
-+
-+import os
-+import re
-+import sys
-+
-+from .errors import DistutilsPlatformError
-+
-+# These are needed in a couple of spots, so just compute them once.
-+PREFIX = os.path.normpath(sys.prefix)
-+EXEC_PREFIX = os.path.normpath(sys.exec_prefix)
-+
-+# Path to the base directory of the project. On Windows the binary may
-+# live in project/PCBuild9. If we're dealing with an x64 Windows build,
-+# it'll live in project/PCbuild/amd64.
-+project_base = os.path.dirname(os.path.abspath(sys.executable))
-+if os.name == "nt" and "pcbuild" in project_base[-8:].lower():
-+ project_base = os.path.abspath(os.path.join(project_base, os.path.pardir))
-+# PC/VS7.1
-+if os.name == "nt" and "\\pc\\v" in project_base[-10:].lower():
-+ project_base = os.path.abspath(os.path.join(project_base, os.path.pardir,
-+ os.path.pardir))
-+# PC/AMD64
-+if os.name == "nt" and "\\pcbuild\\amd64" in project_base[-14:].lower():
-+ project_base = os.path.abspath(os.path.join(project_base, os.path.pardir,
-+ os.path.pardir))
-+
-+# python_build: (Boolean) if true, we're either building Python or
-+# building an extension with an un-installed Python, so we use
-+# different (hard-wired) directories.
-+# Setup.local is available for Makefile builds including VPATH builds,
-+# Setup.dist is available on Windows
-+def _python_build():
-+ for fn in ("Setup.dist", "Setup.local"):
-+ if os.path.isfile(os.path.join(project_base, "Modules", fn)):
-+ return True
-+ return False
-+python_build = _python_build()
-+
-+# Calculate the build qualifier flags if they are defined. Adding the flags
-+# to the include and lib directories only makes sense for an installation, not
-+# an in-source build.
-+build_flags = ''
-+try:
-+ if not python_build:
-+ build_flags = sys.abiflags
-+except AttributeError:
-+ # It's not a configure-based build, so the sys module doesn't have
-+ # this attribute, which is fine.
-+ pass
-+
-+def get_python_version():
-+ """Return a string containing the major and minor Python version,
-+ leaving off the patchlevel. Sample return values could be '1.5'
-+ or '2.2'.
-+ """
-+ return sys.version[:3]
-+
-+
-+def get_python_inc(plat_specific=0, prefix=None):
-+ """Return the directory containing installed Python header files.
-+
-+ If 'plat_specific' is false (the default), this is the path to the
-+ non-platform-specific header files, i.e. Python.h and so on;
-+ otherwise, this is the path to platform-specific header files
-+ (namely pyconfig.h).
-+
-+ If 'prefix' is supplied, use it instead of sys.prefix or
-+ sys.exec_prefix -- i.e., ignore 'plat_specific'.
-+ """
-+ if prefix is None:
-+ prefix = plat_specific and EXEC_PREFIX or PREFIX
-+ if os.name == "posix":
-+ if python_build:
-+ # Assume the executable is in the build directory. The
-+ # pyconfig.h file should be in the same directory. Since
-+ # the build directory may not be the source directory, we
-+ # must use "srcdir" from the makefile to find the "Include"
-+ # directory.
-+ base = os.path.dirname(os.path.abspath(sys.executable))
-+ if plat_specific:
-+ return base
-+ else:
-+ incdir = os.path.join(get_config_var('srcdir'), 'Include')
-+ return os.path.normpath(incdir)
-+ python_dir = 'python' + get_python_version() + build_flags
-+ return os.path.join(prefix, "include", python_dir)
-+ elif os.name == "nt":
-+ return os.path.join(prefix, "include")
-+ elif os.name == "os2":
-+ return os.path.join(prefix, "Include")
-+ else:
-+ raise DistutilsPlatformError(
-+ "I don't know where Python installs its C header files "
-+ "on platform '%s'" % os.name)
-+
-+
-+def get_python_lib(plat_specific=0, standard_lib=0, prefix=None):
-+ """Return the directory containing the Python library (standard or
-+ site additions).
-+
-+ If 'plat_specific' is true, return the directory containing
-+ platform-specific modules, i.e. any module from a non-pure-Python
-+ module distribution; otherwise, return the platform-shared library
-+ directory. If 'standard_lib' is true, return the directory
-+ containing standard Python library modules; otherwise, return the
-+ directory for site-specific modules.
-+
-+ If 'prefix' is supplied, use it instead of sys.prefix or
-+ sys.exec_prefix -- i.e., ignore 'plat_specific'.
-+ """
-+ if prefix is None:
-+ prefix = plat_specific and EXEC_PREFIX or PREFIX
-+
-+ if os.name == "posix":
-+ libpython = os.path.join(prefix,
-+ "lib", "python" + get_python_version())
-+ if standard_lib:
-+ return libpython
-+ else:
-+ return os.path.join(libpython, "site-packages")
-+ elif os.name == "nt":
-+ if standard_lib:
-+ return os.path.join(prefix, "Lib")
-+ else:
-+ if get_python_version() < "2.2":
-+ return prefix
-+ else:
-+ return os.path.join(prefix, "Lib", "site-packages")
-+ elif os.name == "os2":
-+ if standard_lib:
-+ return os.path.join(prefix, "Lib")
-+ else:
-+ return os.path.join(prefix, "Lib", "site-packages")
-+ else:
-+ raise DistutilsPlatformError(
-+ "I don't know where Python installs its library "
-+ "on platform '%s'" % os.name)
-+
-+
-+def customize_compiler(compiler):
-+ """Do any platform-specific customization of a CCompiler instance.
-+
-+ Mainly needed on Unix, so we can plug in the information that
-+ varies across Unices and is stored in Python's Makefile.
-+ """
-+ if compiler.compiler_type == "unix":
-+ (cc, cxx, opt, cflags, ccshared, ldshared, so_ext, ar, ar_flags) = \
-+ get_config_vars('CC', 'CXX', 'OPT', 'CFLAGS',
-+ 'CCSHARED', 'LDSHARED', 'SO', 'AR', 'ARFLAGS')
-+
-+ if 'CC' in os.environ:
-+ cc = os.environ['CC']
-+ if 'CXX' in os.environ:
-+ cxx = os.environ['CXX']
-+ if 'LDSHARED' in os.environ:
-+ ldshared = os.environ['LDSHARED']
-+ if 'CPP' in os.environ:
-+ cpp = os.environ['CPP']
-+ else:
-+ cpp = cc + " -E" # not always
-+ if 'LDFLAGS' in os.environ:
-+ ldshared = ldshared + ' ' + os.environ['LDFLAGS']
-+ if 'CFLAGS' in os.environ:
-+ cflags = opt + ' ' + os.environ['CFLAGS']
-+ ldshared = ldshared + ' ' + os.environ['CFLAGS']
-+ if 'CPPFLAGS' in os.environ:
-+ cpp = cpp + ' ' + os.environ['CPPFLAGS']
-+ cflags = cflags + ' ' + os.environ['CPPFLAGS']
-+ ldshared = ldshared + ' ' + os.environ['CPPFLAGS']
-+ if 'AR' in os.environ:
-+ ar = os.environ['AR']
-+ if 'ARFLAGS' in os.environ:
-+ archiver = ar + ' ' + os.environ['ARFLAGS']
-+ else:
-+ archiver = ar + ' ' + ar_flags
-+
-+ cc_cmd = cc + ' ' + cflags
-+ compiler.set_executables(
-+ preprocessor=cpp,
-+ compiler=cc_cmd,
-+ compiler_so=cc_cmd + ' ' + ccshared,
-+ compiler_cxx=cxx,
-+ linker_so=ldshared,
-+ linker_exe=cc,
-+ archiver=archiver)
-+
-+ compiler.shared_lib_extension = so_ext
-+
-+
-+def get_config_h_filename():
-+ """Return full pathname of installed pyconfig.h file."""
-+ if python_build:
-+ if os.name == "nt":
-+ inc_dir = os.path.join(project_base, "PC")
-+ else:
-+ inc_dir = project_base
-+ else:
-+ inc_dir = get_python_inc(plat_specific=1)
-+ if get_python_version() < '2.2':
-+ config_h = 'config.h'
-+ else:
-+ # The name of the config.h file changed in 2.2
-+ config_h = 'pyconfig.h'
-+ return os.path.join(inc_dir, config_h)
-+
-+
-+def get_makefile_filename():
-+ """Return full pathname of installed Makefile from the Python build."""
-+ if python_build:
-+ return os.path.join(os.path.dirname(sys.executable), "Makefile")
-+ lib_dir = get_python_lib(plat_specific=1, standard_lib=1)
-+ config_file = 'config-{}{}'.format(get_python_version(), build_flags)
-+ return os.path.join(lib_dir, config_file, 'Makefile')
-+
-+
-+def parse_config_h(fp, g=None):
-+ """Parse a config.h-style file.
-+
-+ A dictionary containing name/value pairs is returned. If an
-+ optional dictionary is passed in as the second argument, it is
-+ used instead of a new dictionary.
-+ """
-+ if g is None:
-+ g = {}
-+ define_rx = re.compile("#define ([A-Z][A-Za-z0-9_]+) (.*)\n")
-+ undef_rx = re.compile("/[*] #undef ([A-Z][A-Za-z0-9_]+) [*]/\n")
-+ #
-+ while True:
-+ line = fp.readline()
-+ if not line:
-+ break
-+ m = define_rx.match(line)
-+ if m:
-+ n, v = m.group(1, 2)
-+ try: v = int(v)
-+ except ValueError: pass
-+ g[n] = v
-+ else:
-+ m = undef_rx.match(line)
-+ if m:
-+ g[m.group(1)] = 0
-+ return g
-+
-+
-+# Regexes needed for parsing Makefile (and similar syntaxes,
-+# like old-style Setup files).
-+_variable_rx = re.compile("([a-zA-Z][a-zA-Z0-9_]+)\s*=\s*(.*)")
-+_findvar1_rx = re.compile(r"\$\(([A-Za-z][A-Za-z0-9_]*)\)")
-+_findvar2_rx = re.compile(r"\${([A-Za-z][A-Za-z0-9_]*)}")
-+
-+def parse_makefile(fn, g=None):
-+ """Parse a Makefile-style file.
-+
-+ A dictionary containing name/value pairs is returned. If an
-+ optional dictionary is passed in as the second argument, it is
-+ used instead of a new dictionary.
-+ """
-+ from distutils.text_file import TextFile
-+ fp = TextFile(fn, strip_comments=1, skip_blanks=1, join_lines=1, errors="surrogateescape")
-+
-+ if g is None:
-+ g = {}
-+ done = {}
-+ notdone = {}
-+
-+ while True:
-+ line = fp.readline()
-+ if line is None: # eof
-+ break
-+ m = _variable_rx.match(line)
-+ if m:
-+ n, v = m.group(1, 2)
-+ v = v.strip()
-+ # `$$' is a literal `$' in make
-+ tmpv = v.replace('$$', '')
-+
<<Diff was trimmed, longer than 597 lines>>
---- CVS-web:
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/python3/python3-lib64.patch?r1=1.7&r2=1.8&f=u
More information about the pld-cvs-commit
mailing list