pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/lang/python35



Module Name:    pkgsrc
Committed By:   wen
Date:           Thu Jan 19 13:55:53 UTC 2017

Modified Files:
        pkgsrc/lang/python35: Makefile PLIST dist.mk distinfo
        pkgsrc/lang/python35/patches: patch-Lib_distutils_unixccompiler.py
            patch-Makefile.pre.in patch-setup.py

Log Message:
Update to 3.5.3

Upstream changes:
What's New in Python 3.5.3?
===========================

Release date: 2017-01-16

There were no code changes between 3.5.3rc1 and 3.5.3 final.

What's New in Python 3.5.3 release candidate 1?
===============================================

Release date: 2017-01-02

Core and Builtins
-----------------

- Issue #29073: bytearray formatting no longer truncates on first null byte.

- Issue #28932: Do not include <sys/random.h> if it does not exist.

- Issue #28147: Fix a memory leak in split-table dictionaries: setattr()
  must not convert combined table into split table.

- Issue #25677: Correct the positioning of the syntax error caret for
  indented blocks.  Based on patch by Michael Layzell.

- Issue #29000: Fixed bytes formatting of octals with zero padding in alternate
  form.

- Issue #28512: Fixed setting the offset attribute of SyntaxError by
  PyErr_SyntaxLocationEx() and PyErr_SyntaxLocationObject().

- Issue #28991:  functools.lru_cache() was susceptible to an obscure reentrancy
  bug caused by a monkey-patched len() function.

- Issue #28648: Fixed crash in Py_DecodeLocale() in debug build on Mac OS X
  when decode astral characters.  Patch by Xiang Zhang.

- Issue #19398: Extra slash no longer added to sys.path components in case of
  empty compile-time PYTHONPATH components.

- Issue #28426: Fixed potential crash in PyUnicode_AsDecodedObject() in debug
  build.

- Issue #23782: Fixed possible memory leak in _PyTraceback_Add() and exception
  loss in PyTraceBack_Here().

- Issue #28379: Added sanity checks and tests for PyUnicode_CopyCharacters().
  Patch by Xiang Zhang.

- Issue #28376: The type of long range iterator is now registered as Iterator.
  Patch by Oren Milman.

- Issue #28376: The constructor of range_iterator now checks that step is not 0.
  Patch by Oren Milman.

- Issue #26906: Resolving special methods of uninitialized type now causes
  implicit initialization of the type instead of a fail.

- Issue #18287: PyType_Ready() now checks that tp_name is not NULL.
  Original patch by Niklas Koep.

- Issue #24098: Fixed possible crash when AST is changed in process of
  compiling it.

- Issue #28350: String constants with null character no longer interned.

- Issue #26617: Fix crash when GC runs during weakref callbacks.

- Issue #27942: String constants now interned recursively in tuples and frozensets.

- Issue #21578: Fixed misleading error message when ImportError called with
  invalid keyword args.

- Issue #28203: Fix incorrect type in error message from
  ``complex(1.0, {2:3})``. Patch by Soumya Sharma.

- Issue #27955: Fallback on reading /dev/urandom device when the getrandom()
  syscall fails with EPERM, for example when blocked by SECCOMP.

- Issue #28131: Fix a regression in zipimport's compile_source().  zipimport
  should use the same optimization level as the interpreter.

- Issue #25221: Fix corrupted result from PyLong_FromLong(0) when
  Python is compiled with NSMALLPOSINTS = 0.

- Issue #25758: Prevents zipimport from unnecessarily encoding a filename
  (patch by Eryk Sun)

- Issue #28189: dictitems_contains no longer swallows compare errors.
  (Patch by Xiang Zhang)

- Issue #27812: Properly clear out a generator's frame's backreference to the
  generator to prevent crashes in frame.clear().

- Issue #27811: Fix a crash when a coroutine that has not been awaited is
  finalized with warnings-as-errors enabled.

- Issue #27587: Fix another issue found by PVS-Studio: Null pointer check
  after use of 'def' in _PyState_AddModule().
  Initial patch by Christian Heimes.

- Issue #26020: set literal evaluation order did not match documented behaviour.

- Issue #27782: Multi-phase extension module import now correctly allows the
  ``m_methods`` field to be used to add module level functions to instances
  of non-module types returned from ``Py_create_mod``. Patch by Xiang Zhang.

- Issue #27936: The round() function accepted a second None argument
  for some types but not for others.  Fixed the inconsistency by
  accepting None for all numeric types.

- Issue #27487: Warn if a submodule argument to "python -m" or
  runpy.run_module() is found in sys.modules after parent packages are
  imported, but before the submodule is executed.

- Issue #27558: Fix a SystemError in the implementation of "raise" statement.
  In a brand new thread, raise a RuntimeError since there is no active
  exception to reraise. Patch written by Xiang Zhang.

- Issue #27419: Standard __import__() no longer look up "__import__" in globals
  or builtins for importing submodules or "from import".  Fixed handling an
  error of non-string package name.

- Issue #27083: Respect the PYTHONCASEOK environment variable under Windows.

- Issue #27514: Make having too many statically nested blocks a SyntaxError
  instead of SystemError.

- Issue #27473: Fixed possible integer overflow in bytes and bytearray
  concatenations.  Patch by Xiang Zhang.

- Issue #27507: Add integer overflow check in bytearray.extend().  Patch by
  Xiang Zhang.

- Issue #27581: Don't rely on wrapping for overflow check in
  PySequence_Tuple().  Patch by Xiang Zhang.

- Issue #27443: __length_hint__() of bytearray iterators no longer return a
  negative integer for a resized bytearray.

- Issue #27942: Fix memory leak in codeobject.c

Library
-------

- Issue #15812: inspect.getframeinfo() now correctly shows the first line of
  a context.  Patch by Sam Breese.

- Issue #29094: Offsets in a ZIP file created with extern file object and modes
  "w" and "x" now are relative to the start of the file.

- Issue #13051: Fixed recursion errors in large or resized
  curses.textpad.Textbox.  Based on patch by Tycho Andersen.

- Issue #29119: Fix weakrefs in the pure python version of
  collections.OrderedDict move_to_end() method.
  Contributed by Andra Bogildea.

- Issue #9770: curses.ascii predicates now work correctly with negative
  integers.

- Issue #28427: old keys should not remove new values from
  WeakValueDictionary when collecting from another thread.

- Issue 28923: Remove editor artifacts from Tix.py.

- Issue #28871: Fixed a crash when deallocate deep ElementTree.

- Issue #19542: Fix bugs in WeakValueDictionary.setdefault() and
  WeakValueDictionary.pop() when a GC collection happens in another
  thread.

- Issue #20191: Fixed a crash in resource.prlimit() when pass a sequence that
  doesn't own its elements as limits.

- Issue #28779: multiprocessing.set_forkserver_preload() would crash the
  forkserver process if a preloaded module instantiated some
  multiprocessing objects such as locks.

- Issue #28847: dbm.dumb now supports reading read-only files and no longer
  writes the index file when it is not changed.

- Issue #25659: In ctypes, prevent a crash calling the from_buffer() and
  from_buffer_copy() methods on abstract classes like Array.

- Issue #28732: Fix crash in os.spawnv() with no elements in args

- Issue #28485: Always raise ValueError for negative
  compileall.compile_dir(workers=...) parameter, even when multithreading is
  unavailable.

- Issue #28387: Fixed possible crash in _io.TextIOWrapper deallocator when
  the garbage collector is invoked in other thread.  Based on patch by
  Sebastian Cufre.

- Issue #27517: LZMA compressor and decompressor no longer raise exceptions if
  given empty data twice.  Patch by Benjamin Fogle.

- Issue #28549: Fixed segfault in curses's addch() with ncurses6.

- Issue #28449: tarfile.open() with mode "r" or "r:" now tries to open a tar
  file with compression before trying to open it without compression.  Otherwise
  it had 50% chance failed with ignore_zeros=True.

- Issue #23262: The webbrowser module now supports Firefox 36+ and derived
  browsers.  Based on patch by Oleg Broytman.

- Issue #27939: Fixed bugs in tkinter.ttk.LabeledScale and tkinter.Scale caused
  by representing the scale as float value internally in Tk.  tkinter.IntVar
  now works if float value is set to underlying Tk variable.

- Issue #28255: calendar.TextCalendar().prmonth() no longer prints a space
  at the start of new line after printing a month's calendar.  Patch by
  Xiang Zhang.

- Issue #20491: The textwrap.TextWrapper class now honors non-breaking spaces.
  Based on patch by Kaarle Ritvanen.

- Issue #28353: os.fwalk() no longer fails on broken links.

- Issue #25464: Fixed HList.header_exists() in tkinter.tix module by addin
  a workaround to Tix library bug.

- Issue #28488: shutil.make_archive() no longer add entry "./" to ZIP archive.

- Issue #24452: Make webbrowser support Chrome on Mac OS X.

- Issue #20766: Fix references leaked by pdb in the handling of SIGINT
  handlers.

- Issue #26293: Fixed writing ZIP files that starts not from the start of the
  file.  Offsets in ZIP file now are relative to the start of the archive in
  conforming to the specification.

- Issue #28321: Fixed writing non-BMP characters with binary format in plistlib.

- Issue #28322: Fixed possible crashes when unpickle itertools objects from
  incorrect pickle data.  Based on patch by John Leitch.

- Fix possible integer overflows and crashes in the mmap module with unusual
  usage patterns.

- Issue #1703178: Fix the ability to pass the --link-objects option to the
  distutils build_ext command.

- Issue #28253: Fixed calendar functions for extreme months: 0001-01
  and 9999-12.

  Methods itermonthdays() and itermonthdays2() are reimplemented so
  that they don't call itermonthdates() which can cause datetime.date
  under/overflow.

- Issue #28275: Fixed possible use after free in the decompress()
  methods of the LZMADecompressor and BZ2Decompressor classes.
  Original patch by John Leitch.

- Issue #27897: Fixed possible crash in sqlite3.Connection.create_collation()
  if pass invalid string-like object as a name.  Patch by Xiang Zhang.

- Issue #18893: Fix invalid exception handling in Lib/ctypes/macholib/dyld.py.
  Patch by Madison May.

- Issue #27611: Fixed support of default root window in the tkinter.tix module.

- Issue #27348: In the traceback module, restore the formatting of exception
  messages like "Exception: None".  This fixes a regression introduced in
  3.5a2.

- Issue #25651: Allow falsy values to be used for msg parameter of subTest().

- Issue #27932: Prevent memory leak in win32_ver().

- Fix UnboundLocalError in socket._sendfile_use_sendfile.

- Issue #28075: Check for ERROR_ACCESS_DENIED in Windows implementation of
  os.stat().  Patch by Eryk Sun.

- Issue #25270: Prevent codecs.escape_encode() from raising SystemError when
  an empty bytestring is passed.

- Issue #28181: Get antigravity over HTTPS. Patch by Kaartic Sivaraam.

- Issue #25895: Enable WebSocket URL schemes in urllib.parse.urljoin.
  Patch by Gergely Imreh and Markus Holtermann.

- Issue #27599: Fixed buffer overrun in binascii.b2a_qp() and binascii.a2b_qp().

- Issue #19003:m email.generator now replaces only \r and/or \n line
  endings, per the RFC, instead of all unicode line endings.

- Issue #28019: itertools.count() no longer rounds non-integer step in range
  between 1.0 and 2.0 to 1.

- Issue #25969: Update the lib2to3 grammar to handle the unpacking
  generalizations added in 3.5.

- Issue #14977: mailcap now respects the order of the lines in the mailcap
  files ("first match"), as required by RFC 1542.  Patch by Michael Lazar.

- Issue #24594: Validates persist parameter when opening MSI database

- Issue #17582: xml.etree.ElementTree nows preserves whitespaces in attributes
  (Patch by Duane Griffin.  Reviewed and approved by Stefan Behnel.)

- Issue #28047: Fixed calculation of line length used for the base64 CTE
  in the new email policies.

- Issue #27445: Don't pass str(_charset) to MIMEText.set_payload().
  Patch by Claude Paroz.

- Issue #22450: urllib now includes an "Accept: */*" header among the
  default headers.  This makes the results of REST API requests more
  consistent and predictable especially when proxy servers are involved.

- lib2to3.pgen3.driver.load_grammar() now creates a stable cache file
  between runs given the same Grammar.txt input regardless of the hash
  randomization setting.

- Issue #27570: Avoid zero-length memcpy() etc calls with null source
  pointers in the "ctypes" and "array" modules.

- Issue #22233: Break email header lines *only* on the RFC specified CR and LF
  characters, not on arbitrary unicode line breaks.  This also fixes a bug in
  HTTP header parsing.

- Issue 27988: Fix email iter_attachments incorrect mutation of payload list.

- Issue #27691: Fix ssl module's parsing of GEN_RID subject alternative name
  fields in X.509 certs.

- Issue #27850: Remove 3DES from ssl module's default cipher list to counter
  measure sweet32 attack (CVE-2016-2183).

- Issue #27766: Add ChaCha20 Poly1305 to ssl module's default ciper list.
  (Required OpenSSL 1.1.0 or LibreSSL).

- Issue #26470: Port ssl and hashlib module to OpenSSL 1.1.0.

- Remove support for passing a file descriptor to os.access. It never worked but
  previously didn't raise.

- Issue #12885: Fix error when distutils encounters symlink.

- Issue #27881: Fixed possible bugs when setting sqlite3.Connection.isolation_level.
  Based on patch by Xiang Zhang.

- Issue #27861: Fixed a crash in sqlite3.Connection.cursor() when a factory
  creates not a cursor.  Patch by Xiang Zhang.

- Issue #19884: Avoid spurious output on OS X with Gnu Readline.

- Issue #27706: Restore deterministic behavior of random.Random().seed()
  for string seeds using seeding version 1.  Allows sequences of calls
  to random() to exactly match those obtained in Python 2.
  Patch by Nofar Schnider.

- Issue #10513: Fix a regression in Connection.commit().  Statements should
  not be reset after a commit.

- A new version of typing.py from https://github.com/python/typing:
  - Collection (only for 3.6) (Issue #27598)
  - Add FrozenSet to __all__ (upstream #261)
  - fix crash in _get_type_vars() (upstream #259)
  - Remove the dict constraint in ForwardRef._eval_type (upstream #252)

- Issue #27539: Fix unnormalised ``Fraction.__pow__`` result in the case
  of negative exponent and negative base.

- Issue #21718: cursor.description is now available for queries using CTEs.

- Issue #2466: posixpath.ismount now correctly recognizes mount points which
  the user does not have permission to access.

- Issue #27773: Correct some memory management errors server_hostname in
  _ssl.wrap_socket().

- Issue #26750: unittest.mock.create_autospec() now works properly for
  subclasses of property() and other data descriptors.

- In the curses module, raise an error if window.getstr() or window.instr() is
  passed a negative value.

- Issue #27783: Fix possible usage of uninitialized memory in
  operator.methodcaller.

- Issue #27774: Fix possible Py_DECREF on unowned object in _sre.

- Issue #27760: Fix possible integer overflow in binascii.b2a_qp.

- Issue #27758: Fix possible integer overflow in the _csv module for large
  record lengths.

- Issue #27568: Prevent HTTPoxy attack (CVE-2016-1000110). Ignore the
  HTTP_PROXY variable when REQUEST_METHOD environment is set, which indicates
  that the script is in CGI mode.

- Issue #27656: Do not assume sched.h defines any SCHED_* constants.

- Issue #27130: In the "zlib" module, fix handling of large buffers
  (typically 4 GiB) when compressing and decompressing.  Previously, inputs
  were limited to 4 GiB, and compression and decompression operations did not
  properly handle results of 4 GiB.

- Issue #27533: Release GIL in nt._isdir

- Issue #17711: Fixed unpickling by the persistent ID with protocol 0.
  Original patch by Alexandre Vassalotti.

- Issue #27522: Avoid an unintentional reference cycle in email.feedparser.

- Issue #26844: Fix error message for imp.find_module() to refer to 'path'
  instead of 'name'. Patch by Lev Maximov.

- Issue #23804: Fix SSL zero-length recv() calls to not block and not raise
  an error about unclean EOF.

- Issue #27466: Change time format returned by http.cookie.time2netscape,
  confirming the netscape cookie format and making it consistent with
  documentation.

- Issue #26664: Fix activate.fish by removing mis-use of ``$``.

- Issue #22115: Fixed tracing Tkinter variables: trace_vdelete() with wrong
  mode no longer break tracing, trace_vinfo() now always returns a list of
  pairs of strings, tracing in the "u" mode now works.

- Fix a scoping issue in importlib.util.LazyLoader which triggered an
  UnboundLocalError when lazy-loading a module that was already put into
  sys.modules.

- Issue #27079: Fixed curses.ascii functions isblank(), iscntrl() and ispunct().

- Issue #26754: Some functions (compile() etc) accepted a filename argument
  encoded as an iterable of integers. Now only strings and byte-like objects
  are accepted.

- Issue #27048: Prevents distutils failing on Windows when environment
  variables contain non-ASCII characters

- Issue #27330: Fixed possible leaks in the ctypes module.

- Issue #27238: Got rid of bare excepts in the turtle module.  Original patch
  by Jelle Zijlstra.

- Issue #27122: When an exception is raised within the context being managed
  by a contextlib.ExitStack() and one of the exit stack generators
  catches and raises it in a chain, do not re-raise the original exception
  when exiting, let the new chained one through.  This avoids the PEP 479
  bug described in issue25782.

- [Security] Issue #27278: Fix os.urandom() implementation using getrandom() on
  Linux.  Truncate size to INT_MAX and loop until we collected enough random
  bytes, instead of casting a directly Py_ssize_t to int.

- Issue #26386: Fixed ttk.TreeView selection operations with item id's
  containing spaces.

- [Security] Issue #22636: Avoid shell injection problems with
  ctypes.util.find_library().

- Issue #16182: Fix various functions in the "readline" module to use the
  locale encoding, and fix get_begidx() and get_endidx() to return code point
  indexes.

- Issue #27392: Add loop.connect_accepted_socket().
  Patch by Jim Fulton.

- Issue #27930: Improved behaviour of logging.handlers.QueueListener.
  Thanks to Paulo Andrade and Petr Viktorin for the analysis and patch.

- Issue #21201: Improves readability of multiprocessing error message.  Thanks
  to Wojciech Walczak for patch.

- Issue #27456: asyncio: Set TCP_NODELAY by default.

- Issue #27906: Fix socket accept exhaustion during high TCP traffic.
  Patch by Kevin Conway.

- Issue #28174: Handle when SO_REUSEPORT isn't properly supported.
  Patch by Seth Michael Larson.

- Issue #26654: Inspect functools.partial in asyncio.Handle.__repr__.
  Patch by iceboy.

- Issue #26909: Fix slow pipes IO in asyncio.
  Patch by INADA Naoki.

- Issue #28176: Fix callbacks race in asyncio.SelectorLoop.sock_connect.

- Issue #27759: Fix selectors incorrectly retain invalid file descriptors.
  Patch by Mark Williams.

- Issue #28368: Refuse monitoring processes if the child watcher has
  no loop attached.
  Patch by Vincent Michel.

- Issue #28369: Raise RuntimeError when transport's FD is used with
  add_reader, add_writer, etc.

- Issue #28370: Speedup asyncio.StreamReader.readexactly.
  Patch by ▒<9A>о▒<80>енбе▒<80>г ▒<9C>а▒<80>к.

- Issue #28371: Deprecate passing asyncio.Handles to run_in_executor.

- Issue #28372: Fix asyncio to support formatting of non-python coroutines.

- Issue #28399: Remove UNIX socket from FS before binding.
  Patch by ▒<9A>о▒<80>енбе▒<80>г ▒<9C>а▒<80>к.

- Issue #27972: Prohibit Tasks to await on themselves.

- Issue #26923: Fix asyncio.Gather to refuse being cancelled once all
  children are done.
  Patch by Johannes Ebke.

- Issue #26796: Don't configure the number of workers for default
  threadpool executor.
  Initial patch by Hans Lawrenz.

- Issue #28600: Optimize loop.call_soon().

- Issue #28613: Fix get_event_loop() return the current loop if
  called from coroutines/callbacks.

- Issue #28639: Fix inspect.isawaitable to always return bool
  Patch by Justin Mayfield.

- Issue #28652: Make loop methods reject socket kinds they do not support.

- Issue #28653: Fix a refleak in functools.lru_cache.

- Issue #28703: Fix asyncio.iscoroutinefunction to handle Mock objects.

- Issue #24142: Reading a corrupt config file left the parser in an
  invalid state.  Original patch by Florian Höch.

- Issue #28990: Fix SSL hanging if connection is closed before handshake
  completed.
  (Patch by HoHo-Ho)

IDLE
----

- Issue #15308: Add 'interrupt execution' (^C) to Shell menu.
  Patch by Roger Serwy, updated by Bayard Randel.

- Issue #27922: Stop IDLE tests from 'flashing' gui widgets on the screen.

- Add version to title of IDLE help window.

- Issue #25564: In section on IDLE -- console differences, mention that
  using exec means that __builtins__ is defined for each statement.

- Issue #27714: text_textview and test_autocomplete now pass when re-run
  in the same process.  This occurs when test_idle fails when run with the
  -w option but without -jn.  Fix warning from test_config.

- Issue #25507: IDLE no longer runs buggy code because of its tkinter imports.
  Users must include the same imports required to run directly in Python.

- Issue #27452: add line counter and crc to IDLE configHandler test dump.

- Issue #27365: Allow non-ascii chars in IDLE NEWS.txt, for contributor names.

- Issue #27245: IDLE: Cleanly delete custom themes and key bindings.
  Previously, when IDLE was started from a console or by import, a cascade
  of warnings was emitted.  Patch by Serhiy Storchaka.

C API
-----

- Issue #28808: PyUnicode_CompareWithASCIIString() now never raises exceptions.

- Issue #26754: PyUnicode_FSDecoder() accepted a filename argument encoded as
  an iterable of integers. Now only strings and bytes-like objects are accepted.

Documentation
-------------

- Issue #28513: Documented command-line interface of zipfile.

Tests
-----

- Issue #28950: Disallow -j0 to be combined with -T/-l/-M in regrtest
  command line arguments.

- Issue #28666: Now test.support.rmtree is able to remove unwritable or
  unreadable directories.

- Issue #23839: Various caches now are cleared before running every test file.

- Issue #28409: regrtest: fix the parser of command line arguments.

- Issue #27787: Call gc.collect() before checking each test for "dangling
  threads", since the dangling threads are weak references.

- Issue #27369: In test_pyexpat, avoid testing an error message detail that
  changed in Expat 2.2.0.

Tools/Demos
-----------

- Issue #27952: Get Tools/scripts/fixcid.py working with Python 3 and the
  current "re" module, avoid invalid Python backslash escapes, and fix a bug
  parsing escaped C quote signs.

- Issue #27332: Fixed the type of the first argument of module-level functions
  generated by Argument Clinic.  Patch by Petr Viktorin.

- Issue #27418: Fixed Tools/importbench/importbench.py.

Windows
-------

- Issue #28251: Improvements to help manuals on Windows.

- Issue #28110: launcher.msi has different product codes between 32-bit and
  64-bit

- Issue #25144: Ensures TargetDir is set before continuing with custom
  install.

- Issue #27469: Adds a shell extension to the launcher so that drag and drop
  works correctly.

- Issue #27309: Enabled proper Windows styles in python[w].exe manifest.

Build
-----

- Issue #29080: Removes hard dependency on hg.exe from PCBuild/build.bat

- Issue #23903: Added missed names to PC/python3.def.

- Issue #10656: Fix out-of-tree building on AIX.  Patch by Tristan Carel and
  Michael Haubenwallner.

- Issue #26359: Rename --with-optimiations to --enable-optimizations.

- Issue #28444: Fix missing extensions modules when cross compiling.

- Issue #28248: Update Windows build and OS X installers to use OpenSSL 1.0.2j.

- Issue #28258: Fixed build with Estonian locale (python-config and distclean
  targets in Makefile).  Patch by Arfrever Frehtes Taifersar Arahesis.

- Issue #26661: setup.py now detects system libffi with multiarch wrapper.

- Issue #28066: Fix the logic that searches build directories for generated
  include files when building outside the source tree.

- Issue #15819: Remove redundant include search directory option for building
  outside the source tree.

- Issue #27566: Fix clean target in freeze makefile (patch by Lisa Roach)

- Issue #27705: Update message in validate_ucrtbase.py

- Issue #27983: Cause lack of llvm-profdata tool when using clang as
  required for PGO linking to be a configure time error rather than
  make time when --with-optimizations is enabled.  Also improve our
  ability to find the llvm-profdata tool on MacOS and some Linuxes.

- Issue #26307: The profile-opt build now applies PGO to the built-in modules.

- Issue #26359: Add the --with-optimizations configure flag.

- Issue #27713: Suppress spurious build warnings when updating importlib's
  bootstrap files.  Patch by Xiang Zhang

- Issue #25825: Correct the references to Modules/python.exp and ld_so_aix,
  which are required on AIX.  This updates references to an installation path
  that was changed in 3.2a4, and undoes changed references to the build tree
  that were made in 3.5.0a1.

- Issue #27453: CPP invocation in configure must use CPPFLAGS. Patch by
  Chi Hsuan Yen.

- Issue #27641: The configure script now inserts comments into the makefile
  to prevent the pgen and _freeze_importlib executables from being cross-
  compiled.

- Issue #26662: Set PYTHON_FOR_GEN in configure as the Python program to be
  used for file generation during the build.

- Issue #10910: Avoid C++ compilation errors on FreeBSD and OS X.
  Also update FreedBSD version checks for the original ctype UTF-8 workaround.

- Issue #28676: Prevent missing 'getentropy' declaration warning on macOS.
  Patch by Gareth Rees.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 pkgsrc/lang/python35/Makefile
cvs rdiff -u -r1.4 -r1.5 pkgsrc/lang/python35/PLIST
cvs rdiff -u -r1.3 -r1.4 pkgsrc/lang/python35/dist.mk
cvs rdiff -u -r1.8 -r1.9 pkgsrc/lang/python35/distinfo
cvs rdiff -u -r1.2 -r1.3 \
    pkgsrc/lang/python35/patches/patch-Lib_distutils_unixccompiler.py \
    pkgsrc/lang/python35/patches/patch-Makefile.pre.in \
    pkgsrc/lang/python35/patches/patch-setup.py

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/lang/python35/Makefile
diff -u pkgsrc/lang/python35/Makefile:1.6 pkgsrc/lang/python35/Makefile:1.7
--- pkgsrc/lang/python35/Makefile:1.6   Sun Sep 18 12:44:49 2016
+++ pkgsrc/lang/python35/Makefile       Thu Jan 19 13:55:53 2017
@@ -1,9 +1,8 @@
-# $NetBSD: Makefile,v 1.6 2016/09/18 12:44:49 kamil Exp $
+# $NetBSD: Makefile,v 1.7 2017/01/19 13:55:53 wen Exp $
 
 .include "dist.mk"
 
 PKGNAME=       python35-${PY_DISTVERSION}
-PKGREVISION=   1
 CATEGORIES=    lang python
 
 MAINTAINER=    pkgsrc-users%NetBSD.org@localhost
@@ -151,6 +150,10 @@ SUBST_VARS.sslbase=        SSLBASE
 
 CHECK_INTERPRETER_SKIP=        lib/python${PY_VER_SUFFIX}/venv/scripts/posix/pydoc
 
+# Avoid error: Cannot generate ./Include/opcode.h, python not found !
+post-configure:
+       touch ${WRKSRC}/Include/opcode.h
+
 .if ${OPSYS} == "HPUX"
 post-install:
        ${LN} -fs ${DESTDIR}${PREFIX}/lib/libpython3.5.sl \

Index: pkgsrc/lang/python35/PLIST
diff -u pkgsrc/lang/python35/PLIST:1.4 pkgsrc/lang/python35/PLIST:1.5
--- pkgsrc/lang/python35/PLIST:1.4      Sat Jul  2 15:07:47 2016
+++ pkgsrc/lang/python35/PLIST  Thu Jan 19 13:55:53 2017
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.4 2016/07/02 15:07:47 adam Exp $
+@comment $NetBSD: PLIST,v 1.5 2017/01/19 13:55:53 wen Exp $
 bin/2to3-${PY_VER_SUFFIX}
 bin/pydoc${PY_VER_SUFFIX}
 bin/python${PY_VER_SUFFIX}
@@ -1341,8 +1341,8 @@ lib/python${PY_VER_SUFFIX}/ensurepip/__i
 lib/python${PY_VER_SUFFIX}/ensurepip/__main__.py
 lib/python${PY_VER_SUFFIX}/ensurepip/__main__.pyc
 lib/python${PY_VER_SUFFIX}/ensurepip/__main__.pyo
-lib/python${PY_VER_SUFFIX}/ensurepip/_bundled/pip-8.1.1-py2.py3-none-any.whl
-lib/python${PY_VER_SUFFIX}/ensurepip/_bundled/setuptools-20.10.1-py2.py3-none-any.whl
+lib/python${PY_VER_SUFFIX}/ensurepip/_bundled/pip-9.0.1-py2.py3-none-any.whl
+lib/python${PY_VER_SUFFIX}/ensurepip/_bundled/setuptools-28.8.0-py2.py3-none-any.whl
 lib/python${PY_VER_SUFFIX}/ensurepip/_uninstall.py
 lib/python${PY_VER_SUFFIX}/ensurepip/_uninstall.pyc
 lib/python${PY_VER_SUFFIX}/ensurepip/_uninstall.pyo
@@ -1499,6 +1499,7 @@ lib/python${PY_VER_SUFFIX}/idlelib/Multi
 lib/python${PY_VER_SUFFIX}/idlelib/MultiStatusBar.pyc
 lib/python${PY_VER_SUFFIX}/idlelib/MultiStatusBar.pyo
 lib/python${PY_VER_SUFFIX}/idlelib/NEWS.txt
+lib/python${PY_VER_SUFFIX}/idlelib/NEWS2x.txt
 lib/python${PY_VER_SUFFIX}/idlelib/ObjectBrowser.py
 lib/python${PY_VER_SUFFIX}/idlelib/ObjectBrowser.pyc
 lib/python${PY_VER_SUFFIX}/idlelib/ObjectBrowser.pyo
@@ -1632,8 +1633,8 @@ lib/python${PY_VER_SUFFIX}/idlelib/idle_
 lib/python${PY_VER_SUFFIX}/idlelib/idle_test/test_calltips.pyc
 lib/python${PY_VER_SUFFIX}/idlelib/idle_test/test_calltips.pyo
 lib/python${PY_VER_SUFFIX}/idlelib/idle_test/test_config_help.py
-lib/python${PY_VER_SUFFIX}/idlelib/idle_test/test_config_help.pyo
 lib/python${PY_VER_SUFFIX}/idlelib/idle_test/test_config_help.pyc
+lib/python${PY_VER_SUFFIX}/idlelib/idle_test/test_config_help.pyo
 lib/python${PY_VER_SUFFIX}/idlelib/idle_test/test_config_name.py
 lib/python${PY_VER_SUFFIX}/idlelib/idle_test/test_config_name.pyc
 lib/python${PY_VER_SUFFIX}/idlelib/idle_test/test_config_name.pyo
@@ -1644,8 +1645,8 @@ lib/python${PY_VER_SUFFIX}/idlelib/idle_
 lib/python${PY_VER_SUFFIX}/idlelib/idle_test/test_delegator.pyc
 lib/python${PY_VER_SUFFIX}/idlelib/idle_test/test_delegator.pyo
 lib/python${PY_VER_SUFFIX}/idlelib/idle_test/test_editmenu.py
-lib/python${PY_VER_SUFFIX}/idlelib/idle_test/test_editmenu.pyo
 lib/python${PY_VER_SUFFIX}/idlelib/idle_test/test_editmenu.pyc
+lib/python${PY_VER_SUFFIX}/idlelib/idle_test/test_editmenu.pyo
 lib/python${PY_VER_SUFFIX}/idlelib/idle_test/test_editor.py
 lib/python${PY_VER_SUFFIX}/idlelib/idle_test/test_editor.pyc
 lib/python${PY_VER_SUFFIX}/idlelib/idle_test/test_editor.pyo
@@ -1655,6 +1656,9 @@ lib/python${PY_VER_SUFFIX}/idlelib/idle_
 lib/python${PY_VER_SUFFIX}/idlelib/idle_test/test_grep.py
 lib/python${PY_VER_SUFFIX}/idlelib/idle_test/test_grep.pyc
 lib/python${PY_VER_SUFFIX}/idlelib/idle_test/test_grep.pyo
+lib/python${PY_VER_SUFFIX}/idlelib/idle_test/test_help_about.py
+lib/python${PY_VER_SUFFIX}/idlelib/idle_test/test_help_about.pyc
+lib/python${PY_VER_SUFFIX}/idlelib/idle_test/test_help_about.pyo
 lib/python${PY_VER_SUFFIX}/idlelib/idle_test/test_hyperparser.py
 lib/python${PY_VER_SUFFIX}/idlelib/idle_test/test_hyperparser.pyc
 lib/python${PY_VER_SUFFIX}/idlelib/idle_test/test_hyperparser.pyo
@@ -1671,11 +1675,11 @@ lib/python${PY_VER_SUFFIX}/idlelib/idle_
 lib/python${PY_VER_SUFFIX}/idlelib/idle_test/test_pathbrowser.pyc
 lib/python${PY_VER_SUFFIX}/idlelib/idle_test/test_pathbrowser.pyo
 lib/python${PY_VER_SUFFIX}/idlelib/idle_test/test_percolator.py
-lib/python${PY_VER_SUFFIX}/idlelib/idle_test/test_percolator.pyo
 lib/python${PY_VER_SUFFIX}/idlelib/idle_test/test_percolator.pyc
+lib/python${PY_VER_SUFFIX}/idlelib/idle_test/test_percolator.pyo
 lib/python${PY_VER_SUFFIX}/idlelib/idle_test/test_replacedialog.py
-lib/python${PY_VER_SUFFIX}/idlelib/idle_test/test_replacedialog.pyo
 lib/python${PY_VER_SUFFIX}/idlelib/idle_test/test_replacedialog.pyc
+lib/python${PY_VER_SUFFIX}/idlelib/idle_test/test_replacedialog.pyo
 lib/python${PY_VER_SUFFIX}/idlelib/idle_test/test_rstrip.py
 lib/python${PY_VER_SUFFIX}/idlelib/idle_test/test_rstrip.pyc
 lib/python${PY_VER_SUFFIX}/idlelib/idle_test/test_rstrip.pyo
@@ -1869,9 +1873,6 @@ lib/python${PY_VER_SUFFIX}/lib2to3/fixes
 lib/python${PY_VER_SUFFIX}/lib2to3/fixes/fix_buffer.py
 lib/python${PY_VER_SUFFIX}/lib2to3/fixes/fix_buffer.pyc
 lib/python${PY_VER_SUFFIX}/lib2to3/fixes/fix_buffer.pyo
-lib/python${PY_VER_SUFFIX}/lib2to3/fixes/fix_callable.py
-lib/python${PY_VER_SUFFIX}/lib2to3/fixes/fix_callable.pyc
-lib/python${PY_VER_SUFFIX}/lib2to3/fixes/fix_callable.pyo
 lib/python${PY_VER_SUFFIX}/lib2to3/fixes/fix_dict.py
 lib/python${PY_VER_SUFFIX}/lib2to3/fixes/fix_dict.pyc
 lib/python${PY_VER_SUFFIX}/lib2to3/fixes/fix_dict.pyo
@@ -2458,6 +2459,7 @@ lib/python${PY_VER_SUFFIX}/test/__main__
 lib/python${PY_VER_SUFFIX}/test/_test_multiprocessing.py
 lib/python${PY_VER_SUFFIX}/test/_test_multiprocessing.pyc
 lib/python${PY_VER_SUFFIX}/test/_test_multiprocessing.pyo
+lib/python${PY_VER_SUFFIX}/test/allsans.pem
 lib/python${PY_VER_SUFFIX}/test/audiodata/pluck-alaw.aifc
 lib/python${PY_VER_SUFFIX}/test/audiodata/pluck-pcm16.aiff
 lib/python${PY_VER_SUFFIX}/test/audiodata/pluck-pcm16.au
@@ -2514,7 +2516,6 @@ lib/python${PY_VER_SUFFIX}/test/capath/c
 lib/python${PY_VER_SUFFIX}/test/cfgparser.1
 lib/python${PY_VER_SUFFIX}/test/cfgparser.2
 lib/python${PY_VER_SUFFIX}/test/cfgparser.3
-lib/python${PY_VER_SUFFIX}/test/check_soundcard.vbs
 lib/python${PY_VER_SUFFIX}/test/cjkencodings/big5-utf8.txt
 lib/python${PY_VER_SUFFIX}/test/cjkencodings/big5.txt
 lib/python${PY_VER_SUFFIX}/test/cjkencodings/big5hkscs-utf8.txt
@@ -2795,6 +2796,9 @@ lib/python${PY_VER_SUFFIX}/test/mock_soc
 lib/python${PY_VER_SUFFIX}/test/mp_fork_bomb.py
 lib/python${PY_VER_SUFFIX}/test/mp_fork_bomb.pyc
 lib/python${PY_VER_SUFFIX}/test/mp_fork_bomb.pyo
+lib/python${PY_VER_SUFFIX}/test/mp_preload.py
+lib/python${PY_VER_SUFFIX}/test/mp_preload.pyc
+lib/python${PY_VER_SUFFIX}/test/mp_preload.pyo
 lib/python${PY_VER_SUFFIX}/test/multibytecodec_support.py
 lib/python${PY_VER_SUFFIX}/test/multibytecodec_support.pyc
 lib/python${PY_VER_SUFFIX}/test/multibytecodec_support.pyo
@@ -3977,6 +3981,7 @@ lib/python${PY_VER_SUFFIX}/test/test_ope
 lib/python${PY_VER_SUFFIX}/test/test_optparse.py
 lib/python${PY_VER_SUFFIX}/test/test_optparse.pyc
 lib/python${PY_VER_SUFFIX}/test/test_optparse.pyo
+lib/python${PY_VER_SUFFIX}/test/test_ordered_dict.py
 lib/python${PY_VER_SUFFIX}/test/test_ordered_dict.pyc
 lib/python${PY_VER_SUFFIX}/test/test_ordered_dict.pyo
 lib/python${PY_VER_SUFFIX}/test/test_os.py
@@ -4342,6 +4347,39 @@ lib/python${PY_VER_SUFFIX}/test/test_tk.
 lib/python${PY_VER_SUFFIX}/test/test_tokenize.py
 lib/python${PY_VER_SUFFIX}/test/test_tokenize.pyc
 lib/python${PY_VER_SUFFIX}/test/test_tokenize.pyo
+lib/python${PY_VER_SUFFIX}/test/test_tools/__init__.py
+lib/python${PY_VER_SUFFIX}/test/test_tools/__init__.pyc
+lib/python${PY_VER_SUFFIX}/test/test_tools/__init__.pyo
+lib/python${PY_VER_SUFFIX}/test/test_tools/__main__.py
+lib/python${PY_VER_SUFFIX}/test/test_tools/__main__.pyc
+lib/python${PY_VER_SUFFIX}/test/test_tools/__main__.pyo
+lib/python${PY_VER_SUFFIX}/test/test_tools/test_fixcid.py
+lib/python${PY_VER_SUFFIX}/test/test_tools/test_fixcid.pyc
+lib/python${PY_VER_SUFFIX}/test/test_tools/test_fixcid.pyo
+lib/python${PY_VER_SUFFIX}/test/test_tools/test_gprof2html.py
+lib/python${PY_VER_SUFFIX}/test/test_tools/test_gprof2html.pyc
+lib/python${PY_VER_SUFFIX}/test/test_tools/test_gprof2html.pyo
+lib/python${PY_VER_SUFFIX}/test/test_tools/test_i18n.py
+lib/python${PY_VER_SUFFIX}/test/test_tools/test_i18n.pyc
+lib/python${PY_VER_SUFFIX}/test/test_tools/test_i18n.pyo
+lib/python${PY_VER_SUFFIX}/test/test_tools/test_md5sum.py
+lib/python${PY_VER_SUFFIX}/test/test_tools/test_md5sum.pyc
+lib/python${PY_VER_SUFFIX}/test/test_tools/test_md5sum.pyo
+lib/python${PY_VER_SUFFIX}/test/test_tools/test_pdeps.py
+lib/python${PY_VER_SUFFIX}/test/test_tools/test_pdeps.pyc
+lib/python${PY_VER_SUFFIX}/test/test_tools/test_pdeps.pyo
+lib/python${PY_VER_SUFFIX}/test/test_tools/test_pindent.py
+lib/python${PY_VER_SUFFIX}/test/test_tools/test_pindent.pyc
+lib/python${PY_VER_SUFFIX}/test/test_tools/test_pindent.pyo
+lib/python${PY_VER_SUFFIX}/test/test_tools/test_reindent.py
+lib/python${PY_VER_SUFFIX}/test/test_tools/test_reindent.pyc
+lib/python${PY_VER_SUFFIX}/test/test_tools/test_reindent.pyo
+lib/python${PY_VER_SUFFIX}/test/test_tools/test_sundry.py
+lib/python${PY_VER_SUFFIX}/test/test_tools/test_sundry.pyc
+lib/python${PY_VER_SUFFIX}/test/test_tools/test_sundry.pyo
+lib/python${PY_VER_SUFFIX}/test/test_tools/test_unparse.py
+lib/python${PY_VER_SUFFIX}/test/test_tools/test_unparse.pyc
+lib/python${PY_VER_SUFFIX}/test/test_tools/test_unparse.pyo
 lib/python${PY_VER_SUFFIX}/test/test_trace.py
 lib/python${PY_VER_SUFFIX}/test/test_trace.pyc
 lib/python${PY_VER_SUFFIX}/test/test_trace.pyo
@@ -4360,7 +4398,6 @@ lib/python${PY_VER_SUFFIX}/test/test_ttk
 lib/python${PY_VER_SUFFIX}/test/test_tuple.py
 lib/python${PY_VER_SUFFIX}/test/test_tuple.pyc
 lib/python${PY_VER_SUFFIX}/test/test_tuple.pyo
-lib/python${PY_VER_SUFFIX}/test/test_ordered_dict.py
 lib/python${PY_VER_SUFFIX}/test/test_turtle.py
 lib/python${PY_VER_SUFFIX}/test/test_turtle.pyc
 lib/python${PY_VER_SUFFIX}/test/test_turtle.pyo
@@ -4445,6 +4482,18 @@ lib/python${PY_VER_SUFFIX}/test/test_wai
 lib/python${PY_VER_SUFFIX}/test/test_wait4.py
 lib/python${PY_VER_SUFFIX}/test/test_wait4.pyc
 lib/python${PY_VER_SUFFIX}/test/test_wait4.pyo
+lib/python${PY_VER_SUFFIX}/test/test_warnings/__init__.py
+lib/python${PY_VER_SUFFIX}/test/test_warnings/__init__.pyc
+lib/python${PY_VER_SUFFIX}/test/test_warnings/__init__.pyo
+lib/python${PY_VER_SUFFIX}/test/test_warnings/__main__.py
+lib/python${PY_VER_SUFFIX}/test/test_warnings/__main__.pyc
+lib/python${PY_VER_SUFFIX}/test/test_warnings/__main__.pyo
+lib/python${PY_VER_SUFFIX}/test/test_warnings/data/import_warning.py
+lib/python${PY_VER_SUFFIX}/test/test_warnings/data/import_warning.pyc
+lib/python${PY_VER_SUFFIX}/test/test_warnings/data/import_warning.pyo
+lib/python${PY_VER_SUFFIX}/test/test_warnings/data/stacklevel.py
+lib/python${PY_VER_SUFFIX}/test/test_warnings/data/stacklevel.pyc
+lib/python${PY_VER_SUFFIX}/test/test_warnings/data/stacklevel.pyo
 lib/python${PY_VER_SUFFIX}/test/test_wave.py
 lib/python${PY_VER_SUFFIX}/test/test_wave.pyc
 lib/python${PY_VER_SUFFIX}/test/test_wave.pyo

Index: pkgsrc/lang/python35/dist.mk
diff -u pkgsrc/lang/python35/dist.mk:1.3 pkgsrc/lang/python35/dist.mk:1.4
--- pkgsrc/lang/python35/dist.mk:1.3    Sat Jul  2 15:07:47 2016
+++ pkgsrc/lang/python35/dist.mk        Thu Jan 19 13:55:53 2017
@@ -1,6 +1,6 @@
-# $NetBSD: dist.mk,v 1.3 2016/07/02 15:07:47 adam Exp $
+# $NetBSD: dist.mk,v 1.4 2017/01/19 13:55:53 wen Exp $
 
-PY_DISTVERSION=        3.5.2
+PY_DISTVERSION=        3.5.3
 DISTNAME=      Python-${PY_DISTVERSION}
 EXTRACT_SUFX=  .tar.xz
 DISTINFO_FILE= ${.CURDIR}/../../lang/python35/distinfo

Index: pkgsrc/lang/python35/distinfo
diff -u pkgsrc/lang/python35/distinfo:1.8 pkgsrc/lang/python35/distinfo:1.9
--- pkgsrc/lang/python35/distinfo:1.8   Thu Jan  5 23:16:42 2017
+++ pkgsrc/lang/python35/distinfo       Thu Jan 19 13:55:53 2017
@@ -1,16 +1,16 @@
-$NetBSD: distinfo,v 1.8 2017/01/05 23:16:42 roy Exp $
+$NetBSD: distinfo,v 1.9 2017/01/19 13:55:53 wen Exp $
 
-SHA1 (Python-3.5.2.tar.xz) = 4843aabacec5bc0cdd3e1f778faa926e532794d2
-RMD160 (Python-3.5.2.tar.xz) = 709be7df28045c4fc8ed40cadd299478439f9522
-SHA512 (Python-3.5.2.tar.xz) = c07c3366f1c81e214241444bb9da6db9d11da32ad66bfa29cdad5a3b2e34e4d870bda6d4ce3c3910b582942e91f1d8c8a1c1a7b9464cc147b83c9e0007012742
-Size (Python-3.5.2.tar.xz) = 15222676 bytes
+SHA1 (Python-3.5.3.tar.xz) = 127121fdca11e735b3686e300d66f73aba663e93
+RMD160 (Python-3.5.3.tar.xz) = 663ad06b0c4b36e7760f5202e73bc53697f225d2
+SHA512 (Python-3.5.3.tar.xz) = bbcc20e315c63dbc8901d7e7bfa29d4dbdad9335720757d8d679730319fd1d9fcfdb55cf62d620c9b052134170f162c28d653a8af60923185b8932524d827864
+Size (Python-3.5.3.tar.xz) = 15213396 bytes
 SHA1 (patch-Include_py__curses.h) = 14359f8d0527eff08073c0aea60dfe8961d9255d
 SHA1 (patch-Lib_distutils_command_install.py) = 9b44f339f65f029b7f17dbc654739a7ae3c12780
-SHA1 (patch-Lib_distutils_unixccompiler.py) = 7d6df07921ad3357757d4681a964256b560b3f57
-SHA1 (patch-Makefile.pre.in) = 5a27e9bc405b515f10b972ba9fc9421e05e4b7f1
+SHA1 (patch-Lib_distutils_unixccompiler.py) = 7d0b70a64b79ee6084c41d8fbb01c8e8e4553419
+SHA1 (patch-Makefile.pre.in) = 174e01e44c61c756131f795dc96100a381876fcb
 SHA1 (patch-Modules___cursesmodule.c) = 2ab2779e0418a4529987641c254686ba05d28593
 SHA1 (patch-Modules_makesetup) = c9b571eb54fdf0b1e93524a6de6780e8c4119221
 SHA1 (patch-Modules_nismodule.c) = bd290417c265846e238660180e60e76c0f5f696a
 SHA1 (patch-Python_thread__pthread.h) = fb81eaa604b4ed7c1b64c3f4731d58a8aee257be
 SHA1 (patch-configure) = 069f7bb10d98e3616f52859a2cf90c7f5732425e
-SHA1 (patch-setup.py) = 01e56057bb35225a513ef4a76a69f695f760c6ca
+SHA1 (patch-setup.py) = 42385e851af583ab5a460f6ca7b73e98697e268e

Index: pkgsrc/lang/python35/patches/patch-Lib_distutils_unixccompiler.py
diff -u pkgsrc/lang/python35/patches/patch-Lib_distutils_unixccompiler.py:1.2 pkgsrc/lang/python35/patches/patch-Lib_distutils_unixccompiler.py:1.3
--- pkgsrc/lang/python35/patches/patch-Lib_distutils_unixccompiler.py:1.2       Tue Feb 23 15:07:36 2016
+++ pkgsrc/lang/python35/patches/patch-Lib_distutils_unixccompiler.py   Thu Jan 19 13:55:53 2017
@@ -1,11 +1,11 @@
-$NetBSD: patch-Lib_distutils_unixccompiler.py,v 1.2 2016/02/23 15:07:36 joerg Exp $
+$NetBSD: patch-Lib_distutils_unixccompiler.py,v 1.3 2017/01/19 13:55:53 wen Exp $
 
 Do not force RUNPATH vs RPATH, trust the compiler to know what the
 platform wants.
 
---- Lib/distutils/unixccompiler.py.orig        2013-05-15 16:32:54.000000000 +0000
+--- Lib/distutils/unixccompiler.py.orig        2017-01-17 07:57:48.000000000 +0000
 +++ Lib/distutils/unixccompiler.py
-@@ -232,22 +232,7 @@ class UnixCCompiler(CCompiler):
+@@ -236,22 +236,7 @@ class UnixCCompiler(CCompiler):
          elif sys.platform[:7] == "irix646" or sys.platform[:6] == "osf1V5":
              return ["-rpath", dir]
          else:
@@ -29,3 +29,12 @@ platform wants.
  
      def library_option(self, lib):
          return "-l" + lib
+@@ -298,7 +283,7 @@ class UnixCCompiler(CCompiler):
+ 
+             if sys.platform == 'darwin' and (
+                 dir.startswith('/System/') or (
+-                dir.startswith('/usr/') and not dir.startswith('/usr/local/'))):
++                dir.startswith('/usr/') and not dir.startswith('/usr/pkg/'))):
+ 
+                 shared = os.path.join(sysroot, dir[1:], shared_f)
+                 dylib = os.path.join(sysroot, dir[1:], dylib_f)
Index: pkgsrc/lang/python35/patches/patch-Makefile.pre.in
diff -u pkgsrc/lang/python35/patches/patch-Makefile.pre.in:1.2 pkgsrc/lang/python35/patches/patch-Makefile.pre.in:1.3
--- pkgsrc/lang/python35/patches/patch-Makefile.pre.in:1.2      Sat Jul  2 15:07:48 2016
+++ pkgsrc/lang/python35/patches/patch-Makefile.pre.in  Thu Jan 19 13:55:53 2017
@@ -1,47 +1,45 @@
-$NetBSD: patch-Makefile.pre.in,v 1.2 2016/07/02 15:07:48 adam Exp $
+$NetBSD: patch-Makefile.pre.in,v 1.3 2017/01/19 13:55:53 wen Exp $
 
-Use only one optimisation level; needed for PLIST and setuptools compatibility.
-
---- Makefile.pre.in.orig       2016-06-25 21:38:37.000000000 +0000
+--- Makefile.pre.in.orig       2017-01-19 11:35:21.000000000 +0000
 +++ Makefile.pre.in
-@@ -91,7 +91,7 @@ PY_CFLAGS_NODIST=$(CONFIGURE_CFLAGS_NODI
+@@ -92,7 +92,7 @@ PY_CFLAGS_NODIST=$(CONFIGURE_CFLAGS_NODI
  # be able to build extension modules using the directories specified in the
  # environment variables
- PY_CPPFLAGS=  $(BASECPPFLAGS) -I. -IInclude -I$(srcdir)/Include $(CONFIGURE_CPPFLAGS) $(CPPFLAGS)
+ PY_CPPFLAGS=  $(BASECPPFLAGS) -I. -I$(srcdir)/Include $(CONFIGURE_CPPFLAGS) $(CPPFLAGS)
 -PY_LDFLAGS=   $(CONFIGURE_LDFLAGS) $(LDFLAGS)
 +PY_LDFLAGS=   -L. $(CONFIGURE_LDFLAGS) $(LDFLAGS)
  NO_AS_NEEDED= @NO_AS_NEEDED@
  LDLAST=               @LDLAST@
  SGI_ABI=      @SGI_ABI@
-@@ -724,7 +724,7 @@ Python/importlib_external.h: $(srcdir)/L
-               $(srcdir)/Lib/importlib/_bootstrap_external.py Python/importlib_external.h; \
-       fi
+@@ -723,7 +723,7 @@ Python/importlib_external.h: @GENERATED_
+       ./Programs/_freeze_importlib \
+           $(srcdir)/Lib/importlib/_bootstrap_external.py Python/importlib_external.h
+ 
+-Python/importlib.h: @GENERATED_COMMENT@ $(srcdir)/Lib/importlib/_bootstrap.py Programs/_freeze_importlib
++Python/importlib.h: @GENERATED_COMMENT@ $(srcdir)/Lib/importlib/_bootstrap.py Programs/_freeze_importlib $(LIBRARY_OBJS_OMIT_FROZEN)
+       ./Programs/_freeze_importlib \
+           $(srcdir)/Lib/importlib/_bootstrap.py Python/importlib.h
  
--Python/importlib.h: $(srcdir)/Lib/importlib/_bootstrap.py Programs/_freeze_importlib
-+Python/importlib.h: $(srcdir)/Lib/importlib/_bootstrap.py Programs/_freeze_importlib $(LIBRARY_OBJS_OMIT_FROZEN)
-       if test "$(cross_compiling)" != "yes"; then \
-           ./Programs/_freeze_importlib \
-               $(srcdir)/Lib/importlib/_bootstrap.py Python/importlib.h; \
-@@ -882,7 +882,7 @@ Objects/setobject.o: $(srcdir)/Objects/s
+@@ -868,7 +868,7 @@ Objects/setobject.o: $(srcdir)/Objects/s
  $(OPCODETARGETS_H): $(OPCODETARGETGEN_FILES)
-       $(OPCODETARGETGEN) $(OPCODETARGETS_H)
+       $(PYTHON_FOR_GEN) $(OPCODETARGETGEN) $(OPCODETARGETS_H)
  
 -Python/ceval.o: $(OPCODETARGETS_H) $(srcdir)/Python/ceval_gil.h
 +#Python/ceval.o: $(OPCODETARGETS_H) $(srcdir)/Python/ceval_gil.h
  
  Python/frozen.o: Python/importlib.h Python/importlib_external.h
  
-@@ -1122,7 +1122,8 @@ altbininstall: $(BUILDPYTHON) @FRAMEWORK
+@@ -1108,7 +1108,8 @@ altbininstall: $(BUILDPYTHON) @FRAMEWORK
                if test -n "$(PY3LIBRARY)"; then \
                        $(INSTALL_SHARED) $(PY3LIBRARY) $(DESTDIR)$(LIBDIR)/$(PY3LIBRARY); \
                fi; \
 -      else    true; \
 +      elif test -f $(INSTSONAME); then \
-+               $(INSTALL_SHARED) $(INSTSONAME) $(DESTDIR)$(LIBDIR); \
++              $(INSTALL_SHARED) $(INSTSONAME) $(DESTDIR)$(LIBDIR); \
        fi
        if test "x$(LIPO_32BIT_FLAGS)" != "x" ; then \
                rm -f $(DESTDIR)$(BINDIR)python$(VERSION)-32$(EXE); \
-@@ -1312,11 +1313,6 @@ libinstall:     build_all $(srcdir)/Lib/$(PL
+@@ -1299,11 +1300,6 @@ libinstall:     build_all $(srcdir)/Lib/$(PL
                -x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \
                $(DESTDIR)$(LIBDEST)
        -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
@@ -53,7 +51,7 @@ Use only one optimisation level; needed 
                $(PYTHON_FOR_BUILD) -Wi $(DESTDIR)$(LIBDEST)/compileall.py \
                -d $(LIBDEST)/site-packages -f \
                -x badsyntax $(DESTDIR)$(LIBDEST)/site-packages
-@@ -1325,10 +1321,6 @@ libinstall:     build_all $(srcdir)/Lib/$(PL
+@@ -1312,10 +1308,6 @@ libinstall:     build_all $(srcdir)/Lib/$(PL
                -d $(LIBDEST)/site-packages -f \
                -x badsyntax $(DESTDIR)$(LIBDEST)/site-packages
        -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
Index: pkgsrc/lang/python35/patches/patch-setup.py
diff -u pkgsrc/lang/python35/patches/patch-setup.py:1.2 pkgsrc/lang/python35/patches/patch-setup.py:1.3
--- pkgsrc/lang/python35/patches/patch-setup.py:1.2     Sat Jul  2 15:07:48 2016
+++ pkgsrc/lang/python35/patches/patch-setup.py Thu Jan 19 13:55:53 2017
@@ -1,8 +1,17 @@
-$NetBSD: patch-setup.py,v 1.2 2016/07/02 15:07:48 adam Exp $
+$NetBSD: patch-setup.py,v 1.3 2017/01/19 13:55:53 wen Exp $
 
---- setup.py.orig      2016-06-25 21:38:39.000000000 +0000
+--- setup.py.orig      2017-01-17 07:57:54.000000000 +0000
 +++ setup.py
-@@ -44,7 +44,8 @@ host_platform = get_platform()
+@@ -7,7 +7,7 @@ import importlib._bootstrap
+ import importlib.util
+ import sysconfig
+ 
+-from distutils import log
++from distutils import log,text_file
+ from distutils.errors import *
+ from distutils.core import Extension, setup
+ from distutils.command.build_ext import build_ext
+@@ -43,7 +43,8 @@ host_platform = get_platform()
  COMPILED_WITH_PYDEBUG = ('--with-pydebug' in sysconfig.get_config_var("CONFIG_ARGS"))
  
  # This global variable is used to hold the list of modules to be disabled.
@@ -12,7 +21,7 @@ $NetBSD: patch-setup.py,v 1.2 2016/07/02
  
  def add_dir_to_list(dirlist, dir):
      """Add the directory 'dir' to the list 'dirlist' (after any relative
-@@ -488,15 +489,15 @@ class PyBuildExt(build_ext):
+@@ -487,15 +488,15 @@ class PyBuildExt(build_ext):
              return ['m']
  
      def detect_modules(self):
@@ -37,17 +46,17 @@ $NetBSD: patch-setup.py,v 1.2 2016/07/02
          self.add_multiarch_paths()
  
          # Add paths specified in the environment variables LDFLAGS and
-@@ -809,8 +810,7 @@ class PyBuildExt(build_ext):
+@@ -808,8 +809,7 @@ class PyBuildExt(build_ext):
                                 depends = ['socketmodule.h']) )
          # Detect SSL support for the socket module (via _ssl)
          search_for_ssl_incs_in = [
 -                              '/usr/local/ssl/include',
 -                              '/usr/contrib/ssl/include/'
-+                              '@SSLBASE@/include'
++                              '/usr/include'
                               ]
          ssl_incs = find_file('openssl/ssl.h', inc_dirs,
                               search_for_ssl_incs_in
-@@ -821,9 +821,7 @@ class PyBuildExt(build_ext):
+@@ -820,9 +820,7 @@ class PyBuildExt(build_ext):
              if krb5_h:
                  ssl_incs += krb5_h
          ssl_libs = find_library_file(self.compiler, 'ssl',lib_dirs,
@@ -58,7 +67,7 @@ $NetBSD: patch-setup.py,v 1.2 2016/07/02
  
          if (ssl_incs is not None and
              ssl_libs is not None):
-@@ -842,7 +840,7 @@ class PyBuildExt(build_ext):
+@@ -841,7 +839,7 @@ class PyBuildExt(build_ext):
  
          # look for the openssl version header on the compiler search path.
          opensslv_h = find_file('openssl/opensslv.h', [],
@@ -67,7 +76,7 @@ $NetBSD: patch-setup.py,v 1.2 2016/07/02
          if opensslv_h:
              name = os.path.join(opensslv_h[0], 'openssl/opensslv.h')
              if host_platform == 'darwin' and is_macosx_sdk_path(name):
-@@ -1216,6 +1214,30 @@ class PyBuildExt(build_ext):
+@@ -1215,6 +1213,30 @@ class PyBuildExt(build_ext):
          dbm_order = ['gdbm']
          # The standard Unix dbm module:
          if host_platform not in ['cygwin']:
@@ -98,7 +107,7 @@ $NetBSD: patch-setup.py,v 1.2 2016/07/02
              config_args = [arg.strip("'")
                             for arg in sysconfig.get_config_var("CONFIG_ARGS").split()]
              dbm_args = [arg for arg in config_args
-@@ -1227,7 +1249,7 @@ class PyBuildExt(build_ext):
+@@ -1226,7 +1248,7 @@ class PyBuildExt(build_ext):
              dbmext = None
              for cand in dbm_order:
                  if cand == "ndbm":
@@ -107,7 +116,7 @@ $NetBSD: patch-setup.py,v 1.2 2016/07/02
                          # Some systems have -lndbm, others have -lgdbm_compat,
                          # others don't have either
                          if self.compiler.find_library_file(lib_dirs,
-@@ -2027,10 +2049,7 @@ class PyBuildExt(build_ext):
+@@ -2028,10 +2050,7 @@ class PyBuildExt(build_ext):
              depends = ['_decimal/docstrings.h']
          else:
              srcdir = sysconfig.get_config_var('srcdir')
@@ -119,7 +128,7 @@ $NetBSD: patch-setup.py,v 1.2 2016/07/02
              libraries = []
              sources = [
                '_decimal/_decimal.c',
-@@ -2276,7 +2295,7 @@ def main():
+@@ -2277,7 +2296,7 @@ def main():
            # If you change the scripts installed here, you also need to
            # check the PyBuildScripts command above, and change the links
            # created by the bininstall target in Makefile.pre.in



Home | Main Index | Thread Index | Old Index