[Distutils] documentation recommendations for Python 3 installs

Marius Gedminas marius at pov.lt
Sat Apr 28 00:14:52 CEST 2012

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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 190 bytes
Desc: Digital signature
URL: <http://mail.python.org/pipermail/distutils-sig/attachments/20120428/d69ebaea/attachment.pgp>

More information about the Distutils-SIG mailing list