mirror of
https://github.com/beard7n/bsdports.git
synced 2026-04-13 20:11:19 +02:00
create bsd12 branch
This commit is contained in:
95
lang/python27/files/__patch-x-setup.py
Normal file
95
lang/python27/files/__patch-x-setup.py
Normal file
@@ -0,0 +1,95 @@
|
||||
--- ./setup.py.orig 2018-04-30 00:47:33.000000000 +0200
|
||||
+++ ./setup.py 2019-01-26 09:01:45.802242000 +0200
|
||||
@@ -15,6 +15,7 @@
|
||||
from distutils.command.build_ext import build_ext
|
||||
from distutils.command.install import install
|
||||
from distutils.command.install_lib import install_lib
|
||||
+from distutils.command.build_scripts import build_scripts
|
||||
from distutils.spawn import find_executable
|
||||
|
||||
cross_compiling = "_PYTHON_HOST_PLATFORM" in os.environ
|
||||
@@ -33,7 +34,7 @@
|
||||
COMPILED_WITH_PYDEBUG = ('--with-pydebug' in sysconfig.get_config_var("CONFIG_ARGS"))
|
||||
|
||||
# This global variable is used to hold the list of modules to be disabled.
|
||||
-disabled_module_list = []
|
||||
+disabled_module_list = ["_bsddb", "_tkinter", "gdbm", "mpz", "nis"]
|
||||
|
||||
def add_dir_to_list(dirlist, dir):
|
||||
"""Add the directory 'dir' to the list 'dirlist' (at the front) if
|
||||
@@ -1234,7 +1235,7 @@
|
||||
sysroot = macosx_sdk_root()
|
||||
f = os.path.join(sysroot, f[1:])
|
||||
|
||||
- if os.path.exists(f) and not db_incs:
|
||||
+ if os.path.exists(f):
|
||||
data = open(f).read()
|
||||
m = re.search(r"#s*define\s+HASHVERSION\s+2\s*", data)
|
||||
if m is not None:
|
||||
@@ -1568,7 +1569,7 @@
|
||||
macros = dict()
|
||||
libraries = []
|
||||
|
||||
- elif host_platform in ('freebsd4', 'freebsd5', 'freebsd6', 'freebsd7', 'freebsd8'):
|
||||
+ elif host_platform in ('freebsd4', 'freebsd5', 'freebsd6', 'freebsd7', 'freebsd8', 'freebsd9', 'freebsd10', 'freebsd11'):
|
||||
# FreeBSD's P1003.1b semaphore support is very experimental
|
||||
# and has many known problems. (as of June 2008)
|
||||
macros = dict()
|
||||
@@ -1619,9 +1620,10 @@
|
||||
else:
|
||||
missing.append('linuxaudiodev')
|
||||
|
||||
- if (host_platform in ('linux2', 'freebsd4', 'freebsd5', 'freebsd6',
|
||||
- 'freebsd7', 'freebsd8')
|
||||
- or host_platform.startswith("gnukfreebsd")):
|
||||
+# Initial backport of http://hg.python.org/cpython/rev/50f1922bc1d5
|
||||
+
|
||||
+ if any(sys.platform.startswith(prefix)
|
||||
+ for prefix in ("linux", "freebsd", "gnukfreebsd")):
|
||||
exts.append( Extension('ossaudiodev', ['ossaudiodev.c']) )
|
||||
else:
|
||||
missing.append('ossaudiodev')
|
||||
@@ -2244,6 +2246,22 @@
|
||||
def is_chmod_supported(self):
|
||||
return hasattr(os, 'chmod')
|
||||
|
||||
+class PyBuildScripts(build_scripts):
|
||||
+ def copy_scripts(self):
|
||||
+ outfiles = build_scripts.copy_scripts(self)
|
||||
+ fullversion = '{0[0]}.{0[1]}'.format(sys.version_info)
|
||||
+ newoutfiles = []
|
||||
+ for filename in outfiles:
|
||||
+ if filename.endswith('2to3'):
|
||||
+ newfilename = filename + '-' + fullversion
|
||||
+ else:
|
||||
+ newfilename = filename + fullversion
|
||||
+ log.info('renaming {} to {}'.format(filename, newfilename))
|
||||
+ os.rename(filename, newfilename)
|
||||
+ newoutfiles.append(newfilename)
|
||||
+ return newoutfiles
|
||||
+
|
||||
+
|
||||
SUMMARY = """
|
||||
Python is an interpreted, interactive, object-oriented programming
|
||||
language. It is often compared to Tcl, Perl, Scheme or Java.
|
||||
@@ -2289,7 +2307,9 @@
|
||||
platforms = ["Many"],
|
||||
|
||||
# Build info
|
||||
- cmdclass = {'build_ext':PyBuildExt, 'install':PyBuildInstall,
|
||||
+ cmdclass = {'build_ext':PyBuildExt,
|
||||
+ 'build_scripts':PyBuildScripts,
|
||||
+ 'install':PyBuildInstall,
|
||||
'install_lib':PyBuildInstallLib},
|
||||
# The struct module is defined here, because build_ext won't be
|
||||
# called unless there's at least one extension module defined.
|
||||
@@ -2297,8 +2317,7 @@
|
||||
|
||||
# Scripts to install
|
||||
scripts = ['Tools/scripts/pydoc', 'Tools/scripts/idle',
|
||||
- 'Tools/scripts/2to3',
|
||||
- 'Lib/smtpd.py']
|
||||
+ 'Tools/scripts/2to3']
|
||||
)
|
||||
|
||||
# --install-platlib
|
||||
10
lang/python27/files/patch-Doc__library__fcntl.rst
Normal file
10
lang/python27/files/patch-Doc__library__fcntl.rst
Normal file
@@ -0,0 +1,10 @@
|
||||
--- ./Doc/library/fcntl.rst.orig 2014-07-03 21:53:41.473098625 +1000
|
||||
+++ ./Doc/library/fcntl.rst 2014-07-03 21:54:04.342833056 +1000
|
||||
@@ -50,7 +50,6 @@ The module defines the following functio
|
||||
operations are typically defined in the library module :mod:`termios` and the
|
||||
argument handling is even more complicated.
|
||||
|
||||
- The op parameter is limited to values that can fit in 32-bits.
|
||||
Additional constants of interest for use as the *op* argument can be
|
||||
found in the :mod:`termios` module, under the same names as used in
|
||||
the relevant C header files.
|
||||
@@ -0,0 +1,17 @@
|
||||
# Description: A non-invasive partial backport of the Python3 distutils behaviour.
|
||||
# This allows Python's scripts to be properly suffixed (similar to Python 3.x) on
|
||||
# installation.
|
||||
# Submitted by: mva
|
||||
|
||||
--- Lib/distutils/command/build_scripts.py.orig 2014-07-26 09:52:20.000000000 UTC
|
||||
+++ Lib/distutils/command/build_scripts.py 2014-07-26 09:52:56.000000000 UTC
|
||||
@@ -126,6 +126,9 @@ class build_scripts (Command):
|
||||
file, oldmode, newmode)
|
||||
os.chmod(file, newmode)
|
||||
|
||||
+ # XXX should we modify self.outfiles?
|
||||
+ return outfiles
|
||||
+
|
||||
# copy_scripts ()
|
||||
|
||||
# class build_scripts
|
||||
@@ -0,0 +1,34 @@
|
||||
From 9934ce31b8447667f71c211e559a8de71e8263db Mon Sep 17 00:00:00 2001
|
||||
From: Brendan Molloy <brendan@bbqsrc.net>
|
||||
Date: Mon, 4 Jan 2016 23:14:06 +1100
|
||||
Subject: [PATCH] Check bytecode file actually exists and tests
|
||||
|
||||
Should solve issue 20397, where using the --record argument results
|
||||
in files that failed to generate bytecode files are added to the
|
||||
record file nonetheless.
|
||||
---
|
||||
Lib/distutils/command/install_lib.py | 17 +++++++++++++----
|
||||
Lib/distutils/tests/test_install_lib.py | 8 ++++++--
|
||||
2 files changed, 19 insertions(+), 6 deletions(-)
|
||||
|
||||
--- Lib/distutils/command/install_lib.py.orig 2015-12-05 19:46:56 UTC
|
||||
+++ Lib/distutils/command/install_lib.py
|
||||
@@ -168,10 +168,14 @@ class install_lib(Command):
|
||||
ext = os.path.splitext(os.path.normcase(py_file))[1]
|
||||
if ext != PYTHON_SOURCE_EXTENSION:
|
||||
continue
|
||||
- if self.compile:
|
||||
- bytecode_files.append(py_file + "c")
|
||||
- if self.optimize > 0:
|
||||
- bytecode_files.append(py_file + "o")
|
||||
+
|
||||
+ pyc_file = py_file + "c"
|
||||
+ if self.compile and os.path.isfile(pyc_file):
|
||||
+ bytecode_files.append(pyc_file)
|
||||
+
|
||||
+ pyo_file = py_file + "o"
|
||||
+ if self.optimize > 0 and os.path.isfile(pyo_file):
|
||||
+ bytecode_files.append(pyo_file)
|
||||
|
||||
return bytecode_files
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
From 9934ce31b8447667f71c211e559a8de71e8263db Mon Sep 17 00:00:00 2001
|
||||
From: Brendan Molloy <brendan@bbqsrc.net>
|
||||
Date: Mon, 4 Jan 2016 23:14:06 +1100
|
||||
Subject: [PATCH] Check bytecode file actually exists and tests
|
||||
|
||||
Should solve issue 20397, where using the --record argument results
|
||||
in files that failed to generate bytecode files are added to the
|
||||
record file nonetheless.
|
||||
---
|
||||
Lib/distutils/command/install_lib.py | 17 +++++++++++++----
|
||||
Lib/distutils/tests/test_install_lib.py | 8 ++++++--
|
||||
2 files changed, 19 insertions(+), 6 deletions(-)
|
||||
|
||||
--- Lib/distutils/tests/test_install_lib.py.orig 2015-12-05 19:46:57 UTC
|
||||
+++ Lib/distutils/tests/test_install_lib.py
|
||||
@@ -64,8 +64,12 @@ class InstallLibTestCase(support.Tempdir
|
||||
cmd.distribution.packages = [pkg_dir]
|
||||
cmd.distribution.script_name = 'setup.py'
|
||||
|
||||
- # get_output should return 4 elements
|
||||
- self.assertGreaterEqual(len(cmd.get_outputs()), 2)
|
||||
+ # Create rubbish, uncompilable file
|
||||
+ f = os.path.join(pkg_dir, 'rubbish.py')
|
||||
+ self.write_file(f, 'rubbish()')
|
||||
+
|
||||
+ # get_output should return 3 elements
|
||||
+ self.assertEqual(len(cmd.get_outputs()), 3)
|
||||
|
||||
def test_get_inputs(self):
|
||||
pkg_dir, dist = self.create_dist()
|
||||
18
lang/python27/files/patch-Makefile.pre.in
Normal file
18
lang/python27/files/patch-Makefile.pre.in
Normal file
@@ -0,0 +1,18 @@
|
||||
# Description: Link scripts in the same way Python3 does
|
||||
# Submitted by: mva
|
||||
|
||||
--- Makefile.pre.in.orig 2014-06-30 04:05:39.000000000 +0200
|
||||
+++ Makefile.pre.in 2014-07-26 11:09:46.000000000 +0200
|
||||
@@ -900,6 +900,12 @@ bininstall: altbininstall
|
||||
(cd $(DESTDIR)$(LIBPC); $(LN) -s python-$(VERSION).pc python2.pc)
|
||||
-rm -f $(DESTDIR)$(LIBPC)/python.pc
|
||||
(cd $(DESTDIR)$(LIBPC); $(LN) -s python2.pc python.pc)
|
||||
+ -rm -f $(DESTDIR)$(BINDIR)/idle
|
||||
+ (cd $(DESTDIR)$(BINDIR); $(LN) -s idle$(VERSION) idle2)
|
||||
+ -rm -f $(DESTDIR)$(BINDIR)/pydoc
|
||||
+ (cd $(DESTDIR)$(BINDIR); $(LN) -s pydoc$(VERSION) pydoc2)
|
||||
+ -rm -f $(DESTDIR)$(BINDIR)/2to3
|
||||
+ (cd $(DESTDIR)$(BINDIR); $(LN) -s 2to3-$(VERSION) 2to3)
|
||||
|
||||
# Install the interpreter with $(VERSION) affixed
|
||||
# This goes into $(exec_prefix)
|
||||
21
lang/python27/files/patch-Misc_python-config.in
Normal file
21
lang/python27/files/patch-Misc_python-config.in
Normal file
@@ -0,0 +1,21 @@
|
||||
# pythonx.y-config --ldflags out of /usr and missing -L<install_lib_dir>
|
||||
# https://bugs.python.org/issue7352
|
||||
|
||||
--- Misc/python-config.in.orig 2015-10-18 07:24:01 UTC
|
||||
+++ Misc/python-config.in
|
||||
@@ -21,6 +21,7 @@ except getopt.error:
|
||||
if not opts:
|
||||
exit_with_usage()
|
||||
|
||||
+libdir = sysconfig.EXEC_PREFIX + '/lib'
|
||||
pyver = sysconfig.get_config_var('VERSION')
|
||||
getvar = sysconfig.get_config_var
|
||||
|
||||
@@ -50,6 +51,7 @@ for opt in opt_flags:
|
||||
# add the prefix/lib/pythonX.Y/config dir, but only if there is no
|
||||
# shared library in prefix/lib/.
|
||||
if opt == '--ldflags':
|
||||
+ libs.insert(0, '-L' + libdir)
|
||||
if not getvar('Py_ENABLE_SHARED'):
|
||||
libs.insert(0, '-L' + getvar('LIBPL'))
|
||||
if not getvar('PYTHONFRAMEWORK'):
|
||||
11
lang/python27/files/patch-Modules-_ctypes-libffi-configure
Normal file
11
lang/python27/files/patch-Modules-_ctypes-libffi-configure
Normal file
@@ -0,0 +1,11 @@
|
||||
--- Modules/_ctypes/libffi/configure.orig 2014-12-16 08:10:12.000000000 +0100
|
||||
+++ Modules/_ctypes/libffi/configure 2014-12-16 08:10:40.000000000 +0100
|
||||
@@ -7526,7 +7526,7 @@ mips64*-*linux*)
|
||||
rm -rf conftest*
|
||||
;;
|
||||
|
||||
-x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \
|
||||
+amd64-*-freebsd*|x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \
|
||||
s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
|
||||
# Find out what ABI is being produced by ac_compile, and set linker
|
||||
# options accordingly. Note that the listed cases only cover the
|
||||
@@ -0,0 +1,36 @@
|
||||
# Description: Fix _ctypes abort on import for FreeBSD/ARM. This is an issue
|
||||
# for anything !apple that is using the libcompiler_rt provided by clang on arm
|
||||
# PR: ports/149167 ports/184517
|
||||
# Patch by: cognet@ (to be upstreamed @ LLVM)
|
||||
|
||||
--- ./Modules/_ctypes/libffi/src/arm/ffi.c.orig 2013-11-10 18:36:41.000000000 +1100
|
||||
+++ ./Modules/_ctypes/libffi/src/arm/ffi.c 2013-12-03 18:05:51.461078888 +1100
|
||||
@@ -33,6 +33,11 @@
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
+#if defined(__FreeBSD__) && defined(__arm__)
|
||||
+#include <sys/types.h>
|
||||
+#include <machine/sysarch.h>
|
||||
+#endif
|
||||
+
|
||||
/* Forward declares. */
|
||||
static int vfp_type_p (ffi_type *);
|
||||
static void layout_vfp_args (ffi_cif *);
|
||||
@@ -751,6 +756,16 @@ ffi_closure_free (void *ptr)
|
||||
|
||||
#else
|
||||
|
||||
+#if defined(__FreeBSD__) && defined(__arm__)
|
||||
+#define __clear_cache(start, end) do { \
|
||||
+ struct arm_sync_icache_args ua; \
|
||||
+ \
|
||||
+ ua.addr = (uintptr_t)(start); \
|
||||
+ ua.len = (char *)(end) - (char *)start; \
|
||||
+ sysarch(ARM_SYNC_ICACHE, &ua); \
|
||||
+ } while (0);
|
||||
+#endif
|
||||
+
|
||||
#define FFI_INIT_TRAMPOLINE(TRAMP,FUN,CTX) \
|
||||
({ unsigned char *__tramp = (unsigned char*)(TRAMP); \
|
||||
unsigned int __fun = (unsigned int)(FUN); \
|
||||
53
lang/python27/files/patch-Modules__fcntlmodule.c
Normal file
53
lang/python27/files/patch-Modules__fcntlmodule.c
Normal file
@@ -0,0 +1,53 @@
|
||||
--- ./Modules/fcntlmodule.c.orig 2014-07-03 21:57:10.429953240 +1000
|
||||
+++ ./Modules/fcntlmodule.c 2014-07-03 21:59:36.517210444 +1000
|
||||
@@ -98,20 +98,15 @@ fcntl_ioctl(PyObject *self, PyObject *ar
|
||||
{
|
||||
#define IOCTL_BUFSZ 1024
|
||||
int fd;
|
||||
- /* In PyArg_ParseTuple below, we use the unsigned non-checked 'I'
|
||||
+ /* In PyArg_ParseTuple below, we use the unsigned non-checked 'k'
|
||||
format for the 'code' parameter because Python turns 0x8000000
|
||||
into either a large positive number (PyLong or PyInt on 64-bit
|
||||
platforms) or a negative number on others (32-bit PyInt)
|
||||
whereas the system expects it to be a 32bit bit field value
|
||||
regardless of it being passed as an int or unsigned long on
|
||||
- various platforms. See the termios.TIOCSWINSZ constant across
|
||||
- platforms for an example of this.
|
||||
-
|
||||
- If any of the 64bit platforms ever decide to use more than 32bits
|
||||
- in their unsigned long ioctl codes this will break and need
|
||||
- special casing based on the platform being built on.
|
||||
+ various platforms.
|
||||
*/
|
||||
- unsigned int code;
|
||||
+ unsigned long code;
|
||||
int arg;
|
||||
int ret;
|
||||
char *str;
|
||||
@@ -119,7 +114,7 @@ fcntl_ioctl(PyObject *self, PyObject *ar
|
||||
int mutate_arg = 1;
|
||||
char buf[IOCTL_BUFSZ+1]; /* argument plus NUL byte */
|
||||
|
||||
- if (PyArg_ParseTuple(args, "O&Iw#|i:ioctl",
|
||||
+ if (PyArg_ParseTuple(args, "O&kw#|i:ioctl",
|
||||
conv_descriptor, &fd, &code,
|
||||
&str, &len, &mutate_arg)) {
|
||||
char *arg;
|
||||
@@ -170,7 +165,7 @@ fcntl_ioctl(PyObject *self, PyObject *ar
|
||||
}
|
||||
|
||||
PyErr_Clear();
|
||||
- if (PyArg_ParseTuple(args, "O&Is#:ioctl",
|
||||
+ if (PyArg_ParseTuple(args, "O&ks#:ioctl",
|
||||
conv_descriptor, &fd, &code, &str, &len)) {
|
||||
if (len > IOCTL_BUFSZ) {
|
||||
PyErr_SetString(PyExc_ValueError,
|
||||
@@ -192,7 +187,7 @@ fcntl_ioctl(PyObject *self, PyObject *ar
|
||||
PyErr_Clear();
|
||||
arg = 0;
|
||||
if (!PyArg_ParseTuple(args,
|
||||
- "O&I|i;ioctl requires a file or file descriptor,"
|
||||
+ "O&k|i;ioctl requires a file or file descriptor,"
|
||||
" an integer and optionally an integer or buffer argument",
|
||||
conv_descriptor, &fd, &code, &arg)) {
|
||||
return NULL;
|
||||
58
lang/python27/files/patch-pr192365
Normal file
58
lang/python27/files/patch-pr192365
Normal file
@@ -0,0 +1,58 @@
|
||||
# Description: do not define __BSD_VISIBLE/_XOPEN_SOURCE/_POSIX_C_SOURCE
|
||||
# in include/python2.7/pyconfig.h
|
||||
# Submitted by: antoine
|
||||
|
||||
--- configure.orig 2014-09-06 14:42:50 UTC
|
||||
+++ configure
|
||||
@@ -2919,13 +2919,6 @@
|
||||
|
||||
|
||||
# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
|
||||
-# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
|
||||
-# them.
|
||||
-
|
||||
-$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
|
||||
-
|
||||
-
|
||||
-# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
|
||||
# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
|
||||
|
||||
$as_echo "#define _BSD_TYPES 1" >>confdefs.h
|
||||
@@ -3293,9 +3286,8 @@
|
||||
# but used in struct sockaddr.sa_family. Reported by Tim Rice.
|
||||
SCO_SV/3.2)
|
||||
define_xopen_source=no;;
|
||||
- # On FreeBSD 4, the math functions C89 does not cover are never defined
|
||||
- # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
|
||||
- FreeBSD/4.*)
|
||||
+ # On FreeBSD, defining _XOPEN_SOURCE to 600 requests a strict environment.
|
||||
+ FreeBSD/*)
|
||||
define_xopen_source=no;;
|
||||
# On MacOS X 10.2, a bug in ncurses.h means that it craps out if
|
||||
# _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
|
||||
--- configure.ac.orig 2014-09-06 14:42:50 UTC
|
||||
+++ configure.ac
|
||||
@@ -88,11 +88,6 @@
|
||||
AC_DEFINE(_NETBSD_SOURCE, 1, [Define on NetBSD to activate all library features])
|
||||
|
||||
# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
|
||||
-# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
|
||||
-# them.
|
||||
-AC_DEFINE(__BSD_VISIBLE, 1, [Define on FreeBSD to activate all library features])
|
||||
-
|
||||
-# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
|
||||
# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
|
||||
AC_DEFINE(_BSD_TYPES, 1, [Define on Irix to enable u_int])
|
||||
|
||||
@@ -426,9 +421,8 @@
|
||||
# but used in struct sockaddr.sa_family. Reported by Tim Rice.
|
||||
SCO_SV/3.2)
|
||||
define_xopen_source=no;;
|
||||
- # On FreeBSD 4, the math functions C89 does not cover are never defined
|
||||
- # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
|
||||
- FreeBSD/4.*)
|
||||
+ # On FreeBSD, defining _XOPEN_SOURCE to 600 requests a strict environment.
|
||||
+ FreeBSD/*)
|
||||
define_xopen_source=no;;
|
||||
# On MacOS X 10.2, a bug in ncurses.h means that it craps out if
|
||||
# _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
|
||||
93
lang/python27/files/patch-setup.py
Normal file
93
lang/python27/files/patch-setup.py
Normal file
@@ -0,0 +1,93 @@
|
||||
# Description: Partial script installation backport from Python3
|
||||
# Submitted by: mva
|
||||
|
||||
# Description: Some modules are installed via other ports
|
||||
|
||||
# Description: ossaudiodev detection fix backport
|
||||
|
||||
--- setup.py.orig 2017-04-22 03:42:03 UTC
|
||||
+++ setup.py
|
||||
@@ -15,6 +15,7 @@ from distutils.core import Extension, se
|
||||
from distutils.command.build_ext import build_ext
|
||||
from distutils.command.install import install
|
||||
from distutils.command.install_lib import install_lib
|
||||
+from distutils.command.build_scripts import build_scripts
|
||||
from distutils.spawn import find_executable
|
||||
|
||||
cross_compiling = "_PYTHON_HOST_PLATFORM" in os.environ
|
||||
@@ -33,7 +34,7 @@ host_platform = get_platform()
|
||||
COMPILED_WITH_PYDEBUG = ('--with-pydebug' in sysconfig.get_config_var("CONFIG_ARGS"))
|
||||
|
||||
# This global variable is used to hold the list of modules to be disabled.
|
||||
-disabled_module_list = []
|
||||
+disabled_module_list = ["_bsddb", "_sqlite3", "_tkinter", "ndmb", "gdbm", "mpz"]
|
||||
|
||||
def add_dir_to_list(dirlist, dir):
|
||||
"""Add the directory 'dir' to the list 'dirlist' (at the front) if
|
||||
@@ -1234,7 +1235,7 @@ class PyBuildExt(build_ext):
|
||||
sysroot = macosx_sdk_root()
|
||||
f = os.path.join(sysroot, f[1:])
|
||||
|
||||
- if os.path.exists(f) and not db_incs:
|
||||
+ if os.path.exists(f):
|
||||
data = open(f).read()
|
||||
m = re.search(r"#s*define\s+HASHVERSION\s+2\s*", data)
|
||||
if m is not None:
|
||||
@@ -1624,9 +1625,10 @@ class PyBuildExt(build_ext):
|
||||
else:
|
||||
missing.append('linuxaudiodev')
|
||||
|
||||
- if (host_platform in ('linux2', 'freebsd4', 'freebsd5', 'freebsd6',
|
||||
- 'freebsd7', 'freebsd8')
|
||||
- or host_platform.startswith("gnukfreebsd")):
|
||||
+# Initial backport of https://hg.python.org/cpython/rev/50f1922bc1d5
|
||||
+
|
||||
+ if any(sys.platform.startswith(prefix)
|
||||
+ for prefix in ("linux", "freebsd", "gnukfreebsd")):
|
||||
exts.append( Extension('ossaudiodev', ['ossaudiodev.c']) )
|
||||
else:
|
||||
missing.append('ossaudiodev')
|
||||
@@ -2200,6 +2202,22 @@ class PyBuildInstallLib(install_lib):
|
||||
def is_chmod_supported(self):
|
||||
return hasattr(os, 'chmod')
|
||||
|
||||
+class PyBuildScripts(build_scripts):
|
||||
+ def copy_scripts(self):
|
||||
+ outfiles = build_scripts.copy_scripts(self)
|
||||
+ fullversion = '{0[0]}.{0[1]}'.format(sys.version_info)
|
||||
+ newoutfiles = []
|
||||
+ for filename in outfiles:
|
||||
+ if filename.endswith('2to3'):
|
||||
+ newfilename = filename + '-' + fullversion
|
||||
+ else:
|
||||
+ newfilename = filename + fullversion
|
||||
+ log.info('renaming {} to {}'.format(filename, newfilename))
|
||||
+ os.rename(filename, newfilename)
|
||||
+ newoutfiles.append(newfilename)
|
||||
+ return newoutfiles
|
||||
+
|
||||
+
|
||||
SUMMARY = """
|
||||
Python is an interpreted, interactive, object-oriented programming
|
||||
language. It is often compared to Tcl, Perl, Scheme or Java.
|
||||
@@ -2245,7 +2263,9 @@ def main():
|
||||
platforms = ["Many"],
|
||||
|
||||
# Build info
|
||||
- cmdclass = {'build_ext':PyBuildExt, 'install':PyBuildInstall,
|
||||
+ cmdclass = {'build_ext':PyBuildExt,
|
||||
+ 'build_scripts':PyBuildScripts,
|
||||
+ 'install':PyBuildInstall,
|
||||
'install_lib':PyBuildInstallLib},
|
||||
# The struct module is defined here, because build_ext won't be
|
||||
# called unless there's at least one extension module defined.
|
||||
@@ -2253,8 +2273,7 @@ def main():
|
||||
|
||||
# Scripts to install
|
||||
scripts = ['Tools/scripts/pydoc', 'Tools/scripts/idle',
|
||||
- 'Tools/scripts/2to3',
|
||||
- 'Lib/smtpd.py']
|
||||
+ 'Tools/scripts/2to3']
|
||||
)
|
||||
|
||||
# --install-platlib
|
||||
Reference in New Issue
Block a user