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
5aa7d3a9
Commit
5aa7d3a9
authored
Aug 27, 2007
by
Skip Montanaro
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Backport this change to get test_sqlite working on Macs. Same change Thomas
made to the trunk awhile ago I believe.
parent
7bb735cd
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
24 deletions
+2
-24
Lib/ctypes/test/test_find.py
Lib/ctypes/test/test_find.py
+2
-24
No files found.
Lib/ctypes/test/test_find.py
View file @
5aa7d3a9
...
...
@@ -7,25 +7,21 @@ from ctypes.test import is_resource_enabled
if
sys
.
platform
==
"win32"
:
lib_gl
=
find_library
(
"OpenGL32"
)
lib_glu
=
find_library
(
"Glu32"
)
lib_glut
=
find_library
(
"glut32"
)
lib_gle
=
None
elif
sys
.
platform
==
"darwin"
:
lib_gl
=
lib_glu
=
find_library
(
"OpenGL"
)
lib_glut
=
find_library
(
"GLUT"
)
lib_gle
=
None
else
:
lib_gl
=
find_library
(
"GL"
)
lib_glu
=
find_library
(
"GLU"
)
lib_glut
=
find_library
(
"glut"
)
lib_gle
=
find_library
(
"gle"
)
## print, for debugging
if
is_resource_enabled
(
"printing"
):
if
lib_gl
or
lib_glu
or
lib_gl
ut
or
lib_gl
e
:
if
lib_gl
or
lib_glu
or
lib_gle
:
print
"OpenGL libraries:"
for
item
in
((
"GL"
,
lib_gl
),
(
"GLU"
,
lib_glu
),
(
"glut"
,
lib_glut
),
(
"gle"
,
lib_gle
)):
print
"
\
t
"
,
item
...
...
@@ -33,24 +29,11 @@ if is_resource_enabled("printing"):
# On some systems, loading the OpenGL libraries needs the RTLD_GLOBAL mode.
class
Test_OpenGL_libs
(
unittest
.
TestCase
):
def
setUp
(
self
):
self
.
gl
=
self
.
glu
=
self
.
gle
=
self
.
glut
=
None
self
.
gl
=
self
.
glu
=
self
.
gle
=
None
if
lib_gl
:
self
.
gl
=
CDLL
(
lib_gl
,
mode
=
RTLD_GLOBAL
)
if
lib_glu
:
self
.
glu
=
CDLL
(
lib_glu
,
RTLD_GLOBAL
)
if
lib_glut
:
# On some systems, additional libraries seem to be
# required, loading glut fails with
# "OSError: /usr/lib/libglut.so.3: undefined symbol: XGetExtensionVersion"
# I cannot figure out how to repair the test on these
# systems (red hat), so we ignore it when the glut or gle
# libraries cannot be loaded. See also:
# https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1478253&group_id=5470
# http://mail.python.org/pipermail/python-dev/2006-May/064789.html
try
:
self
.
glut
=
CDLL
(
lib_glut
)
except
OSError
:
pass
if
lib_gle
:
try
:
self
.
gle
=
CDLL
(
lib_gle
)
...
...
@@ -67,11 +50,6 @@ class Test_OpenGL_libs(unittest.TestCase):
if
self
.
glu
:
self
.
glu
.
gluBeginCurve
if
lib_glut
:
def
test_glut
(
self
):
if
self
.
glut
:
self
.
glut
.
glutWireTetrahedron
if
lib_gle
:
def
test_gle
(
self
):
if
self
.
gle
:
...
...
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