documentation recommendations for Python 3 installs

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

documentation recommendations for Python 3 installs

Chris Jerdonek-3
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
_______________________________________________
Distutils-SIG maillist  -  [hidden email]
http://mail.python.org/mailman/listinfo/distutils-sig
Reply | Threaded
Open this post in threaded view
|

Re: documentation recommendations for Python 3 installs

Marius Gedminas-2
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

_______________________________________________
Distutils-SIG maillist  -  [hidden email]
http://mail.python.org/mailman/listinfo/distutils-sig

signature.asc (197 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: documentation recommendations for Python 3 installs

Lennart Regebro-2
In reply to this post by Chris Jerdonek-3
On Wed, Apr 25, 2012 at 21:48, Chris Jerdonek <[hidden email]> 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
_______________________________________________
Distutils-SIG maillist  -  [hidden email]
http://mail.python.org/mailman/listinfo/distutils-sig