Re: C API include files
On Dec 08, 2013, at 03:52 PM, Dmitry Shachnev wrote:
>On Fri, Dec 6, 2013 at 1:49 PM, Olе Streicher <debian-devel@liska.ath.cx> wrote:
>> * How to distinguish between python2 and python3? I guess that under
>> python3, the symlink should go from /usr/include/python3.3(m|dm)/,
>> like on numpy?
>
>Should the *include* files really be different between python2 and
>python3? Even if they are different, can that be solved by adding some
>#if /#ifdef blocks?
Yes. There are lots of tricks you can use to even minimize the ifdefs, but a
few sprinkled here and there should generally allow you to have single-source
include files (and .c files).
https://wiki.python.org/moin/PortingToPy3k/BilingualQuickRef#Python_extension_modules
-Barry
Reply to: