documentation recommendations for Python 3 installs

I'd like advice on what instructions to provide to users (if any) to avoid what might be a common user error. I maintain a project written in Python 2, and I recently added support for Python 3 via 2to3 and the installation process. Recently, a Python 3 user got the source code, manually installed it by running "setup.py build" and "setup.py install," and then proceeded to test it by firing up the IDE and importing the project. They then got a syntax error because they were still in the project directory and so wound up importing the original Python 2 code rather than the Python 3 version in site-packages. What is the recommended workflow or instructions to include in a project README to prevent new users from running into this kind of error? Thanks, --Chris

On Wed, Apr 25, 2012 at 12:48:10PM -0700, Chris Jerdonek wrote:
I'd like advice on what instructions to provide to users (if any) to avoid what might be a common user error.
I maintain a project written in Python 2, and I recently added support for Python 3 via 2to3 and the installation process. Recently, a Python 3 user got the source code, manually installed it by running "setup.py build" and "setup.py install," and then proceeded to test it by firing up the IDE and importing the project. They then got a syntax error because they were still in the project directory and so wound up importing the original Python 2 code rather than the Python 3 version in site-packages.
This is probably an argument for the ./src/ intermediate directory in your source tree layout. Also, it's an argument for porting to Python 3 by avoiding 2to3 and instead using the common subset of Python 2.x and 3.y for reasonable values of x (say, >= 6).
What is the recommended workflow or instructions to include in a project README to prevent new users from running into this kind of error?
Marius Gedminas -- Microsoft has performed an illegal operation and will be shut down. -- Judge Jackson

On Wed, Apr 25, 2012 at 21:48, Chris Jerdonek <chris.jerdonek@gmail.com> wrote:
What is the recommended workflow or instructions to include in a project README to prevent new users from running into this kind of error?
The instructions are to explain to the user that Python 3 support is via 2to3, and that this conversion is done at install time, so that all development is done in Python 2. //Lennart
participants (3)
-
Chris Jerdonek
-
Lennart Regebro
-
Marius Gedminas