Re: [Rdkit-devel] last test failing with python3

2015-12-04 Thread Gianluca Sforna
On Thu, Dec 3, 2015 at 4:31 PM, Greg Landrum  wrote:
> If both pycairo and cairocffi are installed, the code will prefer cairocffi
> with python3.

Yeah, that I also figured by looking at rdkit/Chem/Draw/cairoCanvas.py.
However, adding python3-cairocffi as dependency did not produce the
desired result, so I investigated further and found a bug in the
python3-cairocffi fedora package [1]

Added a workaround and all is good now!

Thanks again

G.

[1] https://bugzilla.redhat.com/show_bug.cgi?id=1288627

-- 
Gianluca Sforna

http://morefedora.blogspot.com
http://plus.google.com/+gianlucasforna - http://twitter.com/giallu

--
Go from Idea to Many App Stores Faster with Intel(R) XDK
Give your users amazing mobile app experiences with Intel(R) XDK.
Use one codebase in this all-in-one HTML5 development environment.
Design, debug & build mobile apps & 2D/3D high-impact games for multiple OSs.
http://pubads.g.doubleclick.net/gampad/clk?id=254741911&iu=/4140
___
Rdkit-devel mailing list
Rdkit-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-devel


Re: [Rdkit-devel] last test failing with python3

2015-12-03 Thread Greg Landrum
Hi Gianluca,

It looks like that function is not available with pycairo for Python3:
http://cairographics.org/documentation/pycairo/3/reference/surfaces.html#cairo.ImageSurface.create_for_data
It is (or should be) available in cairocffi:
https://pythonhosted.org/cairocffi/api.html#cairocffi.ImageSurface.create_for_data

If both pycairo and cairocffi are installed, the code will prefer cairocffi
with python3.

-greg


On Thu, Dec 3, 2015 at 4:13 PM, Gianluca Sforna  wrote:

> Hi all,
> my attempt to build and test python3 bindings in the rpm package is
> one tiny test away from success...
>
> Specifically, I see test 101 fails with:
>
> 101: ==
> 101: ERROR: testCairoImage (__main__.TestCase)
> 101: --
> 101: Traceback (most recent call last):
> 101:   File "UnitTestDraw.py", line 91, in testCairoImage
> 101: img=Draw.MolToImage(self.mol,size=(300,300))
> 101:   File
> "/builddir/build/BUILD/rdkit-Release_2015_09_2/python3/rdkit/Chem/Draw/__init__.py",
> line 94, in MolToImage
> 101: img,canvas=_createCanvas(size)
> 101:   File
> "/builddir/build/BUILD/rdkit-Release_2015_09_2/python3/rdkit/Chem/Draw/__init__.py",
> line 50, in _createCanvas
> 101: canvas = Canvas(img)
> 101:   File
> "/builddir/build/BUILD/rdkit-Release_2015_09_2/python3/rdkit/Chem/Draw/cairoCanvas.py",
> line 86, in __init__
> 101: image.size[0], image.size[1], stride)
> 101: NotImplementedError: Surface.create_for_data: Not Implemented yet.
>
> Any idea how this could happen? If you need any additional info, just
> let me know
>
>
> --
> Gianluca Sforna
>
> http://morefedora.blogspot.com
> http://plus.google.com/+gianlucasforna - http://twitter.com/giallu
>
>
> --
> Go from Idea to Many App Stores Faster with Intel(R) XDK
> Give your users amazing mobile app experiences with Intel(R) XDK.
> Use one codebase in this all-in-one HTML5 development environment.
> Design, debug & build mobile apps & 2D/3D high-impact games for multiple
> OSs.
> http://pubads.g.doubleclick.net/gampad/clk?id=254741911&iu=/4140
> ___
> Rdkit-devel mailing list
> Rdkit-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/rdkit-devel
>
--
Go from Idea to Many App Stores Faster with Intel(R) XDK
Give your users amazing mobile app experiences with Intel(R) XDK.
Use one codebase in this all-in-one HTML5 development environment.
Design, debug & build mobile apps & 2D/3D high-impact games for multiple OSs.
http://pubads.g.doubleclick.net/gampad/clk?id=254741911&iu=/4140___
Rdkit-devel mailing list
Rdkit-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-devel