Possible Duplicate:
Can distribute setuptools be used to port packages implemented in python 2 to 3
Also, does the tool make it easy?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The only thing that Distribute does is that it calls the
2to3script (supplied with Python 3) that converts a Python 2.x source code to Python 3 using some automatic transformations. Basically, you write your code using Python 2.x and let Distribute convert it to Python 3 when your package is installed on Python 3.There are several things that Distribute won’t do for you, though:
It won’t check whether the conversion succeeded or not. You should have a fairly exhaustive set of unit tests to ensure that the behaviour of the converted package is correct as not all the transformations can be done automatically by
2to3, and some other transformations it will do might not make sense. Read this case study for more information about porting a real Python package to Python 3 and in particular this section about things not handled by2to3.It won’t convert modules written using the C API of Python (see this question), you will have to convert these yourself.