[MacPorts] #50785: Can't import py27-cairosvg
MacPorts
noreply at macports.org
Thu Mar 3 01:47:01 PST 2016
#50785: Can't import py27-cairosvg
----------------------+--------------------------------
Reporter: darius@… | Owner: macports-tickets@…
Type: defect | Status: new
Priority: Normal | Milestone:
Component: ports | Version: 2.3.4
Keywords: | Port: py27-cairosvg
----------------------+--------------------------------
{{{
In [20]: import cairosvg
---------------------------------------------------------------------------
AttributeError Traceback (most recent call
last)
<ipython-input-20-8605454d1a82> in <module>()
----> 1 import cairosvg
/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7
/site-packages/cairosvg/__init__.py in <module>()
25 import optparse
26
---> 27 from . import surface
28
29
/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7
/site-packages/cairosvg/surface/__init__.py in <module>()
45
46 SHAPE_ANTIALIAS = {
---> 47 "optimizeSpeed": cairo.ANTIALIAS_FAST,
48 "crispEdges": cairo.ANTIALIAS_NONE,
49 "geometricPrecision": cairo.ANTIALIAS_BEST}
AttributeError: 'module' object has no attribute 'ANTIALIAS_FAST'
}}}
I worked around this by modifying
/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7
/site-packages/cairosvg/surface/__init__.py and adding the following after
the import statements
{{{
cairo.ANTIALIAS_FAST = cairo.ANTIALIAS_NONE
cairo.ANTIALIAS_GOOD = cairo.ANTIALIAS_SUBPIXEL
cairo.ANTIALIAS_BEST = cairo.ANTIALIAS_SUBPIXEL
}}}
--
Ticket URL: <https://trac.macports.org/ticket/50785>
MacPorts <https://www.macports.org/>
Ports system for OS X
More information about the macports-tickets
mailing list