--- ./setup.py.orig 2014-07-04 18:02:21.711919294 +1000 +++ ./setup.py 2014-07-04 18:11:14.642091269 +1000 @@ -33,7 +33,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", "_sqlite3", "_tkinter", "gdbm", "mpz"] def add_dir_to_list(dirlist, dir): """Add the directory 'dir' to the list 'dirlist' (at the front) if @@ -867,6 +867,8 @@ # OpenSSL doesn't do these until 0.9.8 so we'll bring our own hash exts.append( Extension('_sha256', ['sha256module.c']) ) exts.append( Extension('_sha512', ['sha512module.c']) ) + else: + open('.without_own_sha', 'w') # Modules that provide persistent dictionary-like semantics. You will # probably want to arrange for at least one of them to be available on @@ -1212,7 +1214,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: @@ -1551,7 +1553,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() @@ -1602,9 +1604,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') @@ -2228,9 +2231,7 @@ ext_modules=[Extension('_struct', ['_struct.c'])], # Scripts to install - scripts = ['Tools/scripts/pydoc', 'Tools/scripts/idle', - 'Tools/scripts/2to3', - 'Lib/smtpd.py'] + scripts = [] ) # --install-platlib