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
bda4672b
Commit
bda4672b
authored
Aug 01, 2010
by
Ronald Oussoren
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Ensure that test_site actually passes with a framework build
parent
794f5b35
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
7 deletions
+4
-7
Lib/site.py
Lib/site.py
+1
-1
Lib/sysconfig.py
Lib/sysconfig.py
+1
-1
Lib/test/test_site.py
Lib/test/test_site.py
+2
-5
No files found.
Lib/site.py
View file @
bda4672b
...
...
@@ -295,7 +295,7 @@ def getsitepackages():
# locations.
from
sysconfig
import
get_config_var
framework
=
get_config_var
(
"PYTHONFRAMEWORK"
)
if
framework
and
"/%s.framework/"
%
(
framework
,)
in
prefix
:
if
framework
:
sitepackages
.
append
(
os
.
path
.
join
(
"/Library"
,
framework
,
sys
.
version
[:
3
],
"site-packages"
))
...
...
Lib/sysconfig.py
View file @
bda4672b
...
...
@@ -173,7 +173,7 @@ def _getuserbase():
if
sys
.
platform
==
"darwin"
:
framework
=
get_config_var
(
"PYTHONFRAMEWORK"
)
if
framework
:
return
joinuser
(
"~"
,
"Library"
,
framework
,
"%d.%d"
%
(
return
env_base
if
env_base
else
joinuser
(
"~"
,
"Library"
,
framework
,
"%d.%d"
%
(
sys
.
version_info
[:
2
]))
return
env_base
if
env_base
else
joinuser
(
"~"
,
".local"
)
...
...
Lib/test/test_site.py
View file @
bda4672b
...
...
@@ -185,13 +185,10 @@ class HelperFunctionsTests(unittest.TestCase):
sysconfig
.
get_config_var
(
"PYTHONFRAMEWORK"
)):
site
.
PREFIXES
=
[
'Python.framework'
]
dirs
=
site
.
getsitepackages
()
self
.
assertEqual
(
len
(
dirs
),
4
)
wanted
=
os
.
path
.
join
(
'~'
,
'Library'
,
'Python'
,
sys
.
version
[:
3
],
'site-packages'
)
self
.
assertEquals
(
dirs
[
2
],
os
.
path
.
expanduser
(
wanted
))
self
.
assertEqual
(
len
(
dirs
),
3
)
wanted
=
os
.
path
.
join
(
'/Library'
,
'Python'
,
sys
.
version
[:
3
],
'site-packages'
)
self
.
assertEquals
(
dirs
[
3
],
wanted
)
self
.
assertEquals
(
dirs
[
2
],
wanted
)
class
PthFile
(
object
):
"""Helper class for handling testing of .pth files"""
...
...
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