Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
setuptools
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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jérome Perrin
setuptools
Commits
db733eec
Commit
db733eec
authored
Apr 13, 2009
by
Tarek Ziadé
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed #5607: Distutils test_get_platform was failing fo Mac OS X fat binaries.
parent
44c22c6f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
1 deletion
+31
-1
tests/test_util.py
tests/test_util.py
+31
-1
No files found.
tests/test_util.py
View file @
db733eec
...
...
@@ -5,6 +5,7 @@
import
os
import
sys
import
unittest
from
copy
import
copy
from
distutils.errors
import
DistutilsPlatformError
...
...
@@ -17,6 +18,7 @@ from distutils.util import strtobool
from
distutils.util
import
rfc822_escape
from
distutils
import
util
# used to patch _environ_checked
from
distutils.sysconfig
import
get_config_vars
,
_config_vars
class
utilTestCase
(
unittest
.
TestCase
):
...
...
@@ -30,6 +32,7 @@ class utilTestCase(unittest.TestCase):
self
.
join
=
os
.
path
.
join
self
.
isabs
=
os
.
path
.
isabs
self
.
splitdrive
=
os
.
path
.
splitdrive
self
.
_config_vars
=
copy
(
_config_vars
)
# patching os.uname
if
hasattr
(
os
,
'uname'
):
...
...
@@ -42,7 +45,7 @@ class utilTestCase(unittest.TestCase):
os
.
uname
=
self
.
_get_uname
def
tearDown
(
self
):
# getting back t
n
e environment
# getting back t
h
e environment
os
.
name
=
self
.
name
sys
.
platform
=
self
.
platform
sys
.
version
=
self
.
version
...
...
@@ -55,6 +58,7 @@ class utilTestCase(unittest.TestCase):
os
.
uname
=
self
.
uname
else
:
del
os
.
uname
_config_vars
=
copy
(
self
.
_config_vars
)
def
_set_uname
(
self
,
uname
):
self
.
_uname
=
uname
...
...
@@ -96,8 +100,34 @@ class utilTestCase(unittest.TestCase):
'root:xnu-792.25.20~1/RELEASE_I386'
),
'i386'
))
os
.
environ
[
'MACOSX_DEPLOYMENT_TARGET'
]
=
'10.3'
get_config_vars
()[
'CFLAGS'
]
=
(
'-fno-strict-aliasing -DNDEBUG -g '
'-fwrapv -O3 -Wall -Wstrict-prototypes'
)
self
.
assertEquals
(
get_platform
(),
'macosx-10.3-i386'
)
# macbook with fat binaries (fat, universal or fat64)
os
.
environ
[
'MACOSX_DEPLOYMENT_TARGET'
]
=
'10.4'
get_config_vars
()[
'CFLAGS'
]
=
(
'-arch ppc -arch i386 -isysroot '
'/Developer/SDKs/MacOSX10.4u.sdk '
'-fno-strict-aliasing -fno-common '
'-dynamic -DNDEBUG -g -O3'
)
self
.
assertEquals
(
get_platform
(),
'macosx-10.4-fat'
)
get_config_vars
()[
'CFLAGS'
]
=
(
'-arch x86_64 -arch i386 -isysroot '
'/Developer/SDKs/MacOSX10.4u.sdk '
'-fno-strict-aliasing -fno-common '
'-dynamic -DNDEBUG -g -O3'
)
self
.
assertEquals
(
get_platform
(),
'macosx-10.4-universal'
)
get_config_vars
()[
'CFLAGS'
]
=
(
'-arch x86_64 -isysroot '
'/Developer/SDKs/MacOSX10.4u.sdk '
'-fno-strict-aliasing -fno-common '
'-dynamic -DNDEBUG -g -O3'
)
self
.
assertEquals
(
get_platform
(),
'macosx-10.4-fat64'
)
# linux debian sarge
os
.
name
=
'posix'
sys
.
version
=
(
'2.3.5 (#1, Jul 4 2007, 17:28:59) '
...
...
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