Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
90f47b22
Commit
90f47b22
authored
Nov 22, 2013
by
Ned Deily
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue #19551: PEP 453 - OS X installer now installs or upgrades pip by default.
parent
6f1e78a0
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
120 additions
and
1 deletion
+120
-1
Mac/BuildScript/build-installer.py
Mac/BuildScript/build-installer.py
+22
-1
Mac/BuildScript/resources/ReadMe.txt
Mac/BuildScript/resources/ReadMe.txt
+31
-0
Mac/BuildScript/scripts/postflight.ensurepip
Mac/BuildScript/scripts/postflight.ensurepip
+65
-0
Misc/NEWS
Misc/NEWS
+2
-0
No files found.
Mac/BuildScript/build-installer.py
View file @
90f47b22
...
...
@@ -364,6 +364,7 @@ def library_recipes():
# Instructions for building packages inside the .mpkg.
def
pkg_recipes
():
unselected_for_python3
=
(
'selected'
,
'unselected'
)[
PYTHON_3
]
unselected_for_lt_python34
=
(
'selected'
,
'unselected'
)[
getVersionTuple
()
<
(
3
,
4
)]
result
=
[
dict
(
name
=
"PythonFramework"
,
...
...
@@ -432,10 +433,27 @@ def pkg_recipes():
topdir
=
"/Library/Frameworks/Python.framework"
,
source
=
"/empty-dir"
,
required
=
False
,
selected
=
unselected_for_
python3
,
selected
=
unselected_for_
lt_python34
,
),
]
if
getVersionTuple
()
>=
(
3
,
4
):
result
.
append
(
dict
(
name
=
"PythonInstallPip"
,
long_name
=
"Install or upgrade pip"
,
readme
=
"""
\
This package installs (or upgrades from an earlier version)
pip, a tool for installing and managing Python packages.
"""
,
postflight
=
"scripts/postflight.ensurepip"
,
topdir
=
"/Library/Frameworks/Python.framework"
,
source
=
"/empty-dir"
,
required
=
False
,
selected
=
'selected'
,
)
)
if
DEPTARGET
<
'10.4'
and
not
PYTHON_3
:
result
.
append
(
dict
(
...
...
@@ -453,6 +471,7 @@ def pkg_recipes():
selected
=
unselected_for_python3
,
)
)
return
result
def
fatal
(
msg
):
...
...
@@ -955,11 +974,13 @@ def buildPython():
runCommand
(
"%s -C --enable-framework --enable-universalsdk=%s "
"--with-universal-archs=%s "
"%s "
"%s "
"LDFLAGS='-g -L%s/libraries/usr/local/lib' "
"CFLAGS='-g -I%s/libraries/usr/local/include' 2>&1"
%
(
shellQuote
(
os
.
path
.
join
(
SRCDIR
,
'configure'
)),
shellQuote
(
SDKPATH
),
UNIVERSALARCHS
,
(
' '
,
'--with-computed-gotos '
)[
PYTHON_3
],
(
' '
,
'--without-ensurepip '
)[
getVersionTuple
()
>=
(
3
,
4
)],
shellQuote
(
WORKDIR
)[
1
:
-
1
],
shellQuote
(
WORKDIR
)[
1
:
-
1
]))
...
...
Mac/BuildScript/resources/ReadMe.txt
View file @
90f47b22
...
...
@@ -17,6 +17,37 @@ instead of double-clicking, control-click or right click the "Python"
installer package icon. Then select "Open using ... Installer" from
the contextual menu that appears.
**NEW* As of Python 3.4.0b1:
New Installation Options and Defaults
=====================================
The Python installer now includes an option to automatically install
or upgrade pip, a tool for installing and managing Python packages.
This option is enabled by default and no Internet access is required.
If you do want the installer to do this, select the "Customize" option
at the "Installation Type" step and uncheck the "Install or ugprade
pip" option.
To make it easier to use scripts installed by third-party Python
packages, with pip or by other means, the "Shell profile updater"
option is now enabled by default, as has been the case with Python
2.7.x installers. You can also turn this option off by selecting
"Customize" and unchecking the "Shell profile updater" option. You can
also update your shell profile later by launching the "Update Shell
Profile" command found in the /Applications/Python $VERSION folder. You may
need to start a new terminal window for the changes to take effect.
Python.org Python $VERSION and 2.7.x versions can both be installed and
will not conflict. Command names for Python 3 contain a 3 in them,
python3 (or python$VERSION), idle3 (or idle$VERSION), pip3 (or pip$VERSION), etc.
Python 2.7 command names contain a 2 or no digit: python2 (or
python2.7 or python), idle2 (or idle2.7 or idle), etc. If you want to
use pip with Python 2.7.x, you will need to download and install a
separate copy of it from the Python Package Index
(https://pypi.python.org/pypi).
**** IMPORTANT changes if you use IDLE and Tkinter ****
Installing a third-party version of Tcl/Tk is no longer required
...
...
Mac/BuildScript/scripts/postflight.ensurepip
0 → 100755
View file @
90f47b22
#!/bin/sh
#
# Install/upgrade pip.
#
PYVER
=
"@PYVER@"
PYMAJOR
=
"3"
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
(
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
if
[
"
$(
readlink
-n
./python
${
PYVER
}
)
"
=
"
${
RELFWKBIN
}
/python
${
PYVER
}
"
]
;
then
for
fn
in
"pip
${
PYVER
}
"
"easy_install-
${
PYVER
}
"
;
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
# Create pipx link if /usr/local/bin/pythonx is linked to this version
if
[
"
$(
readlink
-n
./python
${
PYMAJOR
}
)
"
=
"
${
RELFWKBIN
}
/python
${
PYMAJOR
}
"
]
;
then
for
fn
in
"pip
${
PYMAJOR
}
"
;
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
)
fi
exit
0
Misc/NEWS
View file @
90f47b22
...
...
@@ -395,6 +395,8 @@ Build
available
to
override
the
default
ensurepip
"--upgrade"
option
.
The
option
can
also
be
set
with
"make [alt]install ENSUREPIP=[upgrade|install
\n
o]"
.
-
Issue
#
19551
:
PEP
453
-
the
OS
X
installer
now
installs
pip
by
default
.
Tools
/
Demos
-----------
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment