Issue 33 in pylibtiff: Cannot be installed with Python3 (even after 2to3 translator)

18 views
Skip to first unread message

pyli...@googlecode.com

unread,
Mar 21, 2015, 3:58:07 PM3/21/15
to pylibtif...@googlegroups.com
Status: New
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 33 by lmet...@gmail.com: Cannot be installed with Python3 (even
after 2to3 translator)
https://code.google.com/p/pylibtiff/issues/detail?id=33

What steps will reproduce the problem?

1. direct installation with pip3 or easy_install returns a problem with
`print`

2. after translation of the code with `2to3` the problem with `_bitarray.c`
arises:

bitarray-0.3.5-numpy/bitarray/_bitarray.c:2520:17: error:
‘PyTypeObject’ has no member named ‘ob_type’
Bitarraytype.ob_type = &PyType_Type;


--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings

pyli...@googlecode.com

unread,
Apr 14, 2015, 6:59:08 AM4/14/15
to pylibtif...@googlegroups.com

Comment #1 on issue 33 by physi...@gmail.com: Cannot be installed with
Python3 (even after 2to3 translator)
https://code.google.com/p/pylibtiff/issues/detail?id=33

Hi. I just faced this problem in a completely different project
(pysparse-1.3-dev) and fixed it by modifying those lines based on
instructions in this url: http://python3porting.com/cextensions.html

For you case. Replace:

Bitarraytype.ob_type = &PyType_Type;

with:

Py_TYPE(&Bitarraytype) = &PyType_Type;

and this should compile the code (of course you'll have to make this
modification for all lines of this kind). Mine compiles although I haven't
tested the installed pysparse-1.3-dev package yet.
Reply all
Reply to author
Forward
0 new messages