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
30101823
Commit
30101823
authored
Nov 14, 2014
by
Ned Deily
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue #22877: PEP 477 - OS X installer for 2.7.9 now installs pip.
parent
05e7c9ea
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
90 additions
and
23 deletions
+90
-23
Mac/BuildScript/build-installer.py
Mac/BuildScript/build-installer.py
+19
-23
Mac/BuildScript/scripts/postflight.ensurepip
Mac/BuildScript/scripts/postflight.ensurepip
+69
-0
Misc/NEWS
Misc/NEWS
+2
-0
No files found.
Mac/BuildScript/build-installer.py
View file @
30101823
...
...
@@ -198,7 +198,7 @@ def library_recipes():
LT_10_5
=
bool
(
getDeptargetTuple
()
<
(
10
,
5
))
# Disable for now
if
False
:
# if
(getDeptargetTuple() > (10, 5)) and (getVersionTuple() >= (3, 5)
):
if
False
:
# if
getDeptargetTuple() > (10, 5
):
result
.
extend
([
dict
(
name
=
"Tcl 8.5.15"
,
...
...
@@ -239,7 +239,7 @@ def library_recipes():
),
])
if
getVersionTuple
()
>=
(
3
,
3
)
:
if
PYTHON_3
:
result
.
extend
([
dict
(
name
=
"XZ 5.0.5"
,
...
...
@@ -369,8 +369,6 @@ def library_recipes():
# Instructions for building packages inside the .mpkg.
def
pkg_recipes
():
unselected_for_python3
=
(
'selected'
,
'unselected'
)[
PYTHON_3
]
# unselected if 3.0 through 3.3, selected otherwise (2.x or >= 3.4)
unselected_for_lt_python34
=
(
'selected'
,
'unselected'
)[(
3
,
0
)
<=
getVersionTuple
()
<
(
3
,
4
)]
result
=
[
dict
(
name
=
"PythonFramework"
,
...
...
@@ -439,27 +437,23 @@ def pkg_recipes():
topdir
=
"/Library/Frameworks/Python.framework"
,
source
=
"/empty-dir"
,
required
=
False
,
selected
=
unselected_for_lt_python34
,
selected
=
'selected'
,
),
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
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
getDeptargetTuple
()
<
(
10
,
4
)
and
not
PYTHON_3
:
result
.
append
(
dict
(
...
...
@@ -977,7 +971,7 @@ def buildPython():
shellQuote
(
os
.
path
.
join
(
SRCDIR
,
'configure'
)),
shellQuote
(
SDKPATH
),
UNIVERSALARCHS
,
(
' '
,
'--with-computed-gotos '
)[
PYTHON_3
],
(
' '
,
'--without-ensurepip '
)[
getVersionTuple
()
>=
(
3
,
4
)
],
(
' '
,
'--without-ensurepip '
)[
PYTHON_3
],
shellQuote
(
WORKDIR
)[
1
:
-
1
],
shellQuote
(
WORKDIR
)[
1
:
-
1
]))
...
...
@@ -1159,7 +1153,9 @@ def patchFile(inPath, outPath):
fp
.
close
()
def
patchScript
(
inPath
,
outPath
):
major
,
minor
=
getVersionMajorMinor
()
data
=
fileContents
(
inPath
)
data
=
data
.
replace
(
'@PYMAJOR@'
,
str
(
major
))
data
=
data
.
replace
(
'@PYVER@'
,
getVersion
())
fp
=
open
(
outPath
,
'w'
)
fp
.
write
(
data
)
...
...
Mac/BuildScript/scripts/postflight.ensurepip
0 → 100755
View file @
30101823
#!/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
Misc/NEWS
View file @
30101823
...
...
@@ -324,6 +324,8 @@ Build
- Issue #17219: Add library build dir for Python extension cross-builds.
- Issue #22877: PEP 477 - OS X installer now installs pip.
Windows
-------
...
...
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