Import Upstream version 2.7.18
This commit is contained in:
200
Mac/BuildScript/README.rst
Normal file
200
Mac/BuildScript/README.rst
Normal file
@@ -0,0 +1,200 @@
|
||||
Building a Python Mac OS X distribution
|
||||
=======================================
|
||||
|
||||
WARNING
|
||||
-------
|
||||
|
||||
The instructions in this README are incomplete and not up-to-date.
|
||||
In particular, they do not explain how to create a modern flat installer
|
||||
package from the now obsolete bundle-format installer package produced
|
||||
by ``build-installer.py``.
|
||||
|
||||
The ``build-installer.py`` script creates Python distributions, including
|
||||
certain third-party libraries as necessary. It builds a complete
|
||||
framework-based Python out-of-tree, installs it in a funny place with
|
||||
$DESTROOT, massages that installation to remove .pyc files and such, creates
|
||||
an Installer package from the installation plus other files in ``resources``
|
||||
and ``scripts`` and placed that on a ``.dmg`` disk image.
|
||||
|
||||
This installers built by this script are legacy bundle installers that have
|
||||
been supported from the early days of OS X. In particular, they are supported
|
||||
on OS X 10.3.9, the earliest supported release for builds from this script.
|
||||
|
||||
Beginning with Python 2.7.9, PSF practice is to build two installer variants
|
||||
using the newer flat package format, supported on 10.5+, and signed with the
|
||||
builder's Apple developer key, allowing downloaded packages to satisfy Apple's
|
||||
default Gatekeeper policy (e.g. starting with 10.8, Apple store downloads and
|
||||
Apple developer ID signed apps and installer packages). The process for
|
||||
transforming the output build artifacts into signed flat packages is not
|
||||
yet integrated into ``build-installer.py``.
|
||||
|
||||
1. 32-bit-only, i386 and PPC universal, capable on running on all machines
|
||||
supported by Mac OS X 10.5 through (at least) 10.10::
|
||||
|
||||
/usr/bin/python build-installer.py \
|
||||
--sdk-path=/Developer/SDKs/MacOSX10.5.sdk \
|
||||
--universal-archs=32-bit \
|
||||
--dep-target=10.5
|
||||
|
||||
- builds the following third-party libraries
|
||||
|
||||
* libcrypto and libssl from OpenSSL 1.0.1
|
||||
* NCurses 5.9
|
||||
* SQLite 3.28.0
|
||||
* Oracle Sleepycat DB 4.8 (Python 2.x only)
|
||||
|
||||
- uses system-supplied versions of third-party libraries
|
||||
|
||||
* readline module links with Apple BSD editline (libedit)
|
||||
|
||||
- requires ActiveState ``Tcl/Tk 8.4`` (currently 8.4.20) to be installed for building
|
||||
|
||||
- recommended build environment:
|
||||
|
||||
* Mac OS X 10.5.8 Intel or PPC
|
||||
* Xcode 3.1.4
|
||||
* ``MacOSX10.5`` SDK
|
||||
* ``MACOSX_DEPLOYMENT_TARGET=10.5``
|
||||
* Apple ``gcc-4.2``
|
||||
* bootstrap non-framework Python 2.7 for documentation build with
|
||||
Sphinx (as of 2.7.9)
|
||||
|
||||
- alternate build environments:
|
||||
|
||||
* Mac OS X 10.6.8 with Xcode 3.2.6
|
||||
- need to change ``/System/Library/Frameworks/{Tcl,Tk}.framework/Version/Current`` to ``8.4``
|
||||
* Note Xcode 4.* does not support building for PPC so cannot be used for this build
|
||||
|
||||
2. 64-bit / 32-bit, x86_64 and i386 universal, for OS X 10.6 (and later)::
|
||||
|
||||
/usr/bin/python build-installer.py \
|
||||
--sdk-path=/Developer/SDKs/MacOSX10.6.sdk \
|
||||
--universal-archs=intel \
|
||||
--dep-target=10.6
|
||||
|
||||
- builds the following third-party libraries
|
||||
|
||||
* NCurses 5.9 (http://bugs.python.org/issue15037)
|
||||
* SQLite 3.7.13
|
||||
* Oracle Sleepycat DB 4.8 (Python 2.x only)
|
||||
|
||||
- uses system-supplied versions of third-party libraries
|
||||
|
||||
* libcrypto and libssl from Apple OpenSSL 0.9.8
|
||||
* readline module links with Apple BSD editline (libedit)
|
||||
|
||||
- requires ActiveState Tcl/Tk 8.5.15 (or later) to be installed for building
|
||||
|
||||
- recommended build environment:
|
||||
|
||||
* Mac OS X 10.6.8 (or later)
|
||||
* Xcode 3.2.6
|
||||
* ``MacOSX10.6`` SDK
|
||||
* ``MACOSX_DEPLOYMENT_TARGET=10.6``
|
||||
* Apple ``gcc-4.2``
|
||||
* bootstrap non-framework Python 2.7 for documentation build with
|
||||
Sphinx (as of 2.7.9)
|
||||
|
||||
- alternate build environments:
|
||||
|
||||
* none. Xcode 4.x currently supplies two C compilers.
|
||||
``llvm-gcc-4.2.1`` has been found to miscompile Python 3.3.x and
|
||||
produce a non-functional Python executable. As it appears to be
|
||||
considered a migration aid by Apple and is not likely to be fixed,
|
||||
its use should be avoided. The other compiler, ``clang``, has been
|
||||
undergoing rapid development. While it appears to have become
|
||||
production-ready in the most recent Xcode 5 releases, the versions
|
||||
available on the deprecated Xcode 4.x for 10.6 were early releases
|
||||
and did not receive the level of exposure in production environments
|
||||
that the Xcode 3 gcc-4.2 compiler has had.
|
||||
|
||||
|
||||
General Prerequisites
|
||||
---------------------
|
||||
|
||||
* No Fink (in ``/sw``) or MacPorts (in ``/opt/local``) or other local
|
||||
libraries or utilities (in ``/usr/local``) as they could
|
||||
interfere with the build.
|
||||
|
||||
* The documentation for the release is built using Sphinx
|
||||
because it is included in the installer. For 2.7.x up to and including
|
||||
2.7.8, the ``Doc/Makefile`` used ``svn`` to download repos of
|
||||
``Sphinx`` and its dependencies. Beginning with 2.7.9, the ``Doc/Makefile``
|
||||
assumes there is an externally-provided ``sphinx-build`` and requires at
|
||||
least Python 2.6 to run. Because of this, it is no longer possible to
|
||||
build a 2.7.9 or later installer on OS X 10.5 using the Apple-supplied
|
||||
Python 2.5.
|
||||
|
||||
* It is safest to start each variant build with an empty source directory
|
||||
populated with a fresh copy of the untarred source.
|
||||
|
||||
* It is recommended that you remove any existing installed version of the
|
||||
Python being built::
|
||||
|
||||
sudo rm -rf /Library/Frameworks/Python.framework/Versions/n.n
|
||||
|
||||
|
||||
The Recipe
|
||||
----------
|
||||
|
||||
Here are the steps you need to follow to build a Python installer:
|
||||
|
||||
* Run ``build-installer.py``. Optionally you can pass a number of arguments
|
||||
to specify locations of various files. Please see the top of
|
||||
``build-installer.py`` for its usage.
|
||||
|
||||
Running this script takes some time, it will not only build Python itself
|
||||
but also some 3rd-party libraries that are needed for extensions.
|
||||
|
||||
* When done the script will tell you where the DMG image is (by default
|
||||
somewhere in ``/tmp/_py``).
|
||||
|
||||
Building other universal installers
|
||||
...................................
|
||||
|
||||
It is also possible to build a 4-way universal installer that runs on
|
||||
OS X 10.5 Leopard or later::
|
||||
|
||||
/usr/bin/python /build-installer.py \
|
||||
--dep-target=10.5
|
||||
--universal-archs=all
|
||||
--sdk-path=/Developer/SDKs/MacOSX10.5.sdk
|
||||
|
||||
This requires that the deployment target is 10.5, and hence
|
||||
also that you are building on at least OS X 10.5. 4-way includes
|
||||
``i386``, ``x86_64``, ``ppc``, and ``ppc64`` (G5). ``ppc64`` executable
|
||||
variants can only be run on G5 machines running 10.5. Note that,
|
||||
while OS X 10.6 is only supported on Intel-based machines, it is possible
|
||||
to run ``ppc`` (32-bit) executables unmodified thanks to the Rosetta ppc
|
||||
emulation in OS X 10.5 and 10.6. The 4-way installer variant must be
|
||||
built with Xcode 3. It is not regularly built or tested.
|
||||
|
||||
Other ``--universal-archs`` options are ``64-bit`` (``x86_64``, ``ppc64``),
|
||||
and ``3-way`` (``ppc``, ``i386``, ``x86_64``). None of these options
|
||||
are regularly exercised; use at your own risk.
|
||||
|
||||
|
||||
Testing
|
||||
-------
|
||||
|
||||
Ideally, the resulting binaries should be installed and the test suite run
|
||||
on all supported OS X releases and architectures. As a practical matter,
|
||||
that is generally not possible. At a minimum, variant 1 should be run on
|
||||
a PPC G4 system with OS X 10.5 and at least one Intel system running OS X
|
||||
10.8, 10.7, 10.6, or 10.5. Variant 2 should be run on 10.8, 10.7, and 10.6
|
||||
systems in both 32-bit and 64-bit modes.::
|
||||
|
||||
/usr/local/bin/pythonn.n -m test -w -u all,-largefile
|
||||
/usr/local/bin/pythonn.n-32 -m test -w -u all
|
||||
|
||||
Certain tests will be skipped and some cause the interpreter to fail
|
||||
which will likely generate ``Python quit unexpectedly`` alert messages
|
||||
to be generated at several points during a test run. These are normal
|
||||
during testing and can be ignored.
|
||||
|
||||
It is also recommend to launch IDLE and verify that it is at least
|
||||
functional. Double-click on the IDLE app icon in ``/Applications/Pythonn.n``.
|
||||
It should also be tested from the command line::
|
||||
|
||||
/usr/local/bin/idlen.n
|
||||
|
||||
1666
Mac/BuildScript/build-installer.py
Executable file
1666
Mac/BuildScript/build-installer.py
Executable file
File diff suppressed because it is too large
Load Diff
20
Mac/BuildScript/resources/Conclusion.rtf
Normal file
20
Mac/BuildScript/resources/Conclusion.rtf
Normal file
@@ -0,0 +1,20 @@
|
||||
{\rtf1\ansi\ansicpg1252\cocoartf1561\cocoasubrtf200
|
||||
{\fonttbl\f0\fswiss\fcharset0 Helvetica;\f1\fnil\fcharset0 LucidaGrande-Bold;\f2\fnil\fcharset0 LucidaGrande;
|
||||
\f3\fnil\fcharset0 Monaco;}
|
||||
{\colortbl;\red255\green255\blue255;}
|
||||
{\*\expandedcolortbl;;}
|
||||
\margl1440\margr1440\vieww10540\viewh8400\viewkind0
|
||||
\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0
|
||||
|
||||
\f0\fs28 \cf0 Congratulations!
|
||||
\fs24
|
||||
\f1\b\fs28 Python $FULL_VERSION for macOS $MACOSX_DEPLOYMENT_TARGET
|
||||
\f2\b0 was successfully installed.
|
||||
\fs24 \
|
||||
\
|
||||
One more thing: to verify the identity of secure network connections, this Python needs a set of SSL root certificates. You can download and install a current curated set from {\field{\*\fldinst{HYPERLINK "https://pypi.org/project/certifi/"}}{\fldrslt the Certifi project}} by double-clicking on the
|
||||
\f3 Install Certificates
|
||||
\f2 icon in {\field{\*\fldinst{HYPERLINK "file://localhost/Applications/Python%20$VERSION/"}}{\fldrslt the Finder window}}. See {\field{\*\fldinst{HYPERLINK "file://localhost/Applications/Python%20$VERSION/ReadMe.rtf"}}{\fldrslt the
|
||||
\f3 ReadMe
|
||||
\f2 file}} for more information.\
|
||||
}
|
||||
143
Mac/BuildScript/resources/License.rtf
Normal file
143
Mac/BuildScript/resources/License.rtf
Normal file
@@ -0,0 +1,143 @@
|
||||
{\rtf1\ansi\ansicpg1252\cocoartf2511
|
||||
\cocoatextscaling0\cocoaplatform0{\fonttbl\f0\fswiss\fcharset0 Helvetica-Bold;\f1\fswiss\fcharset0 Helvetica;\f2\fmodern\fcharset0 CourierNewPS-BoldMT;
|
||||
\f3\fmodern\fcharset0 CourierNewPSMT;}
|
||||
{\colortbl;\red255\green255\blue255;}
|
||||
{\*\expandedcolortbl;;}
|
||||
\margl1440\margr1440\vieww14620\viewh13380\viewkind0
|
||||
\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0
|
||||
|
||||
\f0\b\fs36 \cf0 \ul \ulc0 HISTORY AND LICENSE\
|
||||
|
||||
\fs24 \
|
||||
HISTORY OF THE SOFTWARE\
|
||||
|
||||
\f1\b0 \ulnone \
|
||||
Python was created in the early 1990s by Guido van Rossum at Stichting Mathematisch Centrum (CWI, see http://www.cwi.nl) in the Netherlands as a successor of a language called ABC. Guido remains Python's principal author, although it includes many contributions from others.\
|
||||
\
|
||||
In 1995, Guido continued his work on Python at the Corporation for National Research Initiatives (CNRI, see http://www.cnri.reston.va.us) in Reston, Virginia where he released several versions of the software.\
|
||||
\
|
||||
In May 2000, Guido and the Python core development team moved to BeOpen.com to form the BeOpen PythonLabs team. In October of the same year, the PythonLabs team moved to Digital Creations (now Zope Corporation, see http://www.zope.org). In 2001, the Python Software Foundation (PSF, see http://www.python.org/psf/) was formed, a non-profit organization created specifically to own Python-related Intellectual Property. Zope Corporation is a sponsoring member of the PSF.\
|
||||
\
|
||||
All Python releases are Open Source (see http://www.opensource.org for the Open Source Definition). Historically, most, but not all, Python releases have also been GPL-compatible; the table below summarizes the various releases.\
|
||||
\
|
||||
|
||||
\f2\b Release Derived Year Owner GPL-\
|
||||
from compatible?\
|
||||
|
||||
\f3\b0 \
|
||||
0.9.0 thru 1.2 n/a 1991-1995 CWI yes\
|
||||
1.3 thru 1.5.2 1.2 1995-1999 CNRI yes\
|
||||
1.6 1.5.2 2000 CNRI no\
|
||||
2.0 1.6 2000 BeOpen.com no\
|
||||
1.6.1 1.6 2001 CNRI no\
|
||||
2.1 2.0+1.6.1 2001 PSF no\
|
||||
2.0.1 2.0+1.6.1 2001 PSF yes\
|
||||
2.1.1 2.1+2.0.1 2001 PSF yes\
|
||||
2.1.2 2.1.1 2002 PSF yes\
|
||||
2.1.3 2.1.2 2002 PSF yes\
|
||||
2.2 and above 2.1.1 2001-now PSF yes\
|
||||
|
||||
\f1 \
|
||||
|
||||
\f0\b Note:
|
||||
\f1\b0 GPL-compatible doesn't mean that we're distributing Python under the GPL. All Python licenses, unlike the GPL, let you distribute a modified version without making your changes open source. The GPL-compatible licenses make it possible to combine Python with other software that is released under the GPL; the others don't.\
|
||||
\
|
||||
Thanks to the many outside volunteers who have worked under Guido's direction to make these releases possible.\
|
||||
\
|
||||
\
|
||||
|
||||
\f0\b \ul TERMS AND CONDITIONS FOR ACCESSING OR OTHERWISE USING PYTHON\
|
||||
|
||||
\f1\b0 \ulnone \
|
||||
|
||||
\f0\b PYTHON SOFTWARE FOUNDATION LICENSE VERSION 2\
|
||||
|
||||
\f1\b0 \
|
||||
1. This LICENSE AGREEMENT is between the Python Software Foundation ("PSF"), and the Individual or Organization ("Licensee") accessing and otherwise using this software ("Python") in source or binary form and its associated documentation.\
|
||||
\
|
||||
2. Subject to the terms and conditions of this License Agreement, PSF hereby grants Licensee a nonexclusive, royalty-free, world-wide license to reproduce, analyze, test, perform and/or display publicly, prepare derivative works, distribute, and otherwise use Python alone or in any derivative version, provided, however, that PSF's License Agreement and PSF's notice of copyright, i.e., "Copyright \'a9 2001-2020 Python Software Foundation; All Rights Reserved" are retained in Python alone or in any derivative version prepared by Licensee.\
|
||||
\
|
||||
3. In the event Licensee prepares a derivative work that is based on or incorporates Python or any part thereof, and wants to make the derivative work available to others as provided herein, then Licensee hereby agrees to include in any such work a brief summary of the changes made to Python.\
|
||||
\
|
||||
4. PSF is making Python available to Licensee on an "AS IS" basis. PSF MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, PSF MAKES NO AND DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF PYTHON WILL NOT INFRINGE ANY THIRD PARTY RIGHTS.\
|
||||
\
|
||||
5. PSF SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF PYTHON FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS AS A RESULT OF MODIFYING, DISTRIBUTING, OR OTHERWISE USING PYTHON, OR ANY DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF.\
|
||||
\
|
||||
6. This License Agreement will automatically terminate upon a material breach of its terms and conditions.\
|
||||
\
|
||||
7. Nothing in this License Agreement shall be deemed to create any relationship of agency, partnership, or joint venture between PSF and Licensee. This License Agreement does not grant permission to use PSF trademarks or trade name in a trademark sense to endorse or promote products or services of Licensee, or any third party.\
|
||||
\
|
||||
8. By copying, installing or otherwise using Python, Licensee agrees to be bound by the terms and conditions of this License Agreement.\
|
||||
\
|
||||
\
|
||||
|
||||
\f0\b BEOPEN.COM LICENSE AGREEMENT FOR PYTHON 2.0\
|
||||
|
||||
\f1\b0 \
|
||||
BEOPEN PYTHON OPEN SOURCE LICENSE AGREEMENT VERSION 1\
|
||||
\
|
||||
1. This LICENSE AGREEMENT is between BeOpen.com ("BeOpen"), having an office at 160 Saratoga Avenue, Santa Clara, CA 95051, and the Individual or Organization ("Licensee") accessing and otherwise using this software in source or binary form and its associated documentation ("the Software").\
|
||||
\
|
||||
2. Subject to the terms and conditions of this BeOpen Python License Agreement, BeOpen hereby grants Licensee a non-exclusive, royalty-free, world-wide license to reproduce, analyze, test, perform and/or display publicly, prepare derivative works, distribute, and otherwise use the Software alone or in any derivative version, provided, however, that the BeOpen Python License is retained in the Software, alone or in any derivative version prepared by Licensee.\
|
||||
\
|
||||
3. BeOpen is making the Software available to Licensee on an "AS IS" basis. BEOPEN MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, BEOPEN MAKES NO AND DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF THE SOFTWARE WILL NOT INFRINGE ANY THIRD PARTY RIGHTS.\
|
||||
\
|
||||
4. BEOPEN SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF THE SOFTWARE FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS AS A RESULT OF USING, MODIFYING OR DISTRIBUTING THE SOFTWARE, OR ANY DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF.\
|
||||
\
|
||||
5. This License Agreement will automatically terminate upon a material breach of its terms and conditions.\
|
||||
\
|
||||
6. This License Agreement shall be governed by and interpreted in all respects by the law of the State of California, excluding conflict of law provisions. Nothing in this License Agreement shall be deemed to create any relationship of agency, partnership, or joint venture between BeOpen and Licensee. This License Agreement does not grant permission to use BeOpen trademarks or trade names in a trademark sense to endorse or promote products or services of Licensee, or any third party. As an exception, the "BeOpen Python" logos available at http://www.pythonlabs.com/logos.html may be used according to the permissions granted on that web page.\
|
||||
\
|
||||
7. By copying, installing or otherwise using the software, Licensee agrees to be bound by the terms and conditions of this License Agreement.\
|
||||
\
|
||||
\
|
||||
|
||||
\f0\b CNRI LICENSE AGREEMENT FOR PYTHON 1.6.1\
|
||||
|
||||
\f1\b0 \
|
||||
1. This LICENSE AGREEMENT is between the Corporation for National Research Initiatives, having an office at 1895 Preston White Drive, Reston, VA 20191 ("CNRI"), and the Individual or Organization ("Licensee") accessing and otherwise using Python 1.6.1 software in source or binary form and its associated documentation.\
|
||||
\
|
||||
2. Subject to the terms and conditions of this License Agreement, CNRI hereby grants Licensee a nonexclusive, royalty-free, world-wide license to reproduce, analyze, test, perform and/or display publicly, prepare derivative works, distribute, and otherwise use Python 1.6.1 alone or in any derivative version, provided, however, that CNRI's License Agreement and CNRI's notice of copyright, i.e., "Copyright (c) 1995-2001 Corporation for National Research Initiatives; All Rights Reserved" are retained in Python 1.6.1 alone or in any derivative version prepared by Licensee. Alternately, in lieu of CNRI's License Agreement, Licensee may substitute the following text (omitting the quotes): "Python 1.6.1 is made available subject to the terms and conditions in CNRI's License Agreement. This Agreement together with Python 1.6.1 may be located on the Internet using the following unique, persistent identifier (known as a handle): 1895.22/1013. This Agreement may also be obtained from a proxy server on the Internet using the following URL: http://hdl.handle.net/1895.22/1013".\
|
||||
\
|
||||
3. In the event Licensee prepares a derivative work that is based on or incorporates Python 1.6.1 or any part thereof, and wants to make the derivative work available to others as provided herein, then Licensee hereby agrees to include in any such work a brief summary of the changes made to Python 1.6.1.\
|
||||
\
|
||||
4. CNRI is making Python 1.6.1 available to Licensee on an "AS IS" basis. CNRI MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, CNRI MAKES NO AND DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF PYTHON 1.6.1 WILL NOT INFRINGE ANY THIRD PARTY RIGHTS.\
|
||||
\
|
||||
5. CNRI SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF PYTHON 1.6.1 FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS AS A RESULT OF MODIFYING, DISTRIBUTING, OR OTHERWISE USING PYTHON 1.6.1, OR ANY DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF.\
|
||||
\
|
||||
6. This License Agreement will automatically terminate upon a material breach of its terms and conditions.\
|
||||
\
|
||||
7. This License Agreement shall be governed by the federal intellectual property law of the United States, including without limitation the federal copyright law, and, to the extent such U.S. federal law does not apply, by the law of the Commonwealth of Virginia, excluding Virginia's conflict of law provisions. Notwithstanding the foregoing, with regard to derivative works based on Python 1.6.1 that incorporate non-separable material that was previously distributed under the GNU General Public License (GPL), the law of the Commonwealth of Virginia shall govern this License Agreement only as to issues arising under or with respect to Paragraphs 4, 5, and 7 of this License Agreement. Nothing in this License Agreement shall be deemed to create any relationship of agency, partnership, or joint venture between CNRI and Licensee. This License Agreement does not grant permission to use CNRI trademarks or trade name in a trademark sense to endorse or promote products or services of Licensee, or any third party.\
|
||||
\
|
||||
8. By clicking on the "ACCEPT" button where indicated, or by copying, installing or otherwise using Python 1.6.1, Licensee agrees to be bound by the terms and conditions of this License Agreement.\
|
||||
\
|
||||
ACCEPT\
|
||||
\
|
||||
\
|
||||
|
||||
\f0\b CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2\
|
||||
|
||||
\f1\b0 \
|
||||
Copyright (c) 1991 - 1995, Stichting Mathematisch Centrum Amsterdam, The Netherlands. All rights reserved.\
|
||||
\
|
||||
Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation, and that the name of Stichting Mathematisch Centrum or CWI not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission.\
|
||||
\
|
||||
STICHTING MATHEMATISCH CENTRUM DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH CENTRUM BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.\
|
||||
\
|
||||
\
|
||||
|
||||
\f0\b \ul LICENSES AND ACKNOWLEDGEMENTS FOR INCORPORATED SOFTWARE\
|
||||
|
||||
\f1\b0 \ulnone \
|
||||
This installer incorporates portions of the following third-party software:\
|
||||
\
|
||||
|
||||
\f3 $THIRD_PARTY_LIBS\
|
||||
\
|
||||
|
||||
\f1 For licenses and acknowledgements for these and other third-party software incorporated in this Python distribution, please refer to the on-line documentation {\field{\*\fldinst{HYPERLINK "https://docs.python.org/$VERSION/license.html#licenses-and-acknowledgements-for-incorporated-software"}}{\fldrslt here}}.\
|
||||
\
|
||||
\
|
||||
\
|
||||
\
|
||||
}
|
||||
81
Mac/BuildScript/resources/ReadMe.rtf
Normal file
81
Mac/BuildScript/resources/ReadMe.rtf
Normal file
@@ -0,0 +1,81 @@
|
||||
{\rtf1\ansi\ansicpg1252\cocoartf2512
|
||||
\cocoatextscaling0\cocoaplatform0{\fonttbl\f0\fswiss\fcharset0 Helvetica;\f1\fswiss\fcharset0 Helvetica-Bold;\f2\fswiss\fcharset0 Helvetica-Oblique;
|
||||
\f3\fmodern\fcharset0 CourierNewPSMT;}
|
||||
{\colortbl;\red255\green255\blue255;}
|
||||
{\*\expandedcolortbl;;}
|
||||
\margl1440\margr1440\vieww14900\viewh15540\viewkind0
|
||||
\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0
|
||||
|
||||
\f0\fs24 \cf0 This package will install Python $FULL_VERSION for macOS $MACOSX_DEPLOYMENT_TARGET for the following architecture(s): $ARCHITECTURES.\
|
||||
\
|
||||
\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\partightenfactor0
|
||||
|
||||
\f1\b \cf0 NOTE: \ul Python 2.7,x has now reached end-of-life. This release, Python 2.7.18, is the FINAL RELEASE of Python 2.7.x. It will no longer be supported or updated\ulnone .
|
||||
\f0\b0 You should
|
||||
\f1\b upgrade to Python 3
|
||||
\f0\b0 as soon as you can. {\field{\*\fldinst{HYPERLINK "https://www.python.org/doc/sunset-python-2/"}}{\fldrslt Read more here}}.\
|
||||
\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0
|
||||
\cf0 \
|
||||
\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0
|
||||
|
||||
\f1\b \cf0 \ul \ulc0 Certificate verification and OpenSSL\
|
||||
|
||||
\f0\b0 \ulnone \
|
||||
This package includes its own private copy of OpenSSL 1.0.2. The trust certificates in system and user keychains managed by the
|
||||
\f2\i Keychain Access
|
||||
\f0\i0 application and the
|
||||
\f2\i security
|
||||
\f0\i0 command line utility are not used as defaults by the Python
|
||||
\f3 ssl
|
||||
\f0 module. A sample command script is included in
|
||||
\f3 /Applications/Python 2.7
|
||||
\f0 to install a curated bundle of default root certificates from the third-party
|
||||
\f3 certifi
|
||||
\f0 package ({\field{\*\fldinst{HYPERLINK "https://pypi.org/project/certifi/"}}{\fldrslt https://pypi.org/project/certifi/}}). Double-click on
|
||||
\f3 Install Certificates
|
||||
\f0 to run it.\
|
||||
\
|
||||
The bundled
|
||||
\f3 pip
|
||||
\f0 has its own default certificate store for verifying download connections.\
|
||||
\
|
||||
|
||||
\f1\b \ul Which installer variant should I use?
|
||||
\f0\b0 \ulnone \
|
||||
\
|
||||
\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\partightenfactor0
|
||||
\cf0 Use the
|
||||
\f1\b macOS 64-bit installer for OS X 10.9 and later
|
||||
\f0\b0 . As of 2.7.18, the deprecated
|
||||
\f1\b macOS 64-bit/32-bit installer for Mac OS X 10.6 and later
|
||||
\f0\b0 variant is no longer provided. \
|
||||
\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0
|
||||
|
||||
\f1\b \cf0 \ul \ulc0 \
|
||||
Using IDLE or other Tk applications
|
||||
\f0\b0 \ulnone \
|
||||
\
|
||||
This package includes its own private version of Tcl/Tk 8.6. It does not use any system-supplied or third-party supplied versions of Tcl/Tk.\
|
||||
\
|
||||
Due to new security checks on macOS 10.15 Catalina, when launching IDLE macOS may open a window with a message
|
||||
\f1\b "Python" would like to access files in your Documents folder
|
||||
\f0\b0 . This is normal as IDLE uses your
|
||||
\f1\b Documents
|
||||
\f0\b0 folder as its default when opening and saving files; you can still choose other locations in the
|
||||
\f1\b Open
|
||||
\f0\b0 and
|
||||
\f1\b Save
|
||||
\f0\b0 file dialog windows. Click on the
|
||||
\f1\b OK
|
||||
\f0\b0 button to proceed.\
|
||||
|
||||
\f1\b \ul \
|
||||
Other changes\
|
||||
\
|
||||
|
||||
\f0\b0 \ulnone For other changes in this release, see the
|
||||
\f2\i What's new
|
||||
\f0\i0 section in the {\field{\*\fldinst{HYPERLINK "https://www.python.org/doc/"}}{\fldrslt Documentation Set}} for this release and its
|
||||
\f2\i Release Notes
|
||||
\f0\i0 link at {\field{\*\fldinst{HYPERLINK "https://www.python.org/downloads/"}}{\fldrslt https://www.python.org/downloads/}}.\
|
||||
}
|
||||
33
Mac/BuildScript/resources/Welcome.rtf
Normal file
33
Mac/BuildScript/resources/Welcome.rtf
Normal file
@@ -0,0 +1,33 @@
|
||||
{\rtf1\ansi\ansicpg1252\cocoartf2512
|
||||
\cocoascreenfonts1\cocoatextscaling0\cocoaplatform0{\fonttbl\f0\fswiss\fcharset0 Helvetica;\f1\fswiss\fcharset0 Helvetica-Bold;\f2\fmodern\fcharset0 CourierNewPSMT;
|
||||
}
|
||||
{\colortbl;\red255\green255\blue255;}
|
||||
{\*\expandedcolortbl;;}
|
||||
\paperw11905\paperh16837\margl1440\margr1440\vieww13360\viewh10920\viewkind0
|
||||
\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0
|
||||
|
||||
\f0\fs24 \cf0 This package will install
|
||||
\f1\b Python $FULL_VERSION
|
||||
\f0\b0 for
|
||||
\f1\b macOS $MACOSX_DEPLOYMENT_TARGET
|
||||
\f0\b0 .\
|
||||
\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\partightenfactor0
|
||||
\cf0 \
|
||||
|
||||
\f1\b Python for macOS
|
||||
\f0\b0 consists of the {\field{\*\fldinst{HYPERLINK "https://www.python.org"}}{\fldrslt Python}} programming language interpreter and its batteries-included standard library to allow easy access to macOS features. It also includes the Python integrated development environment,
|
||||
\f1\b IDLE
|
||||
\f0\b0 . You can also use the included
|
||||
\f1\b pip
|
||||
\f0\b0 to download and install third-party packages from the {\field{\*\fldinst{HYPERLINK "https://pypi.org"}}{\fldrslt Python Package Index}}. \
|
||||
\
|
||||
At the end of this install, click on
|
||||
\f2 Install Certificates
|
||||
\f0 to install a set of current SSL root certificates.\
|
||||
\
|
||||
|
||||
\f1\b NOTE: \ul Python 2.7,x has now reached end-of-life. This release, Python 2.7.18, is the FINAL RELEASE of Python 2.7.x. It will no longer be supported or updated\ulnone .
|
||||
\f0\b0 You should
|
||||
\f1\b upgrade to Python 3
|
||||
\f0\b0 as soon as you can. {\field{\*\fldinst{HYPERLINK "https://www.python.org/doc/sunset-python-2/"}}{\fldrslt Read more here}}.\
|
||||
}
|
||||
BIN
Mac/BuildScript/resources/background.jpg
Normal file
BIN
Mac/BuildScript/resources/background.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 44 KiB |
48
Mac/BuildScript/resources/install_certificates.command
Executable file
48
Mac/BuildScript/resources/install_certificates.command
Executable file
@@ -0,0 +1,48 @@
|
||||
#!/bin/sh
|
||||
|
||||
/Library/Frameworks/Python.framework/Versions/@PYVER@/bin/python@PYVER@ << "EOF"
|
||||
|
||||
# install_certifi.py
|
||||
#
|
||||
# sample script to install or update a set of default Root Certificates
|
||||
# for the ssl module. Uses the certificates provided by the certifi package:
|
||||
# https://pypi.org/project/certifi/
|
||||
|
||||
import os
|
||||
import os.path
|
||||
import ssl
|
||||
import stat
|
||||
import subprocess
|
||||
import sys
|
||||
|
||||
STAT_0o775 = ( stat.S_IRUSR | stat.S_IWUSR | stat.S_IXUSR
|
||||
| stat.S_IRGRP | stat.S_IWGRP | stat.S_IXGRP
|
||||
| stat.S_IROTH | stat.S_IXOTH )
|
||||
|
||||
def main():
|
||||
openssl_dir, openssl_cafile = os.path.split(
|
||||
ssl.get_default_verify_paths().openssl_cafile)
|
||||
|
||||
print(" -- pip install --upgrade certifi")
|
||||
subprocess.check_call([sys.executable,
|
||||
"-E", "-s", "-m", "pip", "install", "--upgrade", "certifi"])
|
||||
|
||||
import certifi
|
||||
|
||||
# change working directory to the default SSL directory
|
||||
os.chdir(openssl_dir)
|
||||
relpath_to_certifi_cafile = os.path.relpath(certifi.where())
|
||||
print(" -- removing any existing file or link")
|
||||
try:
|
||||
os.remove(openssl_cafile)
|
||||
except OSError:
|
||||
pass
|
||||
print(" -- creating symlink to certifi certificate bundle")
|
||||
os.symlink(relpath_to_certifi_cafile, openssl_cafile)
|
||||
print(" -- setting permissions")
|
||||
os.chmod(openssl_cafile, STAT_0o775)
|
||||
print(" -- update complete")
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
EOF
|
||||
24
Mac/BuildScript/scripts/postflight.documentation
Executable file
24
Mac/BuildScript/scripts/postflight.documentation
Executable file
@@ -0,0 +1,24 @@
|
||||
#!/bin/sh
|
||||
|
||||
PYVER="@PYVER@"
|
||||
FWK="/Library/Frameworks/Python.framework/Versions/${PYVER}"
|
||||
FWK_DOCDIR_SUBPATH="Resources/English.lproj/Documentation"
|
||||
FWK_DOCDIR="${FWK}/${FWK_DOCDIR_SUBPATH}"
|
||||
APPDIR="/Applications/Python ${PYVER}"
|
||||
SHARE_DIR="${FWK}/share"
|
||||
SHARE_DOCDIR="${SHARE_DIR}/doc/python${PYVER}"
|
||||
SHARE_DOCDIR_TO_FWK="../../.."
|
||||
|
||||
# make link in /Applications/Python m.n/ for Finder users
|
||||
if [ -d "${APPDIR}" ]; then
|
||||
ln -fhs "${FWK_DOCDIR}/index.html" "${APPDIR}/Python Documentation.html"
|
||||
open "${APPDIR}" || true # open the applications folder
|
||||
fi
|
||||
|
||||
# make share/doc link in framework for command line users
|
||||
if [ -d "${SHARE_DIR}" ]; then
|
||||
mkdir -m 775 -p "${SHARE_DOCDIR}"
|
||||
# make relative link to html doc directory
|
||||
ln -fhs "${SHARE_DOCDIR_TO_FWK}/${FWK_DOCDIR_SUBPATH}" "${SHARE_DOCDIR}/html"
|
||||
fi
|
||||
|
||||
69
Mac/BuildScript/scripts/postflight.ensurepip
Executable file
69
Mac/BuildScript/scripts/postflight.ensurepip
Executable file
@@ -0,0 +1,69 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Install/upgrade pip.
|
||||
#
|
||||
|
||||
PYVER="@PYVER@"
|
||||
PYMAJOR="@PYMAJOR@"
|
||||
FWK="/Library/Frameworks/Python.framework/Versions/${PYVER}"
|
||||
RELFWKBIN="../../..${FWK}/bin"
|
||||
|
||||
umask 022
|
||||
|
||||
"${FWK}/bin/python${PYVER}" -m ensurepip --upgrade
|
||||
|
||||
"${FWK}/bin/python${PYVER}" -Wi \
|
||||
"${FWK}/lib/python${PYVER}/compileall.py" \
|
||||
-f -x badsyntax \
|
||||
"${FWK}/lib/python${PYVER}/site-packages"
|
||||
|
||||
"${FWK}/bin/python${PYVER}" -Wi -O \
|
||||
"${FWK}/lib/python${PYVER}/compileall.py" \
|
||||
-f -x badsyntax \
|
||||
"${FWK}/lib/python${PYVER}/site-packages"
|
||||
|
||||
chgrp -R admin "${FWK}/lib/python${PYVER}/site-packages" "${FWK}/bin"
|
||||
chmod -R g+w "${FWK}/lib/python${PYVER}/site-packages" "${FWK}/bin"
|
||||
|
||||
# We do not know if the user selected the Python command-line tools
|
||||
# package that installs symlinks to /usr/local/bin. So we assume
|
||||
# that the command-line tools package has already completed or was
|
||||
# not selected and we will only install /usr/local/bin symlinks for
|
||||
# pip et al if there are /usr/local/bin/python* symlinks to our
|
||||
# framework bin directory.
|
||||
|
||||
if [ -d /usr/local/bin ] ; then
|
||||
(
|
||||
install_links_if_our_fw() {
|
||||
if [ "$(readlink -n ./$1)" = "${RELFWKBIN}/$1" ] ; then
|
||||
shift
|
||||
for fn ;
|
||||
do
|
||||
if [ -e "${RELFWKBIN}/${fn}" ] ; then
|
||||
rm -f ./${fn}
|
||||
ln -s "${RELFWKBIN}/${fn}" "./${fn}"
|
||||
chgrp -h admin "./${fn}"
|
||||
chmod -h g+w "./${fn}"
|
||||
fi
|
||||
done
|
||||
fi
|
||||
}
|
||||
|
||||
cd /usr/local/bin
|
||||
|
||||
# Create pipx.y and easy_install-x.y links if /usr/local/bin/pythonx.y
|
||||
# is linked to this framework version
|
||||
install_links_if_our_fw "python${PYVER}" \
|
||||
"pip${PYVER}" "easy_install-${PYVER}"
|
||||
|
||||
# Create pipx link if /usr/local/bin/pythonx is linked to this version
|
||||
install_links_if_our_fw "python${PYMAJOR}" \
|
||||
"pip${PYMAJOR}"
|
||||
|
||||
# Create pip and easy_install link if /usr/local/bin/python
|
||||
# is linked to this version
|
||||
install_links_if_our_fw "python" \
|
||||
"pip" "easy_install"
|
||||
)
|
||||
fi
|
||||
exit 0
|
||||
32
Mac/BuildScript/scripts/postflight.framework
Executable file
32
Mac/BuildScript/scripts/postflight.framework
Executable file
@@ -0,0 +1,32 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Recompile the .py files.
|
||||
#
|
||||
|
||||
PYVER="@PYVER@"
|
||||
FWK="/Library/Frameworks/Python.framework/Versions/@PYVER@"
|
||||
|
||||
"${FWK}/bin/python@PYVER@" -Wi -tt \
|
||||
"${FWK}/lib/python${PYVER}/compileall.py" \
|
||||
-f -x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \
|
||||
"${FWK}/lib/python${PYVER}"
|
||||
|
||||
"${FWK}/bin/python@PYVER@" -Wi -tt -O \
|
||||
"${FWK}/lib/python${PYVER}/compileall.py" \
|
||||
-f -x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \
|
||||
"${FWK}/lib/python${PYVER}"
|
||||
|
||||
"${FWK}/bin/python@PYVER@" -Wi \
|
||||
"${FWK}/lib/python${PYVER}/compileall.py" \
|
||||
-f -x badsyntax \
|
||||
"${FWK}/lib/python${PYVER}/site-packages"
|
||||
|
||||
"${FWK}/bin/python@PYVER@" -Wi -O \
|
||||
"${FWK}/lib/python${PYVER}/compileall.py" \
|
||||
-f -x badsyntax \
|
||||
"${FWK}/lib/python${PYVER}/site-packages"
|
||||
|
||||
chgrp -R admin "${FWK}"
|
||||
chmod -R g+w "${FWK}"
|
||||
|
||||
exit 0
|
||||
99
Mac/BuildScript/scripts/postflight.patch-profile
Executable file
99
Mac/BuildScript/scripts/postflight.patch-profile
Executable file
@@ -0,0 +1,99 @@
|
||||
#!/bin/sh
|
||||
|
||||
echo "This script will update your shell profile when the 'bin' directory"
|
||||
echo "of python is not early enough of the PATH of your shell."
|
||||
echo "These changes will be effective only in shell windows that you open"
|
||||
echo "after running this script."
|
||||
|
||||
PYVER="@PYVER@"
|
||||
PYTHON_ROOT="/Library/Frameworks/Python.framework/Versions/@PYVER@"
|
||||
|
||||
if [ `id -ur` = 0 ]; then
|
||||
# Run from the installer, do some trickery to fetch the information
|
||||
# we need.
|
||||
theShell="`finger $USER | grep Shell: | head -1 | awk '{ print $NF }'`"
|
||||
|
||||
else
|
||||
theShell="${SHELL}"
|
||||
fi
|
||||
|
||||
# Make sure the directory ${PYTHON_ROOT}/bin is on the users PATH.
|
||||
BSH="`basename "${theShell}"`"
|
||||
case "${BSH}" in
|
||||
bash|ksh|sh|*csh|zsh)
|
||||
if [ `id -ur` = 0 ]; then
|
||||
P=`su - ${USER} -c 'echo A-X-4-X@@$PATH@@X-4-X-A' | grep 'A-X-4-X@@.*@@X-4-X-A' | sed -e 's/^A-X-4-X@@//g' -e 's/@@X-4-X-A$//g'`
|
||||
else
|
||||
P="`(exec -l ${theShell} -c 'echo $PATH')`"
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
echo "Sorry, I don't know how to patch $BSH shells"
|
||||
exit 0
|
||||
;;
|
||||
esac
|
||||
|
||||
# Now ensure that our bin directory is on $P and before /usr/bin at that
|
||||
for elem in `echo $P | tr ':' ' '`
|
||||
do
|
||||
if [ "${elem}" = "${PYTHON_ROOT}/bin" ]; then
|
||||
echo "All right, you're a python lover already"
|
||||
exit 0
|
||||
elif [ "${elem}" = "/usr/bin" ]; then
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
echo "${PYTHON_ROOT}/bin is not on your PATH or at least not early enough"
|
||||
case "${BSH}" in
|
||||
*csh)
|
||||
if [ -f "${HOME}/.tcshrc" ]; then
|
||||
RC="${HOME}/.tcshrc"
|
||||
else
|
||||
RC="${HOME}/.cshrc"
|
||||
fi
|
||||
# Create backup copy before patching
|
||||
if [ -f "${RC}" ]; then
|
||||
cp -fp "${RC}" "${RC}.pysave"
|
||||
fi
|
||||
echo "" >> "${RC}"
|
||||
echo "# Setting PATH for Python ${PYVER}" >> "${RC}"
|
||||
echo "# The original version is saved in .cshrc.pysave" >> "${RC}"
|
||||
echo "set path=(${PYTHON_ROOT}/bin "'$path'")" >> "${RC}"
|
||||
if [ `id -ur` = 0 ]; then
|
||||
chown "${USER}" "${RC}"
|
||||
fi
|
||||
exit 0
|
||||
;;
|
||||
bash)
|
||||
if [ -e "${HOME}/.bash_profile" ]; then
|
||||
PR="${HOME}/.bash_profile"
|
||||
elif [ -e "${HOME}/.bash_login" ]; then
|
||||
PR="${HOME}/.bash_login"
|
||||
elif [ -e "${HOME}/.profile" ]; then
|
||||
PR="${HOME}/.profile"
|
||||
else
|
||||
PR="${HOME}/.bash_profile"
|
||||
fi
|
||||
;;
|
||||
zsh)
|
||||
PR="${HOME}/.zprofile"
|
||||
;;
|
||||
*sh)
|
||||
PR="${HOME}/.profile"
|
||||
;;
|
||||
esac
|
||||
|
||||
# Create backup copy before patching
|
||||
if [ -f "${PR}" ]; then
|
||||
cp -fp "${PR}" "${PR}.pysave"
|
||||
fi
|
||||
echo "" >> "${PR}"
|
||||
echo "# Setting PATH for Python ${PYVER}" >> "${PR}"
|
||||
echo "# The original version is saved in `basename ${PR}`.pysave" >> "${PR}"
|
||||
echo 'PATH="'"${PYTHON_ROOT}/bin"':${PATH}"' >> "${PR}"
|
||||
echo 'export PATH' >> "${PR}"
|
||||
if [ `id -ur` = 0 ]; then
|
||||
chown "${USER}" "${PR}"
|
||||
fi
|
||||
exit 0
|
||||
26
Mac/BuildScript/seticon.m
Normal file
26
Mac/BuildScript/seticon.m
Normal file
@@ -0,0 +1,26 @@
|
||||
/*
|
||||
* Simple tool for setting an icon on a file.
|
||||
*/
|
||||
#import <Cocoa/Cocoa.h>
|
||||
#include <stdio.h>
|
||||
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
if (argc != 3) {
|
||||
fprintf(stderr, "Usage: seticon ICON TARGET");
|
||||
return 1;
|
||||
}
|
||||
|
||||
NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init];
|
||||
NSString* iconPath = [NSString stringWithUTF8String:argv[1]];
|
||||
NSString* filePath = [NSString stringWithUTF8String:argv[2]];
|
||||
|
||||
[NSApplication sharedApplication];
|
||||
|
||||
[[NSWorkspace sharedWorkspace]
|
||||
setIcon: [[NSImage alloc] initWithContentsOfFile: iconPath]
|
||||
forFile: filePath
|
||||
options: 0];
|
||||
[pool release];
|
||||
return 0;
|
||||
}
|
||||
18
Mac/BuildScript/tk868_on_10_8_10_9.patch
Normal file
18
Mac/BuildScript/tk868_on_10_8_10_9.patch
Normal file
@@ -0,0 +1,18 @@
|
||||
Fix build failure with +quartz variant on OS X 10.8 and 10.9.
|
||||
Even though Gestalt was deprecated in OS X 10.8, it should work fine
|
||||
through OS X 10.9, and its replacement NSOperatingSystemVersion was
|
||||
not introduced until OS X 10.10.
|
||||
|
||||
Patch from MacPorts project and reported upstream:
|
||||
https://trac.macports.org/ticket/55649
|
||||
--- tk8.6.8/macosx/tkMacOSXXStubs.c.orig 2017-12-06 09:25:08.000000000 -0600
|
||||
+++ tk8.6.8-patched/macosx/tkMacOSXXStubs.c 2018-01-06 19:34:17.000000000 -0600
|
||||
@@ -175,7 +175,7 @@
|
||||
{
|
||||
int major, minor, patch;
|
||||
|
||||
-#if MAC_OS_X_VERSION_MIN_REQUIRED < 1080
|
||||
+#if MAC_OS_X_VERSION_MIN_REQUIRED < 101000
|
||||
Gestalt(gestaltSystemVersionMajor, (SInt32*)&major);
|
||||
Gestalt(gestaltSystemVersionMinor, (SInt32*)&minor);
|
||||
Gestalt(gestaltSystemVersionBugFix, (SInt32*)&patch);
|
||||
Reference in New Issue
Block a user