Can distribute setuptools be used to port packages implemented in python 2 to 3

前端 未结 2 432
一个人的身影
一个人的身影 2021-01-22 23:53

Found some info on porting packages from python 2 to 3 using distribute setuptools in below link.

http://packages.python.org/distribute/python3.html

I have a C

2条回答
  •  独厮守ぢ
    2021-01-23 00:19

    No, it cannot be done using Distribute. Distribute just calls the 2to3 script in the build phase, but 2to3 can convert only between Python 2.x source files and Python 3.x source files. For the C API, you have to do it the hard way by manually tweaking your code to compile with both Python APIs.

    A very incomplete list of C API changes between Python 2.x and Python 3.x is to be found here. The same document also outlines the major differences between Python 2.x and 3.x on the Python source code level.

提交回复
热议问题