python3: Update to 3.7.1

This commit is contained in:
Alexey Pavlov
2018-10-30 09:52:42 +03:00
parent 70c2628d20
commit 064973e09d
25 changed files with 241 additions and 1883 deletions

View File

@@ -1,68 +0,0 @@
diff --git a/Lib/test/test_os.py b/Lib/test/test_os.py
index e9fdb07..ea60e6e 100644
--- a/Lib/test/test_os.py
+++ b/Lib/test/test_os.py
@@ -1723,30 +1723,36 @@ class PosixUidGidTests(unittest.TestCase):
def test_setuid(self):
if os.getuid() != 0:
self.assertRaises(OSError, os.setuid, 0)
+ self.assertRaises(TypeError, os.setuid, 'not an int')
self.assertRaises(OverflowError, os.setuid, 1<<32)
@unittest.skipUnless(hasattr(os, 'setgid'), 'test needs os.setgid()')
def test_setgid(self):
if os.getuid() != 0 and not HAVE_WHEEL_GROUP:
self.assertRaises(OSError, os.setgid, 0)
+ self.assertRaises(TypeError, os.setgid, 'not an int')
self.assertRaises(OverflowError, os.setgid, 1<<32)
@unittest.skipUnless(hasattr(os, 'seteuid'), 'test needs os.seteuid()')
def test_seteuid(self):
if os.getuid() != 0:
self.assertRaises(OSError, os.seteuid, 0)
+ self.assertRaises(TypeError, os.seteuid, 'not an int')
self.assertRaises(OverflowError, os.seteuid, 1<<32)
@unittest.skipUnless(hasattr(os, 'setegid'), 'test needs os.setegid()')
def test_setegid(self):
if os.getuid() != 0 and not HAVE_WHEEL_GROUP:
self.assertRaises(OSError, os.setegid, 0)
+ self.assertRaises(TypeError, os.setegid, 'not an int')
self.assertRaises(OverflowError, os.setegid, 1<<32)
@unittest.skipUnless(hasattr(os, 'setreuid'), 'test needs os.setreuid()')
def test_setreuid(self):
if os.getuid() != 0:
self.assertRaises(OSError, os.setreuid, 0, 0)
+ self.assertRaises(TypeError, os.setreuid, 'not an int', 0)
+ self.assertRaises(TypeError, os.setreuid, 0, 'not an int')
self.assertRaises(OverflowError, os.setreuid, 1<<32, 0)
self.assertRaises(OverflowError, os.setreuid, 0, 1<<32)
@@ -1762,6 +1768,8 @@ class PosixUidGidTests(unittest.TestCase):
def test_setregid(self):
if os.getuid() != 0 and not HAVE_WHEEL_GROUP:
self.assertRaises(OSError, os.setregid, 0, 0)
+ self.assertRaises(TypeError, os.setregid, 'not an int', 0)
+ self.assertRaises(TypeError, os.setregid, 0, 'not an int')
self.assertRaises(OverflowError, os.setregid, 1<<32, 0)
self.assertRaises(OverflowError, os.setregid, 0, 1<<32)
diff --git a/Lib/test/test_pwd.py b/Lib/test/test_pwd.py
index ac9cff7..db98159 100644
--- a/Lib/test/test_pwd.py
+++ b/Lib/test/test_pwd.py
@@ -104,11 +104,11 @@ class PwdTest(unittest.TestCase):
# In some cases, byuids isn't a complete list of all users in the
# system, so if we try to pick a value not in byuids (via a perturbing
# loop, say), pwd.getpwuid() might still be able to find data for that
- # uid. Using sys.maxint may provoke the same problems, but hopefully
+ # uid. Using 2**32 - 2 may provoke the same problems, but hopefully
# it will be a more repeatable failure.
# Android accepts a very large span of uids including sys.maxsize and
# -1; it raises KeyError with 1 or 2 for example.
- fakeuid = sys.maxsize
+ fakeuid = 2**32 - 2
self.assertNotIn(fakeuid, byuids)
if not support.is_android:
self.assertRaises(KeyError, pwd.getpwuid, fakeuid)

View File

@@ -1,8 +1,8 @@
diff --git a/Include/object.h b/Include/object.h
index 0c88603..e3413e8 100644
index c772dea..5729797 100644
--- a/Include/object.h
+++ b/Include/object.h
@@ -1071,6 +1071,49 @@ PyAPI_FUNC(void)
@@ -1098,6 +1098,49 @@ PyAPI_FUNC(void)
_PyObject_DebugTypeStats(FILE *out);
#endif /* ifndef Py_LIMITED_API */
@@ -53,15 +53,16 @@ index 0c88603..e3413e8 100644
}
#endif
diff --git a/Lib/test/test_gc.py b/Lib/test/test_gc.py
index e727499..6efcafb 100644
index 8d806db..dc8bb16 100644
--- a/Lib/test/test_gc.py
+++ b/Lib/test/test_gc.py
@@ -1,10 +1,11 @@
@@ -1,10 +1,12 @@
import unittest
from test.support import (verbose, refcount_test, run_unittest,
strip_python_stderr, cpython_only, start_threads,
- temp_dir, requires_type_collecting)
+ temp_dir, import_module, requires_type_collecting)
- temp_dir, requires_type_collecting, TESTFN, unlink)
+ temp_dir, requires_type_collecting, TESTFN, unlink,
+ import_module)
from test.support.script_helper import assert_python_ok, make_script
import sys
@@ -69,7 +70,7 @@ index e727499..6efcafb 100644
import time
import gc
import weakref
@@ -50,6 +51,8 @@ class GC_Detector(object):
@@ -46,6 +48,8 @@ class GC_Detector(object):
# gc collects it.
self.wr = weakref.ref(C1055820(666), it_happened)
@@ -78,7 +79,7 @@ index e727499..6efcafb 100644
@with_tp_del
class Uncollectable(object):
"""Create a reference cycle with multiple __del__ methods.
@@ -862,6 +865,50 @@ class GCCallbackTests(unittest.TestCase):
@@ -878,6 +882,50 @@ class GCCallbackTests(unittest.TestCase):
self.assertEqual(len(gc.garbage), 0)
@@ -130,10 +131,10 @@ index e727499..6efcafb 100644
def setUp(self):
gc.enable()
diff --git a/Modules/gcmodule.c b/Modules/gcmodule.c
index 0c6f444..87edd5a 100644
index 4d701cb..388dd78 100644
--- a/Modules/gcmodule.c
+++ b/Modules/gcmodule.c
@@ -342,7 +342,8 @@ update_refs(PyGC_Head *containers)
@@ -239,7 +239,8 @@ update_refs(PyGC_Head *containers)
{
PyGC_Head *gc = containers->gc.gc_next;
for (; gc != containers; gc = gc->gc.gc_next) {
@@ -143,7 +144,7 @@ index 0c6f444..87edd5a 100644
_PyGCHead_SET_REFS(gc, Py_REFCNT(FROM_GC(gc)));
/* Python's cyclic gc should never see an incoming refcount
* of 0: if something decref'ed to 0, it should have been
@@ -362,7 +363,8 @@ update_refs(PyGC_Head *containers)
@@ -259,7 +260,8 @@ update_refs(PyGC_Head *containers)
* so serious that maybe this should be a release-build
* check instead of an assert?
*/
@@ -153,7 +154,7 @@ index 0c6f444..87edd5a 100644
}
}
@@ -377,7 +379,9 @@ visit_decref(PyObject *op, void *data)
@@ -274,7 +276,9 @@ visit_decref(PyObject *op, void *data)
* generation being collected, which can be recognized
* because only they have positive gc_refs.
*/
@@ -164,7 +165,7 @@ index 0c6f444..87edd5a 100644
if (_PyGCHead_REFS(gc) > 0)
_PyGCHead_DECREF(gc);
}
@@ -437,9 +441,10 @@ visit_reachable(PyObject *op, PyGC_Head *reachable)
@@ -334,9 +338,10 @@ visit_reachable(PyObject *op, PyGC_Head *reachable)
* If gc_refs == GC_UNTRACKED, it must be ignored.
*/
else {
@@ -178,7 +179,7 @@ index 0c6f444..87edd5a 100644
}
}
return 0;
@@ -481,7 +486,7 @@ move_unreachable(PyGC_Head *young, PyGC_Head *unreachable)
@@ -378,7 +383,7 @@ move_unreachable(PyGC_Head *young, PyGC_Head *unreachable)
*/
PyObject *op = FROM_GC(gc);
traverseproc traverse = Py_TYPE(op)->tp_traverse;
@@ -187,7 +188,7 @@ index 0c6f444..87edd5a 100644
_PyGCHead_SET_REFS(gc, GC_REACHABLE);
(void) traverse(op,
(visitproc)visit_reachable,
@@ -544,7 +549,7 @@ move_legacy_finalizers(PyGC_Head *unreachable, PyGC_Head *finalizers)
@@ -441,7 +446,7 @@ move_legacy_finalizers(PyGC_Head *unreachable, PyGC_Head *finalizers)
for (gc = unreachable->gc.gc_next; gc != unreachable; gc = next) {
PyObject *op = FROM_GC(gc);
@@ -196,7 +197,7 @@ index 0c6f444..87edd5a 100644
next = gc->gc.gc_next;
if (has_legacy_finalizer(op)) {
@@ -620,7 +625,7 @@ handle_weakrefs(PyGC_Head *unreachable, PyGC_Head *old)
@@ -517,7 +522,7 @@ handle_weakrefs(PyGC_Head *unreachable, PyGC_Head *old)
PyWeakReference **wrlist;
op = FROM_GC(gc);
@@ -205,7 +206,7 @@ index 0c6f444..87edd5a 100644
next = gc->gc.gc_next;
if (! PyType_SUPPORTS_WEAKREFS(Py_TYPE(op)))
@@ -641,9 +646,9 @@ handle_weakrefs(PyGC_Head *unreachable, PyGC_Head *old)
@@ -538,9 +543,9 @@ handle_weakrefs(PyGC_Head *unreachable, PyGC_Head *old)
* the callback pointer intact. Obscure: it also
* changes *wrlist.
*/
@@ -217,7 +218,7 @@ index 0c6f444..87edd5a 100644
if (wr->wr_callback == NULL)
continue; /* no callback */
@@ -677,7 +682,7 @@ handle_weakrefs(PyGC_Head *unreachable, PyGC_Head *old)
@@ -574,7 +579,7 @@ handle_weakrefs(PyGC_Head *unreachable, PyGC_Head *old)
*/
if (IS_TENTATIVELY_UNREACHABLE(wr))
continue;
@@ -226,7 +227,7 @@ index 0c6f444..87edd5a 100644
/* Create a new reference so that wr can't go away
* before we can process it again.
@@ -686,7 +691,8 @@ handle_weakrefs(PyGC_Head *unreachable, PyGC_Head *old)
@@ -583,7 +588,8 @@ handle_weakrefs(PyGC_Head *unreachable, PyGC_Head *old)
/* Move wr to wrcb_to_call, for the next pass. */
wrasgc = AS_GC(wr);
@@ -236,7 +237,7 @@ index 0c6f444..87edd5a 100644
next isn't, so they can't
be the same */
gc_list_move(wrasgc, &wrcb_to_call);
@@ -702,11 +708,11 @@ handle_weakrefs(PyGC_Head *unreachable, PyGC_Head *old)
@@ -599,11 +605,11 @@ handle_weakrefs(PyGC_Head *unreachable, PyGC_Head *old)
gc = wrcb_to_call.gc.gc_next;
op = FROM_GC(gc);
@@ -251,7 +252,7 @@ index 0c6f444..87edd5a 100644
/* copy-paste of weakrefobject.c's handle_callback() */
temp = PyObject_CallFunctionObjArgs(callback, wr, NULL);
@@ -823,12 +829,14 @@ check_garbage(PyGC_Head *collectable)
@@ -717,12 +723,14 @@ check_garbage(PyGC_Head *collectable)
for (gc = collectable->gc.gc_next; gc != collectable;
gc = gc->gc.gc_next) {
_PyGCHead_SET_REFS(gc, Py_REFCNT(FROM_GC(gc)));
@@ -269,11 +270,11 @@ index 0c6f444..87edd5a 100644
return -1;
}
diff --git a/Objects/object.c b/Objects/object.c
index 559794f..a47d47f 100644
index 220aa90..f6c7161 100644
--- a/Objects/object.c
+++ b/Objects/object.c
@@ -2025,6 +2025,35 @@ _PyTrash_thread_destroy_chain(void)
}
@@ -2177,6 +2177,35 @@ _PyTrash_thread_destroy_chain(void)
--tstate->trash_delete_nesting;
}
+PyAPI_FUNC(void)

View File

@@ -1,30 +0,0 @@
diff -r 39b9b05c3085 Lib/distutils/sysconfig.py
--- a/Lib/distutils/sysconfig.py Wed Apr 10 00:27:23 2013 +0200
+++ b/Lib/distutils/sysconfig.py Wed Apr 10 10:14:18 2013 +0200
@@ -370,7 +370,10 @@
done[n] = item = ""
if found:
after = value[m.end():]
- value = value[:m.start()] + item + after
+ value = value[:m.start()]
+ if item.strip() not in value:
+ value += item
+ value += after
if "$" in after:
notdone[name] = value
else:
diff -r 39b9b05c3085 Lib/sysconfig.py
--- a/Lib/sysconfig.py Wed Apr 10 00:27:23 2013 +0200
+++ b/Lib/sysconfig.py Wed Apr 10 10:14:18 2013 +0200
@@ -294,7 +294,10 @@
if found:
after = value[m.end():]
- value = value[:m.start()] + item + after
+ value = value[:m.start()]
+ if item.strip() not in value:
+ value += item
+ value += after
if "$" in after:
notdone[name] = value
else:

View File

@@ -1,11 +0,0 @@
diff -r 28c04e954bb6 Lib/lib2to3/main.py
--- a/Lib/lib2to3/main.py Tue Oct 29 22:25:55 2013 -0400
+++ b/Lib/lib2to3/main.py Wed Nov 06 14:33:07 2013 +0100
@@ -213,6 +213,7 @@
# Set up logging handler
level = logging.DEBUG if options.verbose else logging.INFO
+ logging.root.handlers = []
logging.basicConfig(format='%(name)s: %(message)s', level=level)
logger = logging.getLogger('lib2to3.main')

View File

@@ -1,232 +0,0 @@
diff -Nur Python-3.4.1/Lib/ensurepip/__init__.py Python-3.4.1-rewheel/Lib/ensurepip/__init__.py
--- Python-3.4.1/Lib/ensurepip/__init__.py 2014-08-21 10:49:30.792695824 +0200
+++ Python-3.4.1-rewheel/Lib/ensurepip/__init__.py 2014-08-21 10:10:41.958341726 +0200
@@ -1,8 +1,10 @@
import os
import os.path
import pkgutil
+import shutil
import sys
import tempfile
+from ensurepip import rewheel
__all__ = ["version", "bootstrap"]
@@ -25,6 +27,8 @@
# Install the bundled software
import pip._internal
+ if args[0] in ["install", "list", "wheel"]:
+ args.append('--pre')
return pip._internal.main(args)
@@ -73,20 +77,39 @@
# omit pip and easy_install
os.environ["ENSUREPIP_OPTIONS"] = "install"
+ whls = []
+ rewheel_dir = None
+ # try to see if we have system-wide versions of _PROJECTS
+ dep_records = rewheel.find_system_records([p[0] for p in _PROJECTS])
+ # TODO: check if system-wide versions are the newest ones
+ # if --upgrade is used?
+ if all(dep_records):
+ # if we have all _PROJECTS installed system-wide, we'll recreate
+ # wheels from them and install those
+ rewheel_dir = tempfile.TemporaryDirectory()
+ for dr in dep_records:
+ new_whl = rewheel.rewheel_from_record(dr, rewheel_dir.name)
+ whls.append(os.path.join(rewheel_dir.name, new_whl))
+ else:
+ # if we don't have all the _PROJECTS installed system-wide,
+ # let's just fall back to bundled wheels
+ for project, version in _PROJECTS:
+ whl = os.path.join(
+ os.path.dirname(__file__),
+ "_bundled",
+ "{}-{}-py2.py3-none-any.whl".format(project, version)
+ )
+ whls.append(whl)
+
with tempfile.TemporaryDirectory() as tmpdir:
# Put our bundled wheels into a temporary directory and construct the
# additional paths that need added to sys.path
additional_paths = []
- for project, version in _PROJECTS:
- wheel_name = "{}-{}-py2.py3-none-any.whl".format(project, version)
- whl = pkgutil.get_data(
- "ensurepip",
- "_bundled/{}".format(wheel_name),
- )
- with open(os.path.join(tmpdir, wheel_name), "wb") as fp:
- fp.write(whl)
-
- additional_paths.append(os.path.join(tmpdir, wheel_name))
+ for whl in whls:
+ shutil.copy(whl, tmpdir)
+ additional_paths.append(os.path.join(tmpdir, os.path.basename(whl)))
+ if rewheel_dir:
+ rewheel_dir.cleanup()
# Construct the arguments to be passed to the pip command
args = ["install", "--no-index", "--find-links", tmpdir]
diff -Nur Python-3.4.1/Lib/ensurepip/rewheel/__init__.py Python-3.4.1-rewheel/Lib/ensurepip/rewheel/__init__.py
--- Python-3.4.1/Lib/ensurepip/rewheel/__init__.py 1970-01-01 01:00:00.000000000 +0100
+++ Python-3.4.1-rewheel/Lib/ensurepip/rewheel/__init__.py 2014-08-21 10:11:22.560320121 +0200
@@ -0,0 +1,143 @@
+import argparse
+import codecs
+import csv
+import email.parser
+import os
+import io
+import re
+import site
+import subprocess
+import sys
+import zipfile
+
+def run():
+ parser = argparse.ArgumentParser(description='Recreate wheel of package with given RECORD.')
+ parser.add_argument('record_path',
+ help='Path to RECORD file')
+ parser.add_argument('-o', '--output-dir',
+ help='Dir where to place the wheel, defaults to current working dir.',
+ dest='outdir',
+ default=os.path.curdir)
+
+ ns = parser.parse_args()
+ retcode = 0
+ try:
+ print(rewheel_from_record(**vars(ns)))
+ except BaseException as e:
+ print('Failed: {}'.format(e))
+ retcode = 1
+ sys.exit(1)
+
+def find_system_records(projects):
+ """Return list of paths to RECORD files for system-installed projects.
+
+ If a project is not installed, the resulting list contains None instead
+ of a path to its RECORD
+ """
+ records = []
+ # get system site-packages dirs
+ sys_sitepack = site.getsitepackages([sys.base_prefix, sys.base_exec_prefix])
+ sys_sitepack = [sp for sp in sys_sitepack if os.path.exists(sp)]
+ # try to find all projects in all system site-packages
+ for project in projects:
+ path = None
+ for sp in sys_sitepack:
+ dist_info_re = os.path.join(sp, project) + r'-[^\{0}]+\.dist-info'.format(os.sep)
+ candidates = [os.path.join(sp, p) for p in os.listdir(sp)]
+ # filter out candidate dirs based on the above regexp
+ filtered = [c for c in candidates if re.match(dist_info_re, c)]
+ # if we have 0 or 2 or more dirs, something is wrong...
+ if len(filtered) == 1:
+ path = filtered[0]
+ if path is not None:
+ records.append(os.path.join(path, 'RECORD'))
+ else:
+ records.append(None)
+ return records
+
+def rewheel_from_record(record_path, outdir):
+ """Recreates a whee of package with given record_path and returns path
+ to the newly created wheel."""
+ site_dir = os.path.dirname(os.path.dirname(record_path))
+ record_relpath = record_path[len(site_dir):].strip(os.path.sep)
+ to_write, to_omit = get_records_to_pack(site_dir, record_relpath)
+ new_wheel_name = get_wheel_name(record_path)
+ new_wheel_path = os.path.join(outdir, new_wheel_name + '.whl')
+
+ new_wheel = zipfile.ZipFile(new_wheel_path, mode='w', compression=zipfile.ZIP_DEFLATED)
+ # we need to write a new record with just the files that we will write,
+ # e.g. not binaries and *.pyc/*.pyo files
+ new_record = io.StringIO()
+ writer = csv.writer(new_record)
+
+ # handle files that we can write straight away
+ for f, sha_hash, size in to_write:
+ new_wheel.write(os.path.join(site_dir, f), arcname=f)
+ writer.writerow([f, sha_hash,size])
+
+ # rewrite the old wheel file with a new computed one
+ writer.writerow([record_relpath, '', ''])
+ new_wheel.writestr(record_relpath, new_record.getvalue())
+
+ new_wheel.close()
+
+ return new_wheel.filename
+
+def get_wheel_name(record_path):
+ """Return proper name of the wheel, without .whl."""
+
+ wheel_info_path = os.path.join(os.path.dirname(record_path), 'WHEEL')
+ with codecs.open(wheel_info_path, encoding='utf-8') as wheel_info_file:
+ wheel_info = email.parser.Parser().parsestr(wheel_info_file.read())
+
+ metadata_path = os.path.join(os.path.dirname(record_path), 'METADATA')
+ with codecs.open(metadata_path, encoding='utf-8') as metadata_file:
+ metadata = email.parser.Parser().parsestr(metadata_file.read())
+
+ # construct name parts according to wheel spec
+ distribution = metadata.get('Name')
+ version = metadata.get('Version')
+ build_tag = '' # nothing for now
+ lang_tag = []
+ for t in wheel_info.get_all('Tag'):
+ lang_tag.append(t.split('-')[0])
+ lang_tag = '.'.join(lang_tag)
+ abi_tag, plat_tag = wheel_info.get('Tag').split('-')[1:3]
+ # leave out build tag, if it is empty
+ to_join = filter(None, [distribution, version, build_tag, lang_tag, abi_tag, plat_tag])
+ return '-'.join(list(to_join))
+
+def get_records_to_pack(site_dir, record_relpath):
+ """Accepts path of sitedir and path of RECORD file relative to it.
+ Returns two lists:
+ - list of files that can be written to new RECORD straight away
+ - list of files that shouldn't be written or need some processing
+ (pyc and pyo files, scripts)
+ """
+ record_file_path = os.path.join(site_dir, record_relpath)
+ with codecs.open(record_file_path, encoding='utf-8') as record_file:
+ record_contents = record_file.read()
+ # temporary fix for https://github.com/pypa/pip/issues/1376
+ # we need to ignore files under ".data" directory
+ data_dir = os.path.dirname(record_relpath).strip(os.path.sep)
+ data_dir = data_dir[:-len('dist-info')] + 'data'
+
+ to_write = []
+ to_omit = []
+ for l in record_contents.splitlines():
+ spl = l.split(',')
+ if len(spl) == 3:
+ # new record will omit (or write differently):
+ # - abs paths, paths with ".." (entry points),
+ # - pyc+pyo files
+ # - the old RECORD file
+ # TODO: is there any better way to recognize an entry point?
+ if os.path.isabs(spl[0]) or spl[0].startswith('..') or \
+ spl[0].endswith('.pyc') or spl[0].endswith('.pyo') or \
+ spl[0] == record_relpath or spl[0].startswith(data_dir):
+ to_omit.append(spl)
+ else:
+ to_write.append(spl)
+ else:
+ pass # bad RECORD or empty line
+ return to_write, to_omit
diff -Nur Python-3.4.1/Makefile.pre.in Python-3.4.1-rewheel/Makefile.pre.in
--- Python-3.4.1/Makefile.pre.in 2014-08-21 10:49:31.512695040 +0200
+++ Python-3.4.1-rewheel/Makefile.pre.in 2014-08-21 10:10:41.961341722 +0200
@@ -1227,7 +1227,7 @@
test/test_asyncio \
collections concurrent concurrent/futures encodings \
email email/mime test/test_email test/test_email/data \
- ensurepip ensurepip/_bundled \
+ ensurepip ensurepip/_bundled ensurepip/rewheel \
html json test/test_json http dbm xmlrpc \
sqlite3 sqlite3/test \
logging csv wsgiref urllib \

View File

@@ -1,15 +0,0 @@
diff -up Python-3.5.0/configure.ac Python-3.5.0/configure.ac
--- Python-3.5.0/configure.ac 2015-09-23 13:52:20.756909744 +0200
+++ Python-3.5.0/configure.ac 2015-09-23 13:52:46.859163629 +0200
@@ -799,9 +799,9 @@ cat >> conftest.c <<EOF
alpha-linux-gnu
# elif defined(__ARM_EABI__) && defined(__ARM_PCS_VFP)
# if defined(__ARMEL__)
- arm-linux-gnueabihf
+ arm-linux-gnueabi
# else
- armeb-linux-gnueabihf
+ armeb-linux-gnueabi
# endif
# elif defined(__ARM_EABI__) && !defined(__ARM_PCS_VFP)
# if defined(__ARMEL__)

View File

@@ -1,42 +0,0 @@
diff -urp Python-3.5.0/configure p/configure
--- Python-3.5.0/configure 2016-02-25 16:12:12.615184011 +0000
+++ p/configure 2016-02-25 16:13:01.293412517 +0000
@@ -5267,7 +5267,7 @@ cat >> conftest.c <<EOF
# elif _MIPS_SIM == _ABIN32
mips64el-linux-gnuabin32
# elif _MIPS_SIM == _ABI64
- mips64el-linux-gnuabi64
+ mips64el-linux-gnu
# else
# error unknown platform triplet
# endif
@@ -5277,7 +5277,7 @@ cat >> conftest.c <<EOF
# elif _MIPS_SIM == _ABIN32
mips64-linux-gnuabin32
# elif _MIPS_SIM == _ABI64
- mips64-linux-gnuabi64
+ mips64-linux-gnu
# else
# error unknown platform triplet
# endif
diff -urp Python-3.5.0/configure.ac p/configure.ac
--- Python-3.5.0/configure.ac 2016-02-25 16:12:11.663159985 +0000
+++ p/configure.ac 2016-02-25 16:13:18.814854710 +0000
@@ -821,7 +821,7 @@ cat >> conftest.c <<EOF
# elif _MIPS_SIM == _ABIN32
mips64el-linux-gnuabin32
# elif _MIPS_SIM == _ABI64
- mips64el-linux-gnuabi64
+ mips64el-linux-gnu
# else
# error unknown platform triplet
# endif
@@ -831,7 +831,7 @@ cat >> conftest.c <<EOF
# elif _MIPS_SIM == _ABIN32
mips64-linux-gnuabin32
# elif _MIPS_SIM == _ABI64
- mips64-linux-gnuabi64
+ mips64-linux-gnu
# else
# error unknown platform triplet
# endif

View File

@@ -1,45 +0,0 @@
diff --git a/Lib/distutils/cmd.py b/Lib/distutils/cmd.py
index c89d5ef..dd61621 100644
--- a/Lib/distutils/cmd.py
+++ b/Lib/distutils/cmd.py
@@ -296,7 +296,8 @@ class Command:
finalized command object.
"""
cmd_obj = self.distribution.get_command_obj(command, create)
- cmd_obj.ensure_finalized()
+ if cmd_obj is not None:
+ cmd_obj.ensure_finalized()
return cmd_obj
# XXX rename to 'get_reinitialized_command()'? (should do the
diff --git a/Lib/distutils/command/install.py b/Lib/distutils/command/install.py
index 8174192..30ca739 100644
--- a/Lib/distutils/command/install.py
+++ b/Lib/distutils/command/install.py
@@ -122,6 +122,8 @@ class install(Command):
"force installation (overwrite any existing files)"),
('skip-build', None,
"skip rebuilding everything (for testing/debugging)"),
+ ('executable=', 'e',
+ "specify final destination interpreter path (install.py)"),
# Where to install documentation (eventually!)
#('doc-format=', None, "format of documentation to generate"),
@@ -195,6 +197,7 @@ class install(Command):
# directory not in sys.path.
self.force = 0
self.skip_build = 0
+ self.executable = None
self.warn_dir = 1
# These are only here as a conduit from the 'build' command to the
@@ -367,6 +370,9 @@ class install(Command):
('build_base', 'build_base'),
('build_lib', 'build_lib'))
+ if self.executable is None:
+ self.executable = os.path.normpath(sys.executable)
+
# Punt on doc directories for now -- after all, we're punting on
# documentation completely!

View File

@@ -1,181 +0,0 @@
diff --git a/Lib/ensurepip/__init__.py b/Lib/ensurepip/__init__.py
index 9f5d151..4dfa8a1 100644
--- a/Lib/ensurepip/__init__.py
+++ b/Lib/ensurepip/__init__.py
@@ -10,13 +10,25 @@
__all__ = ["version", "bootstrap"]
-_SETUPTOOLS_VERSION = "39.0.1"
+_SETUPTOOLS_VERSION = "39.2.0"
_PIP_VERSION = "10.0.1"
+
+_SIX_VERSION = "1.10.0"
+
+_APPDIRS_VERSION = "1.4.0"
+
+_PACKAGING_VERSION = "16.8"
+
+_PYPARSING_VERSION = "2.1.10"
_PROJECTS = [
("setuptools", _SETUPTOOLS_VERSION),
("pip", _PIP_VERSION),
+ ("six", _SIX_VERSION),
+ ("appdirs", _APPDIRS_VERSION),
+ ("packaging", _PACKAGING_VERSION),
+ ("pyparsing", _PYPARSING_VERSION)
]
diff --git a/Lib/test/test_ensurepip.py b/Lib/test/test_ensurepip.py
index 9b04c18..23664c4 100644
--- a/Lib/test/test_ensurepip.py
+++ b/Lib/test/test_ensurepip.py
@@ -40,13 +40,14 @@ class TestBootstrap(EnsurepipMixin, unittest.TestCase):
self.run_pip.assert_called_once_with(
[
"install", "--no-index", "--find-links",
- unittest.mock.ANY, "setuptools", "pip",
+ unittest.mock.ANY,
+ "setuptools", "pip", "six", "appdirs", "packaging", "pyparsing",
],
unittest.mock.ANY,
)
additional_paths = self.run_pip.call_args[0][1]
- self.assertEqual(len(additional_paths), 2)
+ self.assertEqual(len(additional_paths), 6)
def test_bootstrapping_with_root(self):
ensurepip.bootstrap(root="/foo/bar/")
@@ -55,7 +56,7 @@ class TestBootstrap(EnsurepipMixin, unittest.TestCase):
[
"install", "--no-index", "--find-links",
unittest.mock.ANY, "--root", "/foo/bar/",
- "setuptools", "pip",
+ "setuptools", "pip", "six", "appdirs", "packaging", "pyparsing",
],
unittest.mock.ANY,
)
@@ -66,7 +67,8 @@ class TestBootstrap(EnsurepipMixin, unittest.TestCase):
self.run_pip.assert_called_once_with(
[
"install", "--no-index", "--find-links",
- unittest.mock.ANY, "--user", "setuptools", "pip",
+ unittest.mock.ANY, "--user",
+ "setuptools", "pip", "six", "appdirs", "packaging", "pyparsing",
],
unittest.mock.ANY,
)
@@ -77,7 +79,8 @@ class TestBootstrap(EnsurepipMixin, unittest.TestCase):
self.run_pip.assert_called_once_with(
[
"install", "--no-index", "--find-links",
- unittest.mock.ANY, "--upgrade", "setuptools", "pip",
+ unittest.mock.ANY, "--upgrade",
+ "setuptools", "pip", "six", "appdirs", "packaging", "pyparsing",
],
unittest.mock.ANY,
)
@@ -88,7 +91,8 @@ class TestBootstrap(EnsurepipMixin, unittest.TestCase):
self.run_pip.assert_called_once_with(
[
"install", "--no-index", "--find-links",
- unittest.mock.ANY, "-v", "setuptools", "pip",
+ unittest.mock.ANY, "-v",
+ "setuptools", "pip", "six", "appdirs", "packaging", "pyparsing",
],
unittest.mock.ANY,
)
@@ -99,7 +103,8 @@ class TestBootstrap(EnsurepipMixin, unittest.TestCase):
self.run_pip.assert_called_once_with(
[
"install", "--no-index", "--find-links",
- unittest.mock.ANY, "-vv", "setuptools", "pip",
+ unittest.mock.ANY, "-vv",
+ "setuptools", "pip", "six", "appdirs", "packaging", "pyparsing",
],
unittest.mock.ANY,
)
@@ -110,7 +115,8 @@ class TestBootstrap(EnsurepipMixin, unittest.TestCase):
self.run_pip.assert_called_once_with(
[
"install", "--no-index", "--find-links",
- unittest.mock.ANY, "-vvv", "setuptools", "pip",
+ unittest.mock.ANY, "-vvv",
+ "setuptools", "pip", "six", "appdirs", "packaging", "pyparsing",
],
unittest.mock.ANY,
)
@@ -186,8 +192,8 @@ class TestUninstall(EnsurepipMixin, unittest.TestCase):
self.run_pip.assert_called_once_with(
[
- "uninstall", "-y", "--disable-pip-version-check", "pip",
- "setuptools",
+ "uninstall", "-y", "--disable-pip-version-check",
+ "pyparsing", "packaging", "appdirs", "six", "pip", "setuptools",
]
)
@@ -197,8 +203,8 @@ class TestUninstall(EnsurepipMixin, unittest.TestCase):
self.run_pip.assert_called_once_with(
[
- "uninstall", "-y", "--disable-pip-version-check", "-v", "pip",
- "setuptools",
+ "uninstall", "-y", "--disable-pip-version-check", "-v",
+ "pyparsing", "packaging", "appdirs", "six", "pip", "setuptools",
]
)
@@ -208,8 +214,8 @@ class TestUninstall(EnsurepipMixin, unittest.TestCase):
self.run_pip.assert_called_once_with(
[
- "uninstall", "-y", "--disable-pip-version-check", "-vv", "pip",
- "setuptools",
+ "uninstall", "-y", "--disable-pip-version-check", "-vv",
+ "pyparsing", "packaging", "appdirs", "six", "pip", "setuptools",
]
)
@@ -220,7 +226,7 @@ class TestUninstall(EnsurepipMixin, unittest.TestCase):
self.run_pip.assert_called_once_with(
[
"uninstall", "-y", "--disable-pip-version-check", "-vvv",
- "pip", "setuptools",
+ "pyparsing", "packaging", "appdirs", "six", "pip", "setuptools",
]
)
@@ -260,13 +266,14 @@ class TestBootstrappingMainFunction(EnsurepipMixin, unittest.TestCase):
self.run_pip.assert_called_once_with(
[
"install", "--no-index", "--find-links",
- unittest.mock.ANY, "setuptools", "pip",
+ unittest.mock.ANY,
+ "setuptools", "pip", "six", "appdirs", "packaging", "pyparsing",
],
unittest.mock.ANY,
)
additional_paths = self.run_pip.call_args[0][1]
- self.assertEqual(len(additional_paths), 2)
+ self.assertEqual(len(additional_paths), 6)
self.assertEqual(exit_code, 0)
def test_bootstrapping_error_code(self):
@@ -284,8 +291,8 @@ class TestUninstallationMainFunction(EnsurepipMixin, unittest.TestCase):
self.run_pip.assert_called_once_with(
[
- "uninstall", "-y", "--disable-pip-version-check", "pip",
- "setuptools",
+ "uninstall", "-y", "--disable-pip-version-check", "pyparsing", "packaging",
+ "appdirs", "six", "pip", "setuptools",
]
)

View File

@@ -1,12 +0,0 @@
diff --git a/Lib/ctypes/test/test_structures.py b/Lib/ctypes/test/test_structures.py
index 3eded77..ad7859a 100644
--- a/Lib/ctypes/test/test_structures.py
+++ b/Lib/ctypes/test/test_structures.py
@@ -392,6 +392,7 @@ class StructureTestCase(unittest.TestCase):
(1, 0, 0, 0, 0, 0))
self.assertRaises(TypeError, lambda: Z(1, 2, 3, 4, 5, 6, 7))
+ @unittest.skip('Fails on aarch64: http://bugs.python.org/issue29804')
def test_pass_by_value(self):
# This should mirror the structure in Modules/_ctypes/_ctypes_test.c
class X(Structure):

View File

@@ -46,6 +46,6 @@
+ print(cdll.LoadLibrary("cygbz2-1.dll"))
+ print(cdll.LoadLibrary("cygcrypt-0.dll"))
+ print(find_library("crypt"))
else:
print(cdll.LoadLibrary("libm.so"))
print(cdll.LoadLibrary("libcrypt.so"))
# issue-26439 - fix broken test call for AIX
elif sys.platform.startswith("aix"):
from ctypes import CDLL

View File

@@ -1,7 +1,7 @@
--- Python-3.1.2/Include/py_curses.h.orig 2009-09-06 16:26:46.000000000 -0500
+++ Python-3.1.2/Include/py_curses.h 2010-05-03 01:25:11.226933700 -0500
@@ -17,6 +17,13 @@
#define NCURSES_OPAQUE 0
#endif
#endif /* __APPLE__ */
+#ifdef __CYGWIN__
@@ -11,6 +11,6 @@
+#define NCURSES_INTERNALS
+#endif /* __CYGWIN__ */
+
#ifdef __FreeBSD__
/*
** On FreeBSD, [n]curses.h and stdlib.h/wchar.h use different guards
/* On FreeBSD, [n]curses.h and stdlib.h/wchar.h use different guards
against multiple definition of wchar_t and wint_t. */
#if defined(__FreeBSD__) && defined(_XOPEN_SOURCE_EXTENDED)

View File

@@ -1,46 +0,0 @@
--- Python-3.4.3/Lib/distutils/command/build_ext.py.orig 2015-02-25 05:27:44.000000000 -0600
+++ Python-3.4.3/Lib/distutils/command/build_ext.py 2015-05-05 11:15:40.666175000 -0500
@@ -716,9 +716,9 @@ class build_ext(Command):
else:
return ext.libraries
elif sys.platform[:6] == "cygwin":
- template = "python%d.%d"
+ template = "python%d.%d%s"
pythonlib = (template %
- (sys.hexversion >> 24, (sys.hexversion >> 16) & 0xff))
+ (sys.hexversion >> 24, (sys.hexversion >> 16) & 0xff, sys.abiflags))
# don't extend ext.libraries, it may be shared with other
# extensions, it is a reference to the original list
return ext.libraries + [pythonlib]
--- Python-3.4.3/Makefile.pre.in.orig 2015-02-25 05:27:45.000000000 -0600
+++ Python-3.4.3/Makefile.pre.in 2015-05-05 11:15:40.672175700 -0500
@@ -674,7 +674,7 @@ $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION
# This rule builds the Cygwin Python DLL and import library if configured
# for a shared core library; otherwise, this rule is a noop.
-$(DLLLIBRARY) libpython$(VERSION).dll.a: $(LIBRARY_OBJS)
+$(DLLLIBRARY) libpython$(LDVERSION).dll.a: $(LIBRARY_OBJS)
if test -n "$(DLLLIBRARY)"; then \
$(LDSHARED) -Wl,--out-implib=$@ -o $(DLLLIBRARY) $^ \
$(LIBS) $(MODLIBS) $(SYSLIBS) $(LDLAST); \
--- Python-3.4.3/Modules/makesetup.orig 2015-02-25 05:27:46.000000000 -0600
+++ Python-3.4.3/Modules/makesetup 2015-05-05 11:15:40.676676300 -0500
@@ -92,7 +92,7 @@ CYGWIN*) if test $libdir = .
else
ExtraLibDir='$(LIBPL)'
fi
- ExtraLibs="-L$ExtraLibDir -lpython\$(VERSION)";;
+ ExtraLibs="-L$ExtraLibDir -lpython\$(LDVERSION)";;
esac
# Main loop
--- Python-3.4.3/configure.ac.orig 2015-02-25 05:27:46.000000000 -0600
+++ Python-3.4.3/configure.ac 2015-05-05 11:24:25.915873200 -0500
@@ -1144,6 +1144,7 @@ if test $enable_shared = "yes"; then
case $ac_sys_system in
CYGWIN*)
LDLIBRARY='libpython$(LDVERSION).dll.a'
+ BLDLIBRARY='-L. -lpython$(LDVERSION)'
DLLLIBRARY='libpython$(LDVERSION).dll'
;;
SunOS*)

View File

@@ -1,61 +1,33 @@
--- Python-3.4.3/Include/pythread.h.orig 2015-02-25 05:27:44.000000000 -0600
+++ Python-3.4.3/Include/pythread.h 2015-05-05 11:27:20.117994100 -0500
@@ -74,11 +74,11 @@ PyAPI_FUNC(int) PyThread_set_stacksize(s
#endif
/* Thread Local Storage (TLS) API */
-PyAPI_FUNC(int) PyThread_create_key(void);
-PyAPI_FUNC(void) PyThread_delete_key(int);
-PyAPI_FUNC(int) PyThread_set_key_value(int, void *);
-PyAPI_FUNC(void *) PyThread_get_key_value(int);
-PyAPI_FUNC(void) PyThread_delete_key_value(int key);
+PyAPI_FUNC(long) PyThread_create_key(void);
+PyAPI_FUNC(void) PyThread_delete_key(long);
+PyAPI_FUNC(int) PyThread_set_key_value(long, void *);
+PyAPI_FUNC(void *) PyThread_get_key_value(long);
+PyAPI_FUNC(void) PyThread_delete_key_value(long key);
platforms, but it is not POSIX-compliant. Therefore, the new TSS API uses
opaque data type to represent TSS keys to be compatible (see PEP 539).
*/
-PyAPI_FUNC(int) PyThread_create_key(void) Py_DEPRECATED(3.7);
-PyAPI_FUNC(void) PyThread_delete_key(int key) Py_DEPRECATED(3.7);
-PyAPI_FUNC(int) PyThread_set_key_value(int key, void *value) Py_DEPRECATED(3.7);
-PyAPI_FUNC(void *) PyThread_get_key_value(int key) Py_DEPRECATED(3.7);
-PyAPI_FUNC(void) PyThread_delete_key_value(int key) Py_DEPRECATED(3.7);
+PyAPI_FUNC(long) PyThread_create_key(void) Py_DEPRECATED(3.7);
+PyAPI_FUNC(void) PyThread_delete_key(long key) Py_DEPRECATED(3.7);
+PyAPI_FUNC(int) PyThread_set_key_value(long key, void *value) Py_DEPRECATED(3.7);
+PyAPI_FUNC(void *) PyThread_get_key_value(long key) Py_DEPRECATED(3.7);
+PyAPI_FUNC(void) PyThread_delete_key_value(long key) Py_DEPRECATED(3.7);
/* Cleanup after a fork */
PyAPI_FUNC(void) PyThread_ReInitTLS(void);
--- Python-3.6.0/Python/pystate.c.orig 2017-02-08 04:54:10.265051500 -0500
+++ Python-3.6.0/Python/pystate.c 2017-02-08 05:00:43.539089400 -0500
@@ -47,7 +47,7 @@
GILState implementation
*/
static PyInterpreterState *autoInterpreterState = NULL;
-static int autoTLSkey = -1;
+static long autoTLSkey = -1L;
#else
#define HEAD_INIT() /* Nothing */
#define HEAD_LOCK() /* Nothing */
@@ -713,7 +713,7 @@ _PyGILState_Init(PyInterpreterState *i,
{
assert(i && t); /* must init with valid states */
autoTLSkey = PyThread_create_key();
- if (autoTLSkey == -1)
+ if (autoTLSkey == -1L)
Py_FatalError("Could not allocate TLS entry");
autoInterpreterState = i;
assert(PyThread_get_key_value(autoTLSkey) == NULL);
@@ -745,7 +745,7 @@ _PyGILState_Reinit(void)
{
PyThreadState *tstate = PyGILState_GetThisThreadState();
PyThread_delete_key(autoTLSkey);
- if ((autoTLSkey = PyThread_create_key()) == -1)
+ if ((autoTLSkey = PyThread_create_key()) == -1L)
Py_FatalError("Could not allocate TLS entry");
/* If the thread had an associated auto thread state, reassociate it with
PyAPI_FUNC(void) PyThread_ReInitTLS(void) Py_DEPRECATED(3.7);
--- Python-3.6.0/Python/thread_pthread.h.orig 2016-12-22 21:21:22.000000000 -0500
+++ Python-3.6.0/Python/thread_pthread.h 2017-02-08 05:18:45.791168100 -0500
@@ -603,36 +603,39 @@
#define Py_HAVE_NATIVE_TLS
@@ -603,44 +603,47 @@
removing this API.
*/
-int
+long
PyThread_create_key(void)
{
#ifdef PTHREAD_KEY_T_IS_COMPATIBLE_WITH_INT
pthread_key_t key;
int fail = pthread_key_create(&key, NULL);
if (fail)
@@ -72,30 +44,38 @@
+ return -1L;
}
- return (int)key;
+#endif
+ return (long)key;
+#endif
#else
- return -1; /* never return valid key value. */
+ return -1L; /* never return valid key value. */
#endif
}
void
-PyThread_delete_key(int key)
+PyThread_delete_key(long key)
{
#ifdef PTHREAD_KEY_T_IS_COMPATIBLE_WITH_INT
pthread_key_delete(key);
#endif
}
void
-PyThread_delete_key_value(int key)
+PyThread_delete_key_value(long key)
{
#ifdef PTHREAD_KEY_T_IS_COMPATIBLE_WITH_INT
pthread_setspecific(key, NULL);
#endif
}
int
-PyThread_set_key_value(int key, void *value)
+PyThread_set_key_value(long key, void *value)
{
#ifdef PTHREAD_KEY_T_IS_COMPATIBLE_WITH_INT
int fail;
fail = pthread_setspecific(key, value);
@@ -640,7 +640,7 @@ PyThread_set_key_value(int key, void *va
}
@@ -103,5 +83,6 @@
-PyThread_get_key_value(int key)
+PyThread_get_key_value(long key)
{
#ifdef PTHREAD_KEY_T_IS_COMPATIBLE_WITH_INT
return pthread_getspecific(key);
}
#else

View File

@@ -1,8 +1,8 @@
--- Python-3.2.3/Modules/getpath.c.orig 2012-04-11 02:54:07.000000000 -0400
+++ Python-3.2.3/Modules/getpath.c 2012-06-14 13:33:30.179375000 -0400
@@ -551,6 +551,28 @@
if (isxfile(progpath))
break;
}
+#ifdef __CYGWIN__
+ /*
@@ -18,14 +18,14 @@
+ * extension appended.
+ */
+#define EXE L".exe"
+ if (isdir(progpath) && wcslen(progpath) + wcslen(EXE) <= MAXPATHLEN)
+ if (isdir(program_full_path) && wcslen(program_full_path) + wcslen(EXE) <= MAXPATHLEN)
+ {
+ wcscat(progpath, EXE);
+ if (isxfile(progpath))
+ wcscat(program_full_path, EXE);
+ if (isxfile(program_full_path))
+ break;
+ }
+#endif /* __CYGWIN__ */
+
if (!delim) {
progpath[0] = L'\0';
program_full_path[0] = L'\0';
break;

View File

@@ -1,14 +0,0 @@
--- Python-3.4.3/Modules/signalmodule.c.orig 2015-02-25 05:27:46.000000000 -0600
+++ Python-3.4.3/Modules/signalmodule.c 2015-05-05 16:10:10.357940900 -0500
@@ -957,7 +957,11 @@ fill_siginfo(siginfo_t *si)
PyStructSequence_SET_ITEM(result, 4, _PyLong_FromUid(si->si_uid));
PyStructSequence_SET_ITEM(result, 5,
PyLong_FromLong((long)(si->si_status)));
+#ifdef __CYGWIN__
+ PyStructSequence_SET_ITEM(result, 6, PyLong_FromLong(0L));
+#else
PyStructSequence_SET_ITEM(result, 6, PyLong_FromLong(si->si_band));
+#endif
if (PyErr_Occurred()) {
Py_DECREF(result);
return NULL;

View File

@@ -1,11 +0,0 @@
--- Python-3.4.3/Modules/_struct.c.orig 2015-02-25 05:27:45.000000000 -0600
+++ Python-3.4.3/Modules/_struct.c 2015-05-05 16:17:01.509150400 -0500
@@ -1650,7 +1650,7 @@ unpackiter_iternext(unpackiterobject *se
}
static PyTypeObject unpackiter_type = {
- PyVarObject_HEAD_INIT(&PyType_Type, 0)
+ PyVarObject_HEAD_INIT(NULL, 0)
"unpack_iterator", /* tp_name */
sizeof(unpackiterobject), /* tp_basicsize */
0, /* tp_itemsize */

View File

@@ -1,5 +1,5 @@
--- origsrc/Python-3.6.1rc1/configure.ac 2017-03-12 14:28:34.395001700 -0500
+++ src/Python-3.6.1rc1/configure.ac 2017-03-21 00:27:44.595584900 -0500
--- Python-3.6.1rc1/configure.ac 2017-03-12 14:28:34.395001700 -0500
+++ Python-3.6.1rc1/configure.ac 2017-03-21 00:27:44.595584900 -0500
@@ -138,11 +138,6 @@ AC_DEFINE(_GNU_SOURCE, 1, [Define on Lin
AC_DEFINE(_NETBSD_SOURCE, 1, [Define on NetBSD to activate all library features])
@@ -9,6 +9,6 @@
-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])
# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
# them.
AC_DEFINE(_DARWIN_C_SOURCE, 1, [Define on Darwin to activate all library features])

View File

@@ -0,0 +1,12 @@
diff -Naur Python-3.7.0-orig/Modules/_abc.c Python-3.7.0/Modules/_abc.c
--- Python-3.7.0-orig/Modules/_abc.c 2018-06-27 06:07:35.000000000 +0300
+++ Python-3.7.0/Modules/_abc.c 2018-07-12 10:22:24.099663800 +0300
@@ -66,7 +66,7 @@
"Internal state held by ABC machinery.");
static PyTypeObject _abc_data_type = {
- PyVarObject_HEAD_INIT(&PyType_Type, 0)
+ PyVarObject_HEAD_INIT(NULL, 0)
"_abc_data", /*tp_name*/
sizeof(_abc_data), /*tp_size*/
.tp_dealloc = (destructor)abc_data_dealloc,

View File

@@ -0,0 +1,12 @@
diff -Naur Python-3.7.0-orig/Modules/makesetup Python-3.7.0/Modules/makesetup
--- Python-3.7.0-orig/Modules/makesetup 2018-06-27 06:07:35.000000000 +0300
+++ Python-3.7.0/Modules/makesetup 2018-07-12 10:22:57.639722700 +0300
@@ -233,7 +233,7 @@
case $doconfig in
no) cc="$cc \$(CCSHARED) \$(PY_CFLAGS) \$(PY_CPPFLAGS)";;
*)
- cc="$cc \$(PY_STDMODULE_CFLAGS)";;
+ cc="$cc \$(PY_CORE_CFLAGS)";;
esac
rule="$obj: $src; $cc $cpps -c $src -o $obj"
echo "$rule" >>$rulesf

View File

@@ -1,6 +1,6 @@
diff -Naur Python-3.4.3-orig/config.guess Python-3.4.3/config.guess
--- Python-3.4.3-orig/config.guess 2015-02-25 14:27:46.000000000 +0300
+++ Python-3.4.3/config.guess 2015-05-07 09:58:31.810000000 +0300
diff -Naur Python-3.7.0-orig/config.guess Python-3.7.0/config.guess
--- Python-3.7.0-orig/config.guess 2015-02-25 14:27:46.000000000 +0300
+++ Python-3.7.0/config.guess 2015-05-07 09:58:31.810000000 +0300
@@ -866,6 +866,9 @@
amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
echo x86_64-unknown-cygwin
@@ -8,8 +8,8 @@ diff -Naur Python-3.4.3-orig/config.guess Python-3.4.3/config.guess
+ amd64:MSYS*:*:* | x86_64:MSYS*:*:*)
+ echo x86_64-unknown-msys
+ exit ;;
p*:CYGWIN*:*)
echo powerpcle-unknown-cygwin
prep*:SunOS:5.*:*)
echo powerpcle-unknown-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`"
exit ;;
diff -Naur Python-3.6.0/configure.ac.orig Python-3.6.0/configure.ac
--- Python-3.6.0/configure.ac.orig 2017-02-08 09:14:49.544766100 -0500
@@ -51,13 +51,12 @@ diff -Naur Python-3.6.0/configure.ac.orig Python-3.6.0/configure.ac
enable_shared="yes";;
*)
enable_shared="no";;
@@ -1142,6 +1149,11 @@
BLDLIBRARY='-L. -lpython$(LDVERSION)'
@@ -1142,6 +1149,10 @@
LDLIBRARY='libpython$(LDVERSION).dll.a'
DLLLIBRARY='libpython$(LDVERSION).dll'
;;
+ MSYS*)
+ LDLIBRARY='libpython$(LDVERSION).dll.a'
+ BLDLIBRARY='-L. -lpython$(LDVERSION)'
+ DLLLIBRARY='msys-python$(LDVERSION).dll'
+ ;;
SunOS*)
@@ -156,9 +155,9 @@ diff -Naur Python-3.6.0/Lib/asyncio/base_events.py.orig Python-3.6.0/Lib/asyncio
sockets = []
if host == '':
hosts = [None]
diff -Naur Python-3.4.3-orig/Lib/ctypes/__init__.py Python-3.4.3/Lib/ctypes/__init__.py
--- Python-3.4.3-orig/Lib/ctypes/__init__.py 2015-05-07 09:55:34.078000000 +0300
+++ Python-3.4.3/Lib/ctypes/__init__.py 2015-05-07 09:58:31.825600000 +0300
diff -Naur Python-3.7.0-orig/Lib/ctypes/__init__.py Python-3.7.0/Lib/ctypes/__init__.py
--- Python-3.7.0-orig/Lib/ctypes/__init__.py 2015-05-07 09:55:34.078000000 +0300
+++ Python-3.7.0/Lib/ctypes/__init__.py 2015-05-07 09:58:31.825600000 +0300
@@ -1,6 +1,6 @@
"""create and manipulate C data types in Python"""
@@ -179,9 +178,9 @@ diff -Naur Python-3.4.3-orig/Lib/ctypes/__init__.py Python-3.4.3/Lib/ctypes/__in
else:
pythonapi = PyDLL(None)
diff -Naur Python-3.4.3-orig/Lib/ctypes/test/test_loading.py Python-3.4.3/Lib/ctypes/test/test_loading.py
--- Python-3.4.3-orig/Lib/ctypes/test/test_loading.py 2015-02-25 14:27:44.000000000 +0300
+++ Python-3.4.3/Lib/ctypes/test/test_loading.py 2015-05-07 09:58:31.841200000 +0300
diff -Naur Python-3.7.0-orig/Lib/ctypes/test/test_loading.py Python-3.7.0/Lib/ctypes/test/test_loading.py
--- Python-3.7.0-orig/Lib/ctypes/test/test_loading.py 2015-02-25 14:27:44.000000000 +0300
+++ Python-3.7.0/Lib/ctypes/test/test_loading.py 2015-05-07 09:58:31.841200000 +0300
@@ -13,6 +13,8 @@
libc_name = find_library("c")
elif sys.platform == "cygwin":
@@ -191,9 +190,9 @@ diff -Naur Python-3.4.3-orig/Lib/ctypes/test/test_loading.py Python-3.4.3/Lib/ct
else:
libc_name = find_library("c")
diff -Naur Python-3.4.3-orig/Lib/ctypes/util.py Python-3.4.3/Lib/ctypes/util.py
--- Python-3.4.3-orig/Lib/ctypes/util.py 2015-05-07 09:55:34.078000000 +0300
+++ Python-3.4.3/Lib/ctypes/util.py 2015-05-07 10:01:40.261800000 +0300
diff -Naur Python-3.7.0-orig/Lib/ctypes/util.py Python-3.7.0/Lib/ctypes/util.py
--- Python-3.7.0-orig/Lib/ctypes/util.py 2015-05-07 09:55:34.078000000 +0300
+++ Python-3.7.0/Lib/ctypes/util.py 2015-05-07 10:01:40.261800000 +0300
@@ -80,7 +80,7 @@
continue
return None
@@ -211,12 +210,12 @@ diff -Naur Python-3.4.3-orig/Lib/ctypes/util.py Python-3.4.3/Lib/ctypes/util.py
+ print(cdll.LoadLibrary("msys-bz2-1.dll"))
+ print(cdll.LoadLibrary("msys-crypt-0.dll"))
+ print(find_library("crypt"))
else:
print(cdll.LoadLibrary("libm.so"))
print(cdll.LoadLibrary("libcrypt.so"))
diff -Naur Python-3.4.3-orig/Lib/distutils/ccompiler.py Python-3.4.3/Lib/distutils/ccompiler.py
--- Python-3.4.3-orig/Lib/distutils/ccompiler.py 2015-02-25 14:27:44.000000000 +0300
+++ Python-3.4.3/Lib/distutils/ccompiler.py 2015-05-07 09:58:31.841200000 +0300
# issue-26439 - fix broken test call for AIX
elif sys.platform.startswith("aix"):
from ctypes import CDLL
diff -Naur Python-3.7.0-orig/Lib/distutils/ccompiler.py Python-3.7.0/Lib/distutils/ccompiler.py
--- Python-3.7.0-orig/Lib/distutils/ccompiler.py 2015-02-25 14:27:44.000000000 +0300
+++ Python-3.7.0/Lib/distutils/ccompiler.py 2015-05-07 09:58:31.841200000 +0300
@@ -926,6 +926,7 @@
# on a cygwin built python we can use gcc like an ordinary UNIXish
# compiler
@@ -234,39 +233,30 @@ diff -Naur Python-3.4.3-orig/Lib/distutils/ccompiler.py Python-3.4.3/Lib/distuti
'mingw32': ('cygwinccompiler', 'Mingw32CCompiler',
"Mingw32 port of GNU C Compiler for Win32"),
'bcpp': ('bcppcompiler', 'BCPPCompiler',
diff -Naur Python-3.4.3-orig/Lib/distutils/command/build_ext.py Python-3.4.3/Lib/distutils/command/build_ext.py
--- Python-3.4.3-orig/Lib/distutils/command/build_ext.py 2015-05-07 09:55:34.811200000 +0300
+++ Python-3.4.3/Lib/distutils/command/build_ext.py 2015-05-07 09:58:31.856800000 +0300
diff -Naur Python-3.7.0-orig/Lib/distutils/command/build_ext.py Python-3.7.0/Lib/distutils/command/build_ext.py
--- Python-3.7.0-orig/Lib/distutils/command/build_ext.py 2015-05-07 09:55:34.811200000 +0300
+++ Python-3.7.0/Lib/distutils/command/build_ext.py 2015-05-07 09:58:31.856800000 +0300
@@ -217,7 +217,7 @@
# for extensions under Cygwin and AtheOS Python's library directory must be
# For extensions under Cygwin, Python's library directory must be
# appended to library_dirs
- if sys.platform[:6] == 'cygwin' or sys.platform[:6] == 'atheos':
+ if sys.platform[:6] == 'cygwin' or sys.platform[:4] == 'msys' or sys.platform[:6] == 'atheos':
- if sys.platform[:6] == 'cygwin':
+ if sys.platform[:6] == 'cygwin' or sys.platform[:4] == 'msys':
if sys.executable.startswith(os.path.join(sys.exec_prefix, "bin")):
# building third party extensions
self.library_dirs.append(os.path.join(sys.prefix, "lib",
@@ -715,7 +715,7 @@
return ext.libraries + [pythonlib]
else:
return ext.libraries
- elif sys.platform[:6] == "cygwin":
+ elif sys.platform[:6] == "cygwin" or sys.platform[:4] == "msys":
template = "python%d.%d%s"
pythonlib = (template %
(sys.hexversion >> 24, (sys.hexversion >> 16) & 0xff, sys.abiflags))
diff -Naur Python-3.4.3-orig/Lib/distutils/cygwinccompiler.py Python-3.4.3/Lib/distutils/cygwinccompiler.py
--- Python-3.4.3-orig/Lib/distutils/cygwinccompiler.py 2015-05-07 09:55:43.001200000 +0300
+++ Python-3.4.3/Lib/distutils/cygwinccompiler.py 2015-05-07 09:58:31.856800000 +0300
diff -Naur Python-3.7.0-orig/Lib/distutils/cygwinccompiler.py Python-3.7.0/Lib/distutils/cygwinccompiler.py
--- Python-3.7.0-orig/Lib/distutils/cygwinccompiler.py 2015-05-07 09:55:43.001200000 +0300
+++ Python-3.7.0/Lib/distutils/cygwinccompiler.py 2015-05-07 09:58:31.856800000 +0300
@@ -400,4 +400,4 @@
def is_cygwingcc():
'''Try to determine if the gcc that would be used is from cygwin.'''
out_string = check_output(['gcc', '-dumpmachine'])
- return out_string.strip().endswith(b'cygwin')
+ return (out_string.strip().endswith(b'cygwin') or out_string.strip().endswith(b'msys'))
diff -Naur Python-3.4.3-orig/Lib/distutils/sysconfig.py Python-3.4.3/Lib/distutils/sysconfig.py
--- Python-3.4.3-orig/Lib/distutils/sysconfig.py 2015-05-07 09:55:46.604800000 +0300
+++ Python-3.4.3/Lib/distutils/sysconfig.py 2015-05-07 10:07:03.222600000 +0300
diff -Naur Python-3.7.0-orig/Lib/distutils/sysconfig.py Python-3.7.0/Lib/distutils/sysconfig.py
--- Python-3.7.0-orig/Lib/distutils/sysconfig.py 2015-05-07 09:55:46.604800000 +0300
+++ Python-3.7.0/Lib/distutils/sysconfig.py 2015-05-07 10:07:03.222600000 +0300
@@ -157,7 +157,7 @@
varies across Unices and is stored in Python's Makefile.
"""
@@ -285,9 +275,9 @@ diff -Naur Python-3.4.3-orig/Lib/distutils/sysconfig.py Python-3.4.3/Lib/distuti
if sys.platform == "darwin":
# Perform first-time customization of compiler-related
# config vars on OS X now that we know we need a compiler.
diff -Naur Python-3.4.3-orig/Lib/distutils/tests/support.py Python-3.4.3/Lib/distutils/tests/support.py
--- Python-3.4.3-orig/Lib/distutils/tests/support.py 2015-02-25 14:27:44.000000000 +0300
+++ Python-3.4.3/Lib/distutils/tests/support.py 2015-05-07 09:58:31.856800000 +0300
diff -Naur Python-3.7.0-orig/Lib/distutils/tests/support.py Python-3.7.0/Lib/distutils/tests/support.py
--- Python-3.7.0-orig/Lib/distutils/tests/support.py 2015-02-25 14:27:44.000000000 +0300
+++ Python-3.7.0/Lib/distutils/tests/support.py 2015-05-07 09:58:31.856800000 +0300
@@ -65,7 +65,7 @@
super().tearDown()
while self.tempdirs:
@@ -318,9 +308,9 @@ diff -Naur Python-3.6.0/Lib/distutils/unixccompiler.py.orig Python-3.6.0/Lib/dis
# MacOSX's linker doesn't understand the -R flag at all
return "-L" + dir
elif sys.platform[:7] == "freebsd":
diff -Naur Python-3.4.3-orig/Lib/distutils/util.py Python-3.4.3/Lib/distutils/util.py
--- Python-3.4.3-orig/Lib/distutils/util.py 2015-02-25 14:27:44.000000000 +0300
+++ Python-3.4.3/Lib/distutils/util.py 2015-05-07 09:58:31.872400000 +0300
diff -Naur Python-3.7.0-orig/Lib/distutils/util.py Python-3.7.0/Lib/distutils/util.py
--- Python-3.7.0-orig/Lib/distutils/util.py 2015-02-25 14:27:44.000000000 +0300
+++ Python-3.7.0/Lib/distutils/util.py 2015-05-07 09:58:31.872400000 +0300
@@ -97,6 +97,12 @@
m = rel_re.match(release)
if m:
@@ -346,9 +336,9 @@ diff -Naur Python-3.6.0/Lib/importlib/_bootstrap_external.py.orig Python-3.6.0/L
_CASE_INSENSITIVE_PLATFORMS = (_CASE_INSENSITIVE_PLATFORMS_BYTES_KEY
+ _CASE_INSENSITIVE_PLATFORMS_STR_KEY)
diff -Naur Python-3.4.3-orig/Lib/sysconfig.py Python-3.4.3/Lib/sysconfig.py
--- Python-3.4.3-orig/Lib/sysconfig.py 2015-02-25 14:27:44.000000000 +0300
+++ Python-3.4.3/Lib/sysconfig.py 2015-05-07 09:58:34.087600000 +0300
diff -Naur Python-3.7.0-orig/Lib/sysconfig.py Python-3.7.0/Lib/sysconfig.py
--- Python-3.7.0-orig/Lib/sysconfig.py 2015-02-25 14:27:44.000000000 +0300
+++ Python-3.7.0/Lib/sysconfig.py 2015-05-07 09:58:34.087600000 +0300
@@ -683,6 +683,13 @@
m = rel_re.match(release)
if m:
@@ -363,9 +353,9 @@ diff -Naur Python-3.4.3-orig/Lib/sysconfig.py Python-3.4.3/Lib/sysconfig.py
elif osname[:6] == "darwin":
import _osx_support
osname, release, machine = _osx_support.get_platform_osx(
diff -Naur Python-3.4.3-orig/Lib/tempfile.py Python-3.4.3/Lib/tempfile.py
--- Python-3.4.3-orig/Lib/tempfile.py 2015-02-25 14:27:44.000000000 +0300
+++ Python-3.4.3/Lib/tempfile.py 2015-05-07 09:58:35.086000000 +0300
diff -Naur Python-3.7.0-orig/Lib/tempfile.py Python-3.7.0/Lib/tempfile.py
--- Python-3.7.0-orig/Lib/tempfile.py 2015-02-25 14:27:44.000000000 +0300
+++ Python-3.7.0/Lib/tempfile.py 2015-05-07 09:58:35.086000000 +0300
@@ -557,7 +557,7 @@
_os.close(fd)
raise
@@ -375,9 +365,9 @@ diff -Naur Python-3.4.3-orig/Lib/tempfile.py Python-3.4.3/Lib/tempfile.py
# On non-POSIX and Cygwin systems, assume that we cannot unlink a file
# while it is open.
TemporaryFile = NamedTemporaryFile
diff -Naur Python-3.4.3-orig/Lib/test/test_curses.py Python-3.4.3/Lib/test/test_curses.py
--- Python-3.4.3-orig/Lib/test/test_curses.py 2015-02-25 14:27:45.000000000 +0300
+++ Python-3.4.3/Lib/test/test_curses.py 2015-05-07 09:58:35.086000000 +0300
diff -Naur Python-3.7.0-orig/Lib/test/test_curses.py Python-3.7.0/Lib/test/test_curses.py
--- Python-3.7.0-orig/Lib/test/test_curses.py 2015-02-25 14:27:45.000000000 +0300
+++ Python-3.7.0/Lib/test/test_curses.py 2015-05-07 09:58:35.086000000 +0300
@@ -40,6 +40,8 @@
"$TERM=%r, calling initscr() may cause exit" % term)
@unittest.skipIf(sys.platform == "cygwin",
@@ -387,9 +377,9 @@ diff -Naur Python-3.4.3-orig/Lib/test/test_curses.py Python-3.4.3/Lib/test/test_
class TestCurses(unittest.TestCase):
@classmethod
diff -Naur Python-3.4.3-orig/Lib/test/test_importlib/util.py Python-3.4.3/Lib/test/test_importlib/util.py
--- Python-3.4.3-orig/Lib/test/test_importlib/util.py 2015-02-25 14:27:45.000000000 +0300
+++ Python-3.4.3/Lib/test/test_importlib/util.py 2015-05-07 09:58:35.086000000 +0300
diff -Naur Python-3.7.0-orig/Lib/test/test_importlib/util.py Python-3.7.0/Lib/test/test_importlib/util.py
--- Python-3.7.0-orig/Lib/test/test_importlib/util.py 2015-02-25 14:27:45.000000000 +0300
+++ Python-3.7.0/Lib/test/test_importlib/util.py 2015-05-07 09:58:35.086000000 +0300
@@ -85,7 +85,7 @@
CASE_INSENSITIVE_FS = True
# Windows is the only OS that is *always* case-insensitive
@@ -399,9 +389,9 @@ diff -Naur Python-3.4.3-orig/Lib/test/test_importlib/util.py Python-3.4.3/Lib/te
changed_name = __file__.upper()
if changed_name == __file__:
changed_name = __file__.lower()
diff -Naur Python-3.4.3-orig/Lib/test/test_mailbox.py Python-3.4.3/Lib/test/test_mailbox.py
--- Python-3.4.3-orig/Lib/test/test_mailbox.py 2015-02-25 14:27:45.000000000 +0300
+++ Python-3.4.3/Lib/test/test_mailbox.py 2015-05-07 09:58:35.086000000 +0300
diff -Naur Python-3.7.0-orig/Lib/test/test_mailbox.py Python-3.7.0/Lib/test/test_mailbox.py
--- Python-3.7.0-orig/Lib/test/test_mailbox.py 2015-02-25 14:27:45.000000000 +0300
+++ Python-3.7.0/Lib/test/test_mailbox.py 2015-05-07 09:58:35.086000000 +0300
@@ -591,7 +591,7 @@
def setUp(self):
@@ -411,9 +401,9 @@ diff -Naur Python-3.4.3-orig/Lib/test/test_mailbox.py Python-3.4.3/Lib/test/test
self._box.colon = '!'
def assertMailboxEmpty(self):
diff -Naur Python-3.4.3-orig/Lib/test/test_netrc.py Python-3.4.3/Lib/test/test_netrc.py
--- Python-3.4.3-orig/Lib/test/test_netrc.py 2015-02-25 14:27:45.000000000 +0300
+++ Python-3.4.3/Lib/test/test_netrc.py 2015-05-07 09:58:35.117200000 +0300
diff -Naur Python-3.7.0-orig/Lib/test/test_netrc.py Python-3.7.0/Lib/test/test_netrc.py
--- Python-3.7.0-orig/Lib/test/test_netrc.py 2015-02-25 14:27:45.000000000 +0300
+++ Python-3.7.0/Lib/test/test_netrc.py 2015-05-07 09:58:35.117200000 +0300
@@ -8,7 +8,7 @@
def make_nrc(self, test_data):
test_data = textwrap.dedent(test_data)
@@ -423,9 +413,9 @@ diff -Naur Python-3.4.3-orig/Lib/test/test_netrc.py Python-3.4.3/Lib/test/test_n
mode += 't'
with open(temp_filename, mode) as fp:
fp.write(test_data)
diff -Naur Python-3.4.3-orig/Lib/test/test_shutil.py Python-3.4.3/Lib/test/test_shutil.py
--- Python-3.4.3-orig/Lib/test/test_shutil.py 2015-02-25 14:27:45.000000000 +0300
+++ Python-3.4.3/Lib/test/test_shutil.py 2015-05-07 09:58:35.117200000 +0300
diff -Naur Python-3.7.0-orig/Lib/test/test_shutil.py Python-3.7.0/Lib/test/test_shutil.py
--- Python-3.7.0-orig/Lib/test/test_shutil.py 2015-02-25 14:27:45.000000000 +0300
+++ Python-3.7.0/Lib/test/test_shutil.py 2015-05-07 09:58:35.117200000 +0300
@@ -97,7 +97,7 @@
super(TestShutil, self).tearDown()
while self.tempdirs:
@@ -444,9 +434,21 @@ diff -Naur Python-3.4.3-orig/Lib/test/test_shutil.py Python-3.4.3/Lib/test/test_
"This test can't be run on Cygwin (issue #1071513).")
@unittest.skipIf(hasattr(os, 'geteuid') and os.geteuid() == 0,
"This test can't be run reliably as root (issue #1076467).")
diff -Naur Python-3.4.3-orig/Lib/tkinter/test/test_tkinter/test_loadtk.py Python-3.4.3/Lib/tkinter/test/test_tkinter/test_loadtk.py
--- Python-3.4.3-orig/Lib/tkinter/test/test_tkinter/test_loadtk.py 2015-02-25 14:27:45.000000000 +0300
+++ Python-3.4.3/Lib/tkinter/test/test_tkinter/test_loadtk.py 2015-05-07 09:58:35.117200000 +0300
diff -Naur Python-3.7.0-orig/Lib/_pyio.py Python-3.7.0/Lib/_pyio.py
--- Python-3.7.0-orig/Lib/_pyio.py 2015-02-25 14:27:45.000000000 +0300
+++ Python-3.7.0/Lib/_pyio.py 2015-05-07 09:58:35.117200000 +0300
@@ -10,7 +10,7 @@
import sys
# Import _thread instead of threading to reduce startup cost
from _thread import allocate_lock as Lock
-if sys.platform in {'win32', 'cygwin'}:
+if sys.platform in {'win32', 'cygwin', 'msys'}:
from msvcrt import setmode as _setmode
else:
_setmode = None
diff -Naur Python-3.7.0-orig/Lib/tkinter/test/test_tkinter/test_loadtk.py Python-3.7.0/Lib/tkinter/test/test_tkinter/test_loadtk.py
--- Python-3.7.0-orig/Lib/tkinter/test/test_tkinter/test_loadtk.py 2015-02-25 14:27:45.000000000 +0300
+++ Python-3.7.0/Lib/tkinter/test/test_tkinter/test_loadtk.py 2015-05-07 09:58:35.117200000 +0300
@@ -18,7 +18,7 @@
def testLoadTkFailure(self):
@@ -456,9 +458,9 @@ diff -Naur Python-3.4.3-orig/Lib/tkinter/test/test_tkinter/test_loadtk.py Python
# no failure possible on windows?
# XXX Maybe on tk older than 8.4.13 it would be possible,
diff -Naur Python-3.4.3-orig/Modules/makesetup Python-3.4.3/Modules/makesetup
--- Python-3.4.3-orig/Modules/makesetup 2015-05-07 09:55:42.954400000 +0300
+++ Python-3.4.3/Modules/makesetup 2015-05-07 09:58:35.132800000 +0300
diff -Naur Python-3.7.0-orig/Modules/makesetup Python-3.7.0/Modules/makesetup
--- Python-3.7.0-orig/Modules/makesetup 2015-05-07 09:55:42.954400000 +0300
+++ Python-3.7.0/Modules/makesetup 2015-05-07 09:58:35.132800000 +0300
@@ -86,7 +86,7 @@
# Setup to link with extra libraries when making shared extensions.
# Currently, only Cygwin needs this baggage.
@@ -468,9 +470,9 @@ diff -Naur Python-3.4.3-orig/Modules/makesetup Python-3.4.3/Modules/makesetup
then
ExtraLibDir=.
else
diff -Naur Python-3.4.3-orig/setup.py Python-3.4.3/setup.py
--- Python-3.4.3-orig/setup.py 2015-05-07 09:55:33.329200000 +0300
+++ Python-3.4.3/setup.py 2015-05-07 09:58:35.132800000 +0300
diff -Naur Python-3.7.0-orig/setup.py Python-3.7.0/setup.py
--- Python-3.7.0-orig/setup.py 2015-05-07 09:55:33.329200000 +0300
+++ Python-3.7.0/setup.py 2015-05-07 09:58:35.132800000 +0300
@@ -361,7 +361,7 @@
# Workaround for Cygwin: Cygwin currently has fork issues when many
@@ -488,9 +490,9 @@ diff -Naur Python-3.4.3-orig/setup.py Python-3.4.3/setup.py
+ macros = dict()
+ libraries = []
+
elif host_platform in ('freebsd4', 'freebsd5', 'freebsd6', 'freebsd7', 'freebsd8'):
# FreeBSD's P1003.1b semaphore support is very experimental
# and has many known problems. (as of June 2008)
elif host_platform.startswith('openbsd'):
macros = dict()
libraries = []
@@ -2223,7 +2223,7 @@
return ext

View File

@@ -1,893 +0,0 @@
diff -Naur Python-3.4.2-orig/Modules/_ctypes/libffi/acinclude.m4 Python-3.4.2/Modules/_ctypes/libffi/acinclude.m4
--- Python-3.4.2-orig/Modules/_ctypes/libffi/acinclude.m4 2014-10-08 11:18:14.000000000 +0300
+++ Python-3.4.2/Modules/_ctypes/libffi/acinclude.m4 2014-11-10 01:37:49.606000000 +0300
@@ -37,7 +37,7 @@
# Systems known to be in this category are Windows (all variants),
# VMS, and Darwin.
case "$host_os" in
- vms* | cygwin* | pe | mingw* | darwin* | ultrix* | hpux10* | hpux11.00)
+ vms* | cygwin* | msys* | pe | mingw* | darwin* | ultrix* | hpux10* | hpux11.00)
ac_cv_func_mmap_dev_zero=no ;;
*)
ac_cv_func_mmap_dev_zero=yes;;
@@ -69,7 +69,7 @@
# above for use of /dev/zero.
# Systems known to be in this category are Windows, VMS, and SCO Unix.
case "$host_os" in
- vms* | cygwin* | pe | mingw* | sco* | udk* )
+ vms* | cygwin* | msys* | pe | mingw* | sco* | udk* )
ac_cv_func_mmap_anon=no ;;
*)
ac_cv_func_mmap_anon=yes;;
diff -Naur Python-3.4.2-orig/Modules/_ctypes/libffi/aclocal.m4 Python-3.4.2/Modules/_ctypes/libffi/aclocal.m4
--- Python-3.4.2-orig/Modules/_ctypes/libffi/aclocal.m4 2014-10-08 11:18:14.000000000 +0300
+++ Python-3.4.2/Modules/_ctypes/libffi/aclocal.m4 2014-11-10 01:37:49.606000000 +0300
@@ -725,7 +725,7 @@
beos*)
LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}load_add_on.la"
;;
-cygwin* | mingw* | os2* | pw32*)
+cygwin* | msys* | mingw* | os2* | pw32*)
AC_CHECK_DECLS([cygwin_conv_path], [], [], [[#include <sys/cygwin.h>]])
LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}loadlibrary.la"
;;
diff -Naur Python-3.4.2-orig/Modules/_ctypes/libffi/compile Python-3.4.2/Modules/_ctypes/libffi/compile
--- Python-3.4.2-orig/Modules/_ctypes/libffi/compile 2014-10-08 11:18:14.000000000 +0300
+++ Python-3.4.2/Modules/_ctypes/libffi/compile 2014-11-10 01:40:27.263200000 +0300
@@ -53,7 +53,7 @@
MINGW*)
file_conv=mingw
;;
- CYGWIN*)
+ CYGWIN*|MSYS*)
file_conv=cygwin
;;
*)
@@ -67,7 +67,7 @@
mingw/*)
file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'`
;;
- cygwin/*)
+ cygwin/*|msys/*)
file=`cygpath -m "$file" || echo "$file"`
;;
wine/*)
diff -Naur Python-3.4.2-orig/Modules/_ctypes/libffi/config.guess Python-3.4.2/Modules/_ctypes/libffi/config.guess
--- Python-3.4.2-orig/Modules/_ctypes/libffi/config.guess 2014-10-08 11:18:14.000000000 +0300
+++ Python-3.4.2/Modules/_ctypes/libffi/config.guess 2014-11-10 01:37:49.621600000 +0300
@@ -866,6 +866,9 @@
amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
echo x86_64-unknown-cygwin
exit ;;
+ amd64:MSYS*:*:* | x86_64:MSYS*:*:*)
+ echo x86_64-unknown-msys
+ exit ;;
p*:CYGWIN*:*)
echo powerpcle-unknown-cygwin
exit ;;
diff -Naur Python-3.4.2-orig/Modules/_ctypes/libffi/configure Python-3.4.2/Modules/_ctypes/libffi/configure
--- Python-3.4.2-orig/Modules/_ctypes/libffi/configure 2014-10-08 11:18:14.000000000 +0300
+++ Python-3.4.2/Modules/_ctypes/libffi/configure 2014-11-10 01:42:26.509600000 +0300
@@ -5876,7 +5876,7 @@
lt_cv_sys_max_cmd_len=-1;
;;
- cygwin* | mingw* | cegcc*)
+ cygwin* | msys* | mingw* | cegcc*)
# On Win9x/ME, this test blows up -- it succeeds, but takes
# about 5 minutes as the teststring grows exponentially.
# Worse, since 9x/ME are not pre-emptively multitasking,
@@ -6042,7 +6042,7 @@
*-*-mingw* ) # actually msys
lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
;;
- *-*-cygwin* )
+ *-*-cygwin* | *-*-msys* )
lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
;;
* ) # otherwise, assume *nix
@@ -6050,12 +6050,12 @@
;;
esac
;;
- *-*-cygwin* )
+ *-*-cygwin* | *-*-msys* )
case $build in
*-*-mingw* ) # actually msys
lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
;;
- *-*-cygwin* )
+ *-*-cygwin* | *-*-msys* )
lt_cv_to_host_file_cmd=func_convert_file_noop
;;
* ) # otherwise, assume *nix
@@ -6121,7 +6121,7 @@
esac
reload_cmds='$LD$reload_flag -o $output$reload_objs'
case $host_os in
- cygwin* | mingw* | pw32* | cegcc*)
+ cygwin* | msys* | mingw* | pw32* | cegcc*)
if test yes != "$GCC"; then
reload_cmds=false
fi
@@ -6279,7 +6279,7 @@
lt_cv_file_magic_test_file=/shlib/libc.so
;;
-cygwin*)
+cygwin* | msys*)
# func_win32_libid is a shell function defined in ltmain.sh
lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
lt_cv_file_magic_cmd='func_win32_libid'
@@ -6595,7 +6595,7 @@
lt_cv_sharedlib_from_linklib_cmd='unknown'
case $host_os in
-cygwin* | mingw* | pw32* | cegcc*)
+cygwin* | msys* | mingw* | pw32* | cegcc*)
# two different shell functions defined in ltmain.sh;
# decide which one to use based on capabilities of $DLLTOOL
case `$DLLTOOL --help 2>&1` in
@@ -7088,7 +7088,7 @@
aix*)
symcode='[BCDT]'
;;
-cygwin* | mingw* | pw32* | cegcc*)
+cygwin* | msys* | mingw* | pw32* | cegcc*)
symcode='[ABCDGISTW]'
;;
hpux*)
@@ -9288,7 +9288,7 @@
# PIC is the default for these OSes.
;;
- mingw* | cygwin* | pw32* | os2* | cegcc*)
+ mingw* | cygwin* | msys* | pw32* | os2* | cegcc*)
# This hack is so that the source file can tell whether it is being
# built for inclusion in a dll (and should export symbols for example).
# Although the cygwin gcc ignores -fPIC, still need this for old-style
@@ -9386,7 +9386,7 @@
esac
;;
- mingw* | cygwin* | pw32* | os2* | cegcc*)
+ mingw* | cygwin* | msys* | pw32* | os2* | cegcc*)
# This hack is so that the source file can tell whether it is being
# built for inclusion in a dll (and should export symbols for example).
lt_prog_compiler_pic='-DDLL_EXPORT'
@@ -9883,7 +9883,7 @@
extract_expsyms_cmds=
case $host_os in
- cygwin* | mingw* | pw32* | cegcc*)
+ cygwin* | msys* | mingw* | pw32* | cegcc*)
# FIXME: the MSVC++ port hasn't been tested in a loooong time
# When not using gcc, we currently assume that we are using
# Microsoft Visual C++.
@@ -9998,7 +9998,7 @@
fi
;;
- cygwin* | mingw* | pw32* | cegcc*)
+ cygwin* | msys* | mingw* | pw32* | cegcc*)
# _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless,
# as there is no search path for DLLs.
hardcode_libdir_flag_spec='-L$libdir'
@@ -10457,7 +10457,7 @@
export_dynamic_flag_spec=-rdynamic
;;
- cygwin* | mingw* | pw32* | cegcc*)
+ cygwin* | msys* | mingw* | pw32* | cegcc*)
# When not using gcc, we currently assume that we are using
# Microsoft Visual C++.
# hardcode_libdir_flag_spec is actually meaningless, as there is
@@ -11410,7 +11410,7 @@
# libtool to hard-code these into programs
;;
-cygwin* | mingw* | pw32* | cegcc*)
+cygwin* | msys* | mingw* | pw32* | cegcc*)
version_type=windows
shrext_cmds=.dll
need_version=no
@@ -11442,6 +11442,12 @@
sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"
;;
+ msys*)
+ # MSYS DLLs use 'msys-' prefix rather than 'lib'
+ soname_spec='`echo ${libname} | sed -e 's/^lib/msys-/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+
+ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"
+ ;;
mingw* | cegcc*)
# MinGW DLLs use traditional 'lib' prefix
soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
@@ -11476,7 +11482,7 @@
# Convert to MSYS style.
sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'`
;;
- cygwin*)
+ cygwin* | msys*)
# Convert to unix form, then to dos form, then back to unix form
# but this time dos style (no spaces!) so that the unix form looks
# like /cygdrive/c/PROGRA~1:/cygdr...
@@ -12135,7 +12141,7 @@
lt_cv_dlopen_libs=
;;
- cygwin*)
+ cygwin* | msys*)
lt_cv_dlopen=dlopen
lt_cv_dlopen_libs=
;;
@@ -13392,7 +13398,7 @@
esac
;;
- cygwin* | mingw* | pw32* | cegcc*)
+ cygwin* | msys* | mingw* | pw32* | cegcc*)
case $GXX,$cc_basename in
,cl* | no,cl*)
# Native MSVC
@@ -14419,7 +14425,7 @@
beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
# PIC is the default for these OSes.
;;
- mingw* | cygwin* | os2* | pw32* | cegcc*)
+ mingw* | cygwin* | msys* | os2* | pw32* | cegcc*)
# This hack is so that the source file can tell whether it is being
# built for inclusion in a dll (and should export symbols for example).
# Although the cygwin gcc ignores -fPIC, still need this for old-style
@@ -14489,7 +14495,7 @@
;;
esac
;;
- mingw* | cygwin* | os2* | pw32* | cegcc*)
+ mingw* | cygwin* | msys* | os2* | pw32* | cegcc*)
# This hack is so that the source file can tell whether it is being
# built for inclusion in a dll (and should export symbols for example).
lt_prog_compiler_pic_CXX='-DDLL_EXPORT'
@@ -14974,7 +14980,7 @@
pw32*)
export_symbols_cmds_CXX=$ltdll_cmds
;;
- cygwin* | mingw* | cegcc*)
+ cygwin* | msys* | mingw* | cegcc*)
case $cc_basename in
cl*)
exclude_expsyms_CXX='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
@@ -15243,7 +15249,7 @@
# libtool to hard-code these into programs
;;
-cygwin* | mingw* | pw32* | cegcc*)
+cygwin* | msys* | mingw* | pw32* | cegcc*)
version_type=windows
shrext_cmds=.dll
need_version=no
@@ -15274,6 +15280,11 @@
soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
;;
+ msys*)
+ # MSYS DLLs use 'msys-' prefix rather than 'lib'
+ soname_spec='`echo $libname | sed -e 's/^lib/msys-/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
+
+ ;;
mingw* | cegcc*)
# MinGW DLLs use traditional 'lib' prefix
soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
@@ -17056,7 +17067,7 @@
# Systems known to be in this category are Windows (all variants),
# VMS, and Darwin.
case "$host_os" in
- vms* | cygwin* | pe | mingw* | darwin* | ultrix* | hpux10* | hpux11.00)
+ vms* | cygwin* | msys* | pe | mingw* | darwin* | ultrix* | hpux10* | hpux11.00)
ac_cv_func_mmap_dev_zero=no ;;
*)
ac_cv_func_mmap_dev_zero=yes;;
@@ -17113,7 +17124,7 @@
# above for use of /dev/zero.
# Systems known to be in this category are Windows, VMS, and SCO Unix.
case "$host_os" in
- vms* | cygwin* | pe | mingw* | sco* | udk* )
+ vms* | cygwin* | msys* | pe | mingw* | sco* | udk* )
ac_cv_func_mmap_anon=no ;;
*)
ac_cv_func_mmap_anon=yes;;
@@ -17212,7 +17223,7 @@
i?86-*-freebsd* | i?86-*-openbsd*)
TARGET=X86_FREEBSD; TARGETDIR=x86
;;
- i?86-win32* | i?86-*-cygwin* | i?86-*-mingw* | i?86-*-os2* | i?86-*-interix*)
+ i?86-win32* | i?86-*-cygwin* | i?86-*-msys* | i?86-*-mingw* | i?86-*-os2* | i?86-*-interix*)
TARGET=X86_WIN32; TARGETDIR=x86
# All mingw/cygwin/win32 builds require -no-undefined for sharedlib.
# We must also check with_cross_host to decide if this is a native
@@ -17244,7 +17255,7 @@
TARGET=X86_DARWIN; TARGETDIR=x86
;;
- x86_64-*-cygwin* | x86_64-*-mingw*)
+ x86_64-*-cygwin* | x86_64-*-msys* | x86_64-*-mingw*)
TARGET=X86_WIN64; TARGETDIR=x86
# All mingw/cygwin/win32 builds require -no-undefined for sharedlib.
# We must also check with_cross_host to decide if this is a native
diff -Naur Python-3.4.2-orig/Modules/_ctypes/libffi/configure.ac Python-3.4.2/Modules/_ctypes/libffi/configure.ac
--- Python-3.4.2-orig/Modules/_ctypes/libffi/configure.ac 2014-10-08 11:18:14.000000000 +0300
+++ Python-3.4.2/Modules/_ctypes/libffi/configure.ac 2014-11-10 01:37:50.947600000 +0300
@@ -135,7 +135,7 @@
i?86-*-freebsd* | i?86-*-openbsd*)
TARGET=X86_FREEBSD; TARGETDIR=x86
;;
- i?86-win32* | i?86-*-cygwin* | i?86-*-mingw* | i?86-*-os2* | i?86-*-interix*)
+ i?86-win32* | i?86-*-cygwin* | i?86-*-msys* | i?86-*-mingw* | i?86-*-os2* | i?86-*-interix*)
TARGET=X86_WIN32; TARGETDIR=x86
# All mingw/cygwin/win32 builds require -no-undefined for sharedlib.
# We must also check with_cross_host to decide if this is a native
@@ -166,7 +166,7 @@
TARGET=X86_DARWIN; TARGETDIR=x86
;;
- x86_64-*-cygwin* | x86_64-*-mingw*)
+ x86_64-*-cygwin* | x86_64-*-msys* | x86_64-*-mingw*)
TARGET=X86_WIN64; TARGETDIR=x86
# All mingw/cygwin/win32 builds require -no-undefined for sharedlib.
# We must also check with_cross_host to decide if this is a native
diff -Naur Python-3.4.2-orig/Modules/_ctypes/libffi/ltmain.sh Python-3.4.2/Modules/_ctypes/libffi/ltmain.sh
--- Python-3.4.2-orig/Modules/_ctypes/libffi/ltmain.sh 2014-10-08 11:18:14.000000000 +0300
+++ Python-3.4.2/Modules/_ctypes/libffi/ltmain.sh 2014-11-10 01:44:06.412000000 +0300
@@ -2315,7 +2315,7 @@
test : = "$debug_cmd" || func_append preserve_args " --debug"
case $host in
- *cygwin* | *mingw* | *pw32* | *cegcc*)
+ *cygwin* | *msys* | *mingw* | *pw32* | *cegcc*)
# don't eliminate duplications in $postdeps and $predeps
opt_duplicate_compiler_generated_deps=:
;;
@@ -3328,7 +3328,7 @@
# On Cygwin there's no "real" PIC flag so we must build both object types
case $host_os in
- cygwin* | mingw* | pw32* | os2* | cegcc*)
+ cygwin* | msys* | mingw* | pw32* | os2* | cegcc*)
pic_mode=default
;;
esac
@@ -4201,7 +4201,7 @@
'exit $?'
tstripme=$stripme
case $host_os in
- cygwin* | mingw* | pw32* | cegcc*)
+ cygwin* | msys* | mingw* | pw32* | cegcc*)
case $realname in
*.dll.a)
tstripme=
@@ -4307,7 +4307,7 @@
# Do a test to see if this is really a libtool program.
case $host in
- *cygwin* | *mingw*)
+ *cygwin* | *msys* | *mingw*)
if func_ltwrapper_executable_p "$file"; then
func_ltwrapper_scriptname "$file"
wrapper=$func_ltwrapper_scriptname_result
@@ -4382,7 +4382,7 @@
# remove .exe since cygwin /usr/bin/install will append another
# one anyway
case $install_prog,$host in
- */usr/bin/install*,*cygwin*)
+ */usr/bin/install*,*cygwin*|*/usr/bin/install*,*msys*)
case $file:$destfile in
*.exe:*.exe)
# this is ok
@@ -4535,7 +4535,7 @@
$RM $export_symbols
eval "$SED -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
case $host in
- *cygwin* | *mingw* | *cegcc* )
+ *cygwin* | *msys* | *mingw* | *cegcc* )
eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"'
;;
@@ -4547,7 +4547,7 @@
eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T'
eval '$MV "$nlist"T "$nlist"'
case $host in
- *cygwin* | *mingw* | *cegcc* )
+ *cygwin* | *msys* | *mingw* | *cegcc* )
eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
eval 'cat "$nlist" >> "$output_objdir/$outputname.def"'
;;
@@ -4561,7 +4561,7 @@
func_basename "$dlprefile"
name=$func_basename_result
case $host in
- *cygwin* | *mingw* | *cegcc* )
+ *cygwin* | *msys* | *mingw* | *cegcc* )
# if an import library, we need to obtain dlname
if func_win32_import_lib_p "$dlprefile"; then
func_tr_sh "$dlprefile"
@@ -4736,7 +4736,7 @@
# Transform the symbol file into the correct name.
symfileobj=$output_objdir/${my_outputname}S.$objext
case $host in
- *cygwin* | *mingw* | *cegcc* )
+ *cygwin* | *msys* | *mingw* | *cegcc* )
if test -f "$output_objdir/$my_outputname.def"; then
compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"`
finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"`
@@ -5629,7 +5629,7 @@
{
EOF
case $host in
- *mingw* | *cygwin* )
+ *mingw* | *cygwin* | *msys* )
# make stdout use "unix" line endings
echo " setmode(1,_O_BINARY);"
;;
@@ -6350,7 +6350,7 @@
$debug_cmd
case $host in
- *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
+ *-*-cygwin* | *-*-msys* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
# It is impossible to link a dll without this setting, and
# we shouldn't force the makefile maintainer to figure out
# what system we are compiling for in order to pass an extra
@@ -6843,7 +6843,7 @@
;;
esac
case $host in
- *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
+ *-*-cygwin* | *-*-msys* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
testbindir=`$ECHO "$dir" | $SED 's*/lib$*/bin*'`
case :$dllsearchpath: in
*":$dir:"*) ;;
@@ -6863,7 +6863,7 @@
-l*)
if test X-lc = "X$arg" || test X-lm = "X$arg"; then
case $host in
- *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc* | *-*-haiku*)
+ *-*-cygwin* | *-*-msys* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc* | *-*-haiku*)
# These systems don't actually have a C or math library (as such)
continue
;;
@@ -6946,7 +6946,7 @@
-no-install)
case $host in
- *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin* | *-cegcc*)
+ *-*-cygwin* | *-*-msys* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin* | *-cegcc*)
# The PATH hackery in wrapper scripts is required on Windows
# and Darwin in order for the loader to find any dlls it needs.
func_warning "'-no-install' is ignored for $host"
@@ -7812,7 +7812,7 @@
fi
case $host in
# special handling for platforms with PE-DLLs.
- *cygwin* | *mingw* | *cegcc* )
+ *cygwin* | *msys* | *mingw* | *cegcc* )
# Linker will automatically link against shared library if both
# static and shared are present. Therefore, ensure we extract
# symbols from the import library if a shared library is present
@@ -7956,7 +7956,7 @@
if test -n "$library_names" &&
{ test no = "$use_static_libs" || test -z "$old_library"; }; then
case $host in
- *cygwin* | *mingw* | *cegcc*)
+ *cygwin* | *msys* | *mingw* | *cegcc*)
# No point in relinking DLLs because paths are not encoded
func_append notinst_deplibs " $lib"
need_relink=no
@@ -8026,7 +8026,7 @@
elif test -n "$soname_spec"; then
# bleh windows
case $host in
- *cygwin* | mingw* | *cegcc*)
+ *cygwin* | *msys* | mingw* | *cegcc*)
func_arith $current - $age
major=$func_arith_result
versuffix=-$major
@@ -8899,7 +8899,7 @@
if test yes = "$build_libtool_libs"; then
if test -n "$rpath"; then
case $host in
- *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc* | *-*-haiku*)
+ *-*-cygwin* | *-*-msys* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc* | *-*-haiku*)
# these systems don't actually have a c library (as such)!
;;
*-*-rhapsody* | *-*-darwin1.[012])
@@ -9413,7 +9413,7 @@
orig_export_symbols=
case $host_os in
- cygwin* | mingw* | cegcc*)
+ cygwin* | msys* | mingw* | cegcc*)
if test -n "$export_symbols" && test -z "$export_symbols_regex"; then
# exporting using user supplied symfile
func_dll_def_p "$export_symbols" || {
@@ -9970,7 +9970,7 @@
prog)
case $host in
- *cygwin*) func_stripname '' '.exe' "$output"
+ *cygwin* | *msys*) func_stripname '' '.exe' "$output"
output=$func_stripname_result.exe;;
esac
test -n "$vinfo" && \
@@ -10081,7 +10081,7 @@
esac
fi
case $host in
- *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
+ *-*-cygwin* | *-*-msys* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
testbindir=`$ECHO "$libdir" | $SED -e 's*/lib$*/bin*'`
case :$dllsearchpath: in
*":$libdir:"*) ;;
@@ -10159,7 +10159,7 @@
# Disable wrappers for cegcc and mingw32ce hosts, we are cross compiling anyway.
wrappers_required=false
;;
- *cygwin* | *mingw* )
+ *cygwin* | *msys* | *mingw* )
test yes = "$build_libtool_libs" || wrappers_required=false
;;
*)
@@ -10305,14 +10305,14 @@
esac
# test for cygwin because mv fails w/o .exe extensions
case $host in
- *cygwin*)
+ *cygwin* | *msys*)
exeext=.exe
func_stripname '' '.exe' "$outputname"
outputname=$func_stripname_result ;;
*) exeext= ;;
esac
case $host in
- *cygwin* | *mingw* )
+ *cygwin* | *msys* | *mingw* )
func_dirname_and_basename "$output" "" "."
output_name=$func_basename_result
output_path=$func_dirname_result
@@ -10644,7 +10644,7 @@
# tests/bindir.at for full details.
tdlname=$dlname
case $host,$output,$installed,$module,$dlname in
- *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll)
+ *cygwin*,*lai,yes,no,*.dll | *msys*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll)
# If a -bindir argument was supplied, place the dll there.
if test -n "$bindir"; then
func_relative_path "$install_libdir" "$bindir"
diff -Naur Python-3.4.2-orig/Modules/_ctypes/libffi/m4/libtool.m4 Python-3.4.2/Modules/_ctypes/libffi/m4/libtool.m4
--- Python-3.4.2-orig/Modules/_ctypes/libffi/m4/libtool.m4 2014-10-08 11:18:14.000000000 +0300
+++ Python-3.4.2/Modules/_ctypes/libffi/m4/libtool.m4 2014-11-10 01:44:49.608400000 +0300
@@ -1665,7 +1665,7 @@
lt_cv_sys_max_cmd_len=-1;
;;
- cygwin* | mingw* | cegcc*)
+ cygwin* | msys* | mingw* | cegcc*)
# On Win9x/ME, this test blows up -- it succeeds, but takes
# about 5 minutes as the teststring grows exponentially.
# Worse, since 9x/ME are not pre-emptively multitasking,
@@ -1913,7 +1913,7 @@
lt_cv_dlopen_libs=
;;
- cygwin*)
+ cygwin* | msys*)
lt_cv_dlopen=dlopen
lt_cv_dlopen_libs=
;;
@@ -2399,7 +2399,7 @@
# libtool to hard-code these into programs
;;
-cygwin* | mingw* | pw32* | cegcc*)
+cygwin* | msys* | mingw* | pw32* | cegcc*)
version_type=windows
shrext_cmds=.dll
need_version=no
@@ -2431,6 +2431,12 @@
m4_if([$1], [],[
sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"])
;;
+ msys*)
+ # MSYS DLLs use 'msys-' prefix rather than 'lib'
+ soname_spec='`echo ${libname} | sed -e 's/^lib/msys-/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
+m4_if([$1], [],[
+ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"])
+ ;;
mingw* | cegcc*)
# MinGW DLLs use traditional 'lib' prefix
soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
@@ -2465,7 +2471,7 @@
# Convert to MSYS style.
sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'`
;;
- cygwin*)
+ cygwin* | msys*)
# Convert to unix form, then to dos form, then back to unix form
# but this time dos style (no spaces!) so that the unix form looks
# like /cygdrive/c/PROGRA~1:/cygdr...
@@ -3203,7 +3209,7 @@
esac
reload_cmds='$LD$reload_flag -o $output$reload_objs'
case $host_os in
- cygwin* | mingw* | pw32* | cegcc*)
+ cygwin* | msys* | mingw* | pw32* | cegcc*)
if test yes != "$GCC"; then
reload_cmds=false
fi
@@ -3259,7 +3265,7 @@
lt_cv_file_magic_test_file=/shlib/libc.so
;;
-cygwin*)
+cygwin* | msys*)
# func_win32_libid is a shell function defined in ltmain.sh
lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
lt_cv_file_magic_cmd='func_win32_libid'
@@ -3564,7 +3570,7 @@
[lt_cv_sharedlib_from_linklib_cmd='unknown'
case $host_os in
-cygwin* | mingw* | pw32* | cegcc*)
+cygwin* | msys* | mingw* | pw32* | cegcc*)
# two different shell functions defined in ltmain.sh;
# decide which one to use based on capabilities of $DLLTOOL
case `$DLLTOOL --help 2>&1` in
@@ -3634,7 +3640,7 @@
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
LIBM=
case $host in
-*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*)
+*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-msys* | *-*-haiku* | *-*-pw32* | *-*-darwin*)
# These system don't have libm, or don't need it
;;
*-ncr-sysv4.3*)
@@ -3709,7 +3715,7 @@
aix*)
symcode='[[BCDT]]'
;;
-cygwin* | mingw* | pw32* | cegcc*)
+cygwin* | msys* | mingw* | pw32* | cegcc*)
symcode='[[ABCDGISTW]]'
;;
hpux*)
@@ -4015,7 +4021,7 @@
beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
# PIC is the default for these OSes.
;;
- mingw* | cygwin* | os2* | pw32* | cegcc*)
+ mingw* | cygwin* | msys* | os2* | pw32* | cegcc*)
# This hack is so that the source file can tell whether it is being
# built for inclusion in a dll (and should export symbols for example).
# Although the cygwin gcc ignores -fPIC, still need this for old-style
@@ -4086,7 +4092,7 @@
;;
esac
;;
- mingw* | cygwin* | os2* | pw32* | cegcc*)
+ mingw* | cygwin* | msys* | os2* | pw32* | cegcc*)
# This hack is so that the source file can tell whether it is being
# built for inclusion in a dll (and should export symbols for example).
m4_if([$1], [GCJ], [],
@@ -4334,7 +4340,7 @@
# PIC is the default for these OSes.
;;
- mingw* | cygwin* | pw32* | os2* | cegcc*)
+ mingw* | cygwin* | msys* | pw32* | os2* | cegcc*)
# This hack is so that the source file can tell whether it is being
# built for inclusion in a dll (and should export symbols for example).
# Although the cygwin gcc ignores -fPIC, still need this for old-style
@@ -4433,7 +4439,7 @@
esac
;;
- mingw* | cygwin* | pw32* | os2* | cegcc*)
+ mingw* | cygwin* | msys* | pw32* | os2* | cegcc*)
# This hack is so that the source file can tell whether it is being
# built for inclusion in a dll (and should export symbols for example).
m4_if([$1], [GCJ], [],
@@ -4699,7 +4705,7 @@
pw32*)
_LT_TAGVAR(export_symbols_cmds, $1)=$ltdll_cmds
;;
- cygwin* | mingw* | cegcc*)
+ cygwin* | msys* | mingw* | cegcc*)
case $cc_basename in
cl*)
_LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
@@ -4757,7 +4763,7 @@
extract_expsyms_cmds=
case $host_os in
- cygwin* | mingw* | pw32* | cegcc*)
+ cygwin* | msys* | mingw* | pw32* | cegcc*)
# FIXME: the MSVC++ port hasn't been tested in a loooong time
# When not using gcc, we currently assume that we are using
# Microsoft Visual C++.
@@ -4872,7 +4878,7 @@
fi
;;
- cygwin* | mingw* | pw32* | cegcc*)
+ cygwin* | msys* | mingw* | pw32* | cegcc*)
# _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
# as there is no search path for DLLs.
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
@@ -5247,7 +5253,7 @@
_LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
;;
- cygwin* | mingw* | pw32* | cegcc*)
+ cygwin* | msys* | mingw* | pw32* | cegcc*)
# When not using gcc, we currently assume that we are using
# Microsoft Visual C++.
# hardcode_libdir_flag_spec is actually meaningless, as there is
@@ -6241,7 +6247,7 @@
esac
;;
- cygwin* | mingw* | pw32* | cegcc*)
+ cygwin* | msys* | mingw* | pw32* | cegcc*)
case $GXX,$cc_basename in
,cl* | no,cl*)
# Native MSVC
@@ -7937,7 +7943,7 @@
*-*-mingw* ) # actually msys
lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
;;
- *-*-cygwin* )
+ *-*-cygwin* | *-*-msys* )
lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
;;
* ) # otherwise, assume *nix
@@ -7945,12 +7951,12 @@
;;
esac
;;
- *-*-cygwin* )
+ *-*-cygwin* | *-*-msys* )
case $build in
*-*-mingw* ) # actually msys
lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
;;
- *-*-cygwin* )
+ *-*-cygwin* | *-*-msys* )
lt_cv_to_host_file_cmd=func_convert_file_noop
;;
* ) # otherwise, assume *nix
diff -Naur Python-3.4.2-orig/Modules/_ctypes/libffi/m4/ltoptions.m4 Python-3.4.2/Modules/_ctypes/libffi/m4/ltoptions.m4
--- Python-3.4.2-orig/Modules/_ctypes/libffi/m4/ltoptions.m4 2014-10-08 11:18:14.000000000 +0300
+++ Python-3.4.2/Modules/_ctypes/libffi/m4/ltoptions.m4 2014-11-10 01:37:50.978800000 +0300
@@ -126,7 +126,7 @@
[enable_win32_dll=yes
case $host in
-*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*)
+*-*-cygwin* | *-*-msys* | *-*-mingw* | *-*-pw32* | *-*-cegcc*)
AC_CHECK_TOOL(AS, as, false)
AC_CHECK_TOOL(DLLTOOL, dlltool, false)
AC_CHECK_TOOL(OBJDUMP, objdump, false)
diff -Naur Python-3.4.2-orig/Modules/_ctypes/libffi/testsuite/lib/target-libpath.exp Python-3.4.2/Modules/_ctypes/libffi/testsuite/lib/target-libpath.exp
--- Python-3.4.2-orig/Modules/_ctypes/libffi/testsuite/lib/target-libpath.exp 2014-10-08 11:18:14.000000000 +0300
+++ Python-3.4.2/Modules/_ctypes/libffi/testsuite/lib/target-libpath.exp 2014-11-10 01:37:50.978800000 +0300
@@ -175,7 +175,7 @@
} else {
setenv DYLD_LIBRARY_PATH "$ld_library_path"
}
- if { [istarget *-*-cygwin*] || [istarget *-*-mingw*] } {
+ if { [istarget *-*-cygwin*] || [istarget *-*-msys*] || [istarget *-*-mingw*] } {
if { $orig_path_saved } {
setenv PATH "$ld_library_path:$orig_path"
} else {
@@ -271,7 +271,7 @@
if { [ istarget *-*-darwin* ] } {
set shlib_ext "dylib"
- } elseif { [ istarget *-*-cygwin* ] || [ istarget *-*-mingw* ] } {
+ } elseif { [ istarget *-*-cygwin* ] || [istarget *-*-msys*] || [ istarget *-*-mingw* ] } {
set shlib_ext "dll"
} elseif { [ istarget hppa*-*-hpux* ] } {
set shlib_ext "sl"
diff -Naur Python-3.4.2-orig/Modules/_ctypes/libffi/testsuite/libffi.call/cls_align_longdouble_split.c Python-3.4.2/Modules/_ctypes/libffi/testsuite/libffi.call/cls_align_longdouble_split.c
--- Python-3.4.2-orig/Modules/_ctypes/libffi/testsuite/libffi.call/cls_align_longdouble_split.c 2014-10-08 11:18:14.000000000 +0300
+++ Python-3.4.2/Modules/_ctypes/libffi/testsuite/libffi.call/cls_align_longdouble_split.c 2014-11-10 01:37:58.092400000 +0300
@@ -4,10 +4,10 @@
PR: none.
Originator: <hos@tamanegi.org> 20031203 */
-/* { dg-excess-errors "no long double format" { xfail x86_64-*-mingw* x86_64-*-cygwin* } } */
+/* { dg-excess-errors "no long double format" { xfail x86_64-*-mingw* x86_64-*-cygwin* x86_64-*-msys* } } */
/* { dg-do run { xfail strongarm*-*-* xscale*-*-* } } */
/* { dg-options -mlong-double-128 { target powerpc64*-*-linux* } } */
-/* { dg-output "" { xfail x86_64-*-mingw* x86_64-*-cygwin* } } */
+/* { dg-output "" { xfail x86_64-*-mingw* x86_64-*-cygwin* x86_64-*-msys* } } */
#include "ffitest.h"
diff -Naur Python-3.4.2-orig/Modules/_ctypes/libffi/testsuite/libffi.call/cls_align_longdouble_split2.c Python-3.4.2/Modules/_ctypes/libffi/testsuite/libffi.call/cls_align_longdouble_split2.c
--- Python-3.4.2-orig/Modules/_ctypes/libffi/testsuite/libffi.call/cls_align_longdouble_split2.c 2014-10-08 11:18:14.000000000 +0300
+++ Python-3.4.2/Modules/_ctypes/libffi/testsuite/libffi.call/cls_align_longdouble_split2.c 2014-11-10 01:37:58.092400000 +0300
@@ -5,10 +5,10 @@
Originator: Blake Chaffin 6/18/2007
*/
-/* { dg-excess-errors "no long double format" { xfail x86_64-*-mingw* x86_64-*-cygwin* } } */
+/* { dg-excess-errors "no long double format" { xfail x86_64-*-mingw* x86_64-*-cygwin* x86_64-*-msys* } } */
/* { dg-do run { xfail strongarm*-*-* } } */
/* { dg-options -mlong-double-128 { target powerpc64*-*-linux* } } */
-/* { dg-output "" { xfail x86_64-*-mingw* x86_64-*-cygwin* } } */
+/* { dg-output "" { xfail x86_64-*-mingw* x86_64-*-cygwin* x86_64-*-msys* } } */
#include "ffitest.h"
diff -Naur Python-3.4.2-orig/Modules/_ctypes/libffi/testsuite/libffi.call/cls_longdouble.c Python-3.4.2/Modules/_ctypes/libffi/testsuite/libffi.call/cls_longdouble.c
--- Python-3.4.2-orig/Modules/_ctypes/libffi/testsuite/libffi.call/cls_longdouble.c 2014-10-08 11:18:14.000000000 +0300
+++ Python-3.4.2/Modules/_ctypes/libffi/testsuite/libffi.call/cls_longdouble.c 2014-11-10 01:37:58.092400000 +0300
@@ -4,12 +4,12 @@
PR: none.
Originator: Blake Chaffin */
-/* { dg-excess-errors "no long double format" { xfail x86_64-*-mingw* x86_64-*-cygwin* } } */
+/* { dg-excess-errors "no long double format" { xfail x86_64-*-mingw* x86_64-*-cygwin* x86_64-*-msys* } } */
/* This test is known to PASS on armv7l-unknown-linux-gnueabihf, so I have
remove the xfail for arm*-*-* below, until we know more. */
/* { dg-do run { xfail strongarm*-*-* xscale*-*-* } } */
/* { dg-options -mlong-double-128 { target powerpc64*-*-linux* } } */
-/* { dg-output "" { xfail x86_64-*-mingw* x86_64-*-cygwin* } } */
+/* { dg-output "" { xfail x86_64-*-mingw* x86_64-*-cygwin* x86_64-*-msys* } } */
#include "ffitest.h"
diff -Naur Python-3.4.2-orig/Modules/_ctypes/libffi/testsuite/libffi.call/float2.c Python-3.4.2/Modules/_ctypes/libffi/testsuite/libffi.call/float2.c
--- Python-3.4.2-orig/Modules/_ctypes/libffi/testsuite/libffi.call/float2.c 2014-10-08 11:18:14.000000000 +0300
+++ Python-3.4.2/Modules/_ctypes/libffi/testsuite/libffi.call/float2.c 2014-11-10 01:38:03.458800000 +0300
@@ -4,8 +4,8 @@
PR: none.
Originator: From the original ffitest.c */
-/* { dg-excess-errors "fails" { target x86_64-*-mingw* x86_64-*-cygwin* } } */
-/* { dg-do run { xfail x86_64-*-mingw* x86_64-*-cygwin* } } */
+/* { dg-excess-errors "fails" { target x86_64-*-mingw* x86_64-*-cygwin* x86_64-*-msys* } } */
+/* { dg-do run { xfail x86_64-*-mingw* x86_64-*-cygwin* x86_64-*-msys* } } */
#include "ffitest.h"
#include "float.h"
diff -Naur Python-3.4.2-orig/Modules/_ctypes/libffi/testsuite/libffi.call/huge_struct.c Python-3.4.2/Modules/_ctypes/libffi/testsuite/libffi.call/huge_struct.c
--- Python-3.4.2-orig/Modules/_ctypes/libffi/testsuite/libffi.call/huge_struct.c 2014-10-08 11:18:14.000000000 +0300
+++ Python-3.4.2/Modules/_ctypes/libffi/testsuite/libffi.call/huge_struct.c 2014-11-10 01:38:03.458800000 +0300
@@ -5,11 +5,11 @@
Originator: Blake Chaffin 6/18/2007
*/
-/* { dg-excess-errors "" { target x86_64-*-mingw* x86_64-*-cygwin* } } */
+/* { dg-excess-errors "" { target x86_64-*-mingw* x86_64-*-cygwin* x86_64-*-msys* } } */
/* { dg-do run { xfail strongarm*-*-* xscale*-*-* } } */
/* { dg-options -mlong-double-128 { target powerpc64*-*-linux* } } */
/* { dg-options -Wformat=0 { target moxie*-*-elf } } */
-/* { dg-output "" { xfail x86_64-*-mingw* x86_64-*-cygwin* } } */
+/* { dg-output "" { xfail x86_64-*-mingw* x86_64-*-cygwin* x86_64-*-msys* } } */
#include "ffitest.h"
diff -Naur Python-3.4.2-orig/Modules/_ctypes/libffi/testsuite/libffi.call/return_ldl.c Python-3.4.2/Modules/_ctypes/libffi/testsuite/libffi.call/return_ldl.c
--- Python-3.4.2-orig/Modules/_ctypes/libffi/testsuite/libffi.call/return_ldl.c 2014-10-08 11:18:14.000000000 +0300
+++ Python-3.4.2/Modules/_ctypes/libffi/testsuite/libffi.call/return_ldl.c 2014-11-10 01:38:06.391600000 +0300
@@ -4,7 +4,7 @@
PR: none.
Originator: <andreast@gcc.gnu.org> 20071113 */
-/* { dg-do run { xfail x86_64-*-mingw* x86_64-*-cygwin* } } */
+/* { dg-do run { xfail x86_64-*-mingw* x86_64-*-cygwin* x86_64-*-msys* } } */
#include "ffitest.h"
static long double return_ldl(long double ldl)

View File

@@ -3,9 +3,9 @@
pkgbase=python3
pkgname=python
pkgver=3.6.6
pkgver=3.7.1
pkgrel=1
_pybasever=3.6
_pybasever=3.7
pkgdesc="Next generation of the python high-level scripting language"
arch=('i686' 'x86_64')
license=('custom')
@@ -23,110 +23,93 @@ source=(https://www.python.org/ftp/python/${pkgver%rc*}/Python-${pkgver}.tar.xz
004-3.4-ctypes-cygwin.patch
006-3.1-ncurses-abi6.patch
007-3.2-export-PySignal_SetWakeupFd.patch
008-3.4-distutils-soname.patch
009-3.2-distutils-shlibext.patch
010-3.6-pep3149-cygwin.patch
011-3.6-thread-cygwin64.patch
012-3.2-getpath-exe-extension.patch
013-3.4-select-cygwin.patch
014-3.4-signal-cygwin.patch
015-3.4-struct-cygwin.patch
016-3.6-ftm.patch
017-3.6-mpdec-cygwin.patch
018-3.7-_abs-module.patch
025-MINGW-compiler-customize-mingw-cygwin-compilers.patch
050-fix-building-core-modules.patch
900-msysize.patch
910-libffi-msys2.patch
920-allow-win-drives-in-os-path-isabs.patch
dont-make-libpython-readonly.patch
00155-avoid-ctypes-thunks.patch
00157-uid-gid-overflows.patch
00170-gc-assertions.patch
00178-dont-duplicate-flags-in-sysconfig.patch
00188-fix-lib2to3-tests-when-hashlib-doesnt-compile-properly.patch
00189-add-rewheel-module.patch
00206-remove-hf-from-arm-triplet.patch
00243-fix-mips64-triplet.patch
00252-add-executable-option.patch
00260-require-setuptools-dependencies.patch
00264-skip-test-failing-on-aarch64.patch
python3-powerppc-arch.patch
016-3.6-mpdec-cygwin.patch)
sha256sums=('d79bc15d456e73a3173a2938f18a17e5149c850ebdedf84a78067f501ee6e16f'
00170-gc-assertions.patch)
sha256sums=('fa7e2b8e8c9402f192ad56dc4f814089d1c4466c97d780f5e5acc02c04243d6d'
'de52e4722a6902e09dd6f343fdac0e7d45339f89386c8096b9c582c31aeb82e7'
'b5a787f02811f46800f98bf242448770492643a4431771bb4283e6ae97016263'
'4d7601b62e73c04553d22d480a873983a28b11df1f06be6898014453ce04afc3'
'edf33a790c7c0903b8edbc8e68baf91cf2d34c13e607503d1cc7f270186ea76c'
'8a138293fa5ad3a7522e00194994fecc8967c6a71822127391e4d756b2280e74'
'ff56bfe8dc1808484926c338fb5515d2d8cef36e95cc64d4940642a72276620f'
'23bbe23afe90d5085ba7c27956c2df4ceee2acdfdc1d06a289070f045003fa09'
'1ab20d38926aa85e638317620c29c484fcbbc228cd7cdf9543c29b750556d23f'
'7a7425b5fa28b7692bafff226981650748d7f40a42a711378b9a9c8b23a98060'
'6ead37259110c28b16e35e05c93c82b46aa0fbb5152ff61bdaf1eea5f1ad01da'
'f5b67408d39d3fda539ea90b12c48a05bd950b38460ec3e6a688e3377b071ed3'
'dba84d6a24a54a66d14e969fbbf366666a7376b667802bdf98f06d8ee1c91b8c'
'c09d3612d748852def0bcd1cb36dda7bd24366ed6b386743c800c7cb21eb0298'
'b1d5a000bd5c9ec0a54f79e5487901d950e7685c57f50a5cea1a87012c034b4c'
'4a6a4cdd0b3c8f0c3ae563005cc0a398d352c98bcb1826600f1ab4c3e0c24219'
'e668b749e5f0bc584262add2cd7fffb2f6f32393a14918029d791012eda930f3'
'30564663c1f2cd7d0d10a2b07eceb139534f17bc3a38dc8daafad0d5111e8bbc'
'505c736e35772835b06597de552217e4838052b759d1350b65b4cb079b6403f3'
'7c4774d40b18d5a4ef4f3e05d53cc2d4d0ca3d0f970b3af7f7164ac8be0a4c56'
'879ef890846d900132c4283ea65351b060bc4760ca40fbe5e80ba5acbe98370c'
'e3ef181333d5c9d20297849a46a68271a2190b7fc611c40c68c1ae240fa7ec36'
'c9510eea8d927f3ea1478b7e4f9f4dc652995a768fdfe85bc3f4083fa93fdc4f'
'5b1083e9b50e149d623d863dee38ac1fb8d142f1bb78c8a01dcb09bfd97f4118'
'c196e50e029016947db4470a1339af6899722754fe8f026627fd671230852b51'
'7e587d145db24fbee1c7c7b96a4d7f247d132315384d551005ffb39b51f41906'
'612736b2f9b3b9a2276440d1a5cbd968f51635e8fab6b9d89c2b34947fb67216'
'35bf549bca1147a2a596132639d94f7b3a40de774780933e6a7f7fd9b0d309e3'
'387a2b7931fb4958e2526991760d85677f44fa13cff0aeb0f41a267f1f7fd214'
'f8b15d7079bfa1707e5bea78f600a0fca2077c25428c2bac5793b19b408f276e'
'7a3f8f43b9c9eecb65d80b60c875344950a8b55082401830599d091548a3a985'
'13519ee9358cc5378b3fab60501b9db4d56e86d0b69da8b9841989d437492c7e'
'e70369c7096b8204b0af968679d493bf272996df637e53ca6fad4a236f1a2b02'
'4e7ce358f0650545ee9ae112b26cee4dce8f763eac5612f556e975ad38056fb8'
'd04b7bec35418c699358c8140a7213efe1a133772972715800b7a6101e0d699a'
'8c7ba55643635cc9dcfb57dec8cf4f50261bb2d5c169e82f991573e42400dd36'
'd61273d74f734bcdef933531cbd3cc77cf79b5826837cbd40cd48e5b1bc76072'
'f81a0a0907e65a00bff1a1ede4827a33984a6f2aee3aed2ce6a2423decdfd26d'
'735257fc216be2300b35dab8a97ff76199cc98d69b0bce36f099d476fb0f30e5'
'66d016758216565a4e69d81b44eb978518f572042a4afe1ee0a996158e59a983'
'843c26c4325f1d42f30f6e1fac5e6ff06122903bd37aa67683838ae49609e276'
'0de3e6e67d86f7e3593c504385399537b42920aca94329424cc8b1d65ae2ac4f'
'e3ef181333d5c9d20297849a46a68271a2190b7fc611c40c68c1ae240fa7ec36')
'd8170bb446e5f3022bcc0eeb49f01d7c880161f1e115f4606e34554bf5ad0314')
apply_patch_with_msg() {
for _patch in "$@"
do
msg2 "Applying $_patch"
patch -Nbp1 -i "${srcdir}/$_patch"
done
}
del_file_exists() {
for _fname in "$@"
do
if [ -f $_fname ]; then
rm -rf $_fname
fi
done
}
prepare() {
cd "${srcdir}/Python-${pkgver}"
# FS#23997
sed -i -e "s|^#.* /usr/local/bin/python|#!/usr/bin/python|" Lib/cgi.py
patch -p1 -i ${srcdir}/001-3.4-dbm-cygwin.patch
patch -p1 -i ${srcdir}/002-3.1-enable-new-dtags.patch
patch -p1 -i ${srcdir}/003-3.4-tkinter-cygwin.patch
patch -p1 -i ${srcdir}/004-3.4-ctypes-cygwin.patch
patch -p1 -i ${srcdir}/006-3.1-ncurses-abi6.patch
patch -p1 -i ${srcdir}/007-3.2-export-PySignal_SetWakeupFd.patch
patch -p1 -i ${srcdir}/008-3.4-distutils-soname.patch
patch -p1 -i ${srcdir}/009-3.2-distutils-shlibext.patch
patch -p1 -i ${srcdir}/010-3.6-pep3149-cygwin.patch
patch -p1 -i ${srcdir}/011-3.6-thread-cygwin64.patch
patch -p1 -i ${srcdir}/012-3.2-getpath-exe-extension.patch
patch -p1 -i ${srcdir}/013-3.4-select-cygwin.patch
patch -p1 -i ${srcdir}/014-3.4-signal-cygwin.patch
patch -p1 -i ${srcdir}/015-3.4-struct-cygwin.patch
patch -p2 -i ${srcdir}/016-3.6-ftm.patch
patch -p1 -i ${srcdir}/025-MINGW-compiler-customize-mingw-cygwin-compilers.patch
patch -p1 -i ${srcdir}/900-msysize.patch
patch -p1 -i ${srcdir}/910-libffi-msys2.patch
patch -p1 -i ${srcdir}/920-allow-win-drives-in-os-path-isabs.patch
apply_patch_with_msg \
001-3.4-dbm-cygwin.patch \
002-3.1-enable-new-dtags.patch \
003-3.4-tkinter-cygwin.patch \
004-3.4-ctypes-cygwin.patch \
006-3.1-ncurses-abi6.patch \
007-3.2-export-PySignal_SetWakeupFd.patch \
009-3.2-distutils-shlibext.patch \
010-3.6-pep3149-cygwin.patch \
011-3.6-thread-cygwin64.patch \
012-3.2-getpath-exe-extension.patch \
013-3.4-select-cygwin.patch \
016-3.6-ftm.patch \
017-3.6-mpdec-cygwin.patch \
018-3.7-_abs-module.patch \
025-MINGW-compiler-customize-mingw-cygwin-compilers.patch \
050-fix-building-core-modules.patch \
900-msysize.patch \
920-allow-win-drives-in-os-path-isabs.patch
#archlinux
patch -p1 -i ${srcdir}/dont-make-libpython-readonly.patch
apply_patch_with_msg dont-make-libpython-readonly.patch
#fedora
patch -p1 -i ${srcdir}/00155-avoid-ctypes-thunks.patch
patch -p1 -i ${srcdir}/00157-uid-gid-overflows.patch
patch -p1 -i ${srcdir}/00170-gc-assertions.patch
patch -p1 -i ${srcdir}/00178-dont-duplicate-flags-in-sysconfig.patch
patch -p1 -i ${srcdir}/00188-fix-lib2to3-tests-when-hashlib-doesnt-compile-properly.patch
patch -p1 -i ${srcdir}/00189-add-rewheel-module.patch
patch -p1 -i ${srcdir}/00206-remove-hf-from-arm-triplet.patch
patch -p1 -i ${srcdir}/00243-fix-mips64-triplet.patch
patch -p1 -i ${srcdir}/00252-add-executable-option.patch
patch -p1 -i ${srcdir}/00260-require-setuptools-dependencies.patch
patch -p1 -i ${srcdir}/00264-skip-test-failing-on-aarch64.patch
patch -p1 -i ${srcdir}/python3-powerppc-arch.patch
#PiotrVV
patch -p1 -i ${srcdir}/016-3.6-mpdec-cygwin.patch
apply_patch_with_msg \
00155-avoid-ctypes-thunks.patch \
00170-gc-assertions.patch
# Incomplete patch from Ray Donnelly
# patch -p1 -i ${srcdir}/3.3.2-allow-windows-paths-for-executable.patch
@@ -134,7 +117,6 @@ prepare() {
# Ensure that we are using the system copy of various libraries (expat, zlib and libffi),
# rather than copies shipped in the tarball
rm -r Modules/expat
rm -r Modules/zlib
rm -r Modules/_ctypes/{darwin,libffi}*
rm -r Modules/_decimal/libmpdec
autoreconf -fiv
@@ -158,11 +140,9 @@ build() {
--with-libm= \
--with-system-expat \
--with-system-ffi \
--with-threads \
--with-system-libmpdec \
--enable-loadable-sqlite-extensions \
--with-system-libmpdec \
--enable-loadable-sqlite-extensions \
--without-ensurepip \
ac_cv_func_bind_textdomain_codeset=yes
LC_CTYPE=en_US.UTF-8 make EXTRA_CFLAGS="$CFLAGS"

View File

@@ -1,30 +0,0 @@
diff -up Python-3.5.0/configure.ac.than Python-3.5.0/configure.ac
--- Python-3.5.0/configure.ac.than 2015-11-13 11:51:32.039560172 -0500
+++ Python-3.5.0/configure.ac 2015-11-13 11:52:11.670168157 -0500
@@ -841,9 +841,9 @@ cat >> conftest.c <<EOF
powerpc-linux-gnuspe
# elif defined(__powerpc64__)
# if defined(__LITTLE_ENDIAN__)
- powerpc64le-linux-gnu
+ ppc64le-linux-gnu
# else
- powerpc64-linux-gnu
+ ppc64-linux-gnu
# endif
# elif defined(__powerpc__)
powerpc-linux-gnu
diff -up Python-3.5.0/configure.than Python-3.5.0/configure
--- Python-3.5.0/configure.than 2015-11-13 12:13:19.039658399 -0500
+++ Python-3.5.0/configure 2015-11-13 12:13:35.199906857 -0500
@@ -5287,9 +5287,9 @@ cat >> conftest.c <<EOF
powerpc-linux-gnuspe
# elif defined(__powerpc64__)
# if defined(__LITTLE_ENDIAN__)
- powerpc64le-linux-gnu
+ ppc64le-linux-gnu
# else
- powerpc64-linux-gnu
+ ppc64-linux-gnu
# endif
# elif defined(__powerpc__)
powerpc-linux-gnu