46 lines
1.5 KiB
Diff
46 lines
1.5 KiB
Diff
From 1be64700c1063eff2b2747ce63ca03eac797b4a4 Mon Sep 17 00:00:00 2001
|
|
From: Aaditya M Nair <aadityanair6494@gmail.com>
|
|
Date: Sun, 1 Feb 2015 01:48:11 +0530
|
|
Subject: [PATCH] Fixed incompatiblity with latest version of pyglet
|
|
(1.2alpha1)
|
|
|
|
In earlier version of pyglet, `c_float` was defined in `pyglet.gl`
|
|
but in the latest version of pyglet (1.2alpha1) it is defined in
|
|
`pyglet.gl.gl`. This commit addresses this issue by adding a
|
|
try-except block that imports `cfloat` from this module.
|
|
---
|
|
sympy/plotting/pygletplot/plot_rotation.py | 5 +++++
|
|
sympy/plotting/pygletplot/util.py | 5 +++++
|
|
2 files changed, 10 insertions(+)
|
|
|
|
diff --git a/sympy/plotting/pygletplot/plot_rotation.py b/sympy/plotting/pygletplot/plot_rotation.py
|
|
index dbbaa42..6dbf972 100644
|
|
--- a/sympy/plotting/pygletplot/plot_rotation.py
|
|
+++ b/sympy/plotting/pygletplot/plot_rotation.py
|
|
@@ -1,5 +1,10 @@
|
|
from __future__ import print_function, division
|
|
|
|
+try:
|
|
+ from pyglet.gl.gl import c_float
|
|
+except ImportError:
|
|
+ pass
|
|
+
|
|
from pyglet.gl import *
|
|
from math import sqrt as _sqrt, acos as _acos
|
|
|
|
diff --git a/sympy/plotting/pygletplot/util.py b/sympy/plotting/pygletplot/util.py
|
|
index 49574b8..710f008 100644
|
|
--- a/sympy/plotting/pygletplot/util.py
|
|
+++ b/sympy/plotting/pygletplot/util.py
|
|
@@ -1,5 +1,10 @@
|
|
from __future__ import print_function, division
|
|
|
|
+try:
|
|
+ from pyglet.gl.gl import c_float
|
|
+except ImportError:
|
|
+ pass
|
|
+
|
|
from pyglet.gl import *
|
|
from sympy.core import S
|
|
from sympy.core.compatibility import xrange
|