1. Tarek Ziadé
  2. distribute
Issue #299 resolved

[Patch] Python 3 development eggs

Stefan H. Holek
created an issue

At the moment, use_2to3=True is an essential part of my development process. But so are development eggs, and up to now I always had to go and manually fixup easy-install.pth and egg-links for development eggs to work under Python 3.

The proposed patch does three things: The 'develop' command now uses the same code as the 'test' command to prepare the Python 3 source files (i.e. calls build_py). In addition, egg-link and easy-install.pth are made to point to the Python 3 source files (to build/lib essentially). * It also fixes a version-string bug when 'egg_info' is called more than once for a distribution (the 'test' and 'develop' commands do this).

Patch 'develop': [[https://bitbucket.org/stefanholek/distribute/changeset/c82a24b85447]]

Patch 'egg_info': [[https://bitbucket.org/stefanholek/distribute/changeset/c38c9f5377da]]

There's obviously documentation updates to follow, I'll tackle those if the proposal gets traction.

Comments (8)

  1. Lennart Regebro

    This is in principal an improvement over the current situation, however, I've been trying and failing to write a test for this for a couple of hours now. Could you provide a test?

  2. Lennart Regebro

    OK, I was able to write a test, finally, and committed a patch for the develop command. I can't reproduce the error in the egg_info, though. Can you elaborate on that error and explain how to reproduce it?

  3. Stefan H. Holek reporter

    The egg_info "error" shows when you have configured use_2to3_exclude_fixers and run develop or test. While the commands are re-initialized, the Distribution is not, and the second time around the fixers are no longer there to be removed.

    Err sorry, that explanation was for #305 actually. :-P

  4. Stefan H. Holek reporter

    To reproduce the duplicate version tags, you need an egg with a script and a console_scripts entry point. There, create a setup.cfg containing:

    [egg_info]
    tag_build = dev
    

    Make sure you have the first patch applied.

    Then run setup.py develop, which should install package X.Xdev and create the script in bin.

    Now try to run the script with e.g. ./bin/scriptname. This will result in a traceback telling you that it can't find package X.Xdevdev.

  5. Log in to comment