[issue8668] Packaging: add a 'develop' command

Éric Araujo report at bugs.python.org
Sat Jun 18 23:28:18 CEST 2011


Éric Araujo <merwok at netwok.org> added the comment:

Higery asked me why I recommended/asked that the .dist-info directory should be built in the build directory: “don't you feel it's a bit strange because we actually don't build the source except for some .c/.cpp files, but create a build directory?”

There are a few converging reasons for that.  Maybe a develop expert user will disagree with me, but I think that together they make a good case.

The first reason is symmetry.  The test command (http://docs.python.org/dev/packaging/commandref#test) needs to have the Python code in the build directory on sys.path, so that if you use build-time 2to3 conversion (currently undocumented :( apart from a line in http://docs.python.org/dev/packaging/setupcfg#command-sections), the tests need to find the 3.x code in the build dir, not the 2.x code in the project dir.  I think that since we already put the build dir on sys.path to run tests, we might as well follow the same idead and put the dist-info dir in the build dir.  The test command will then automatically have access to dist-info (see #12302), and other commands and tools can learn to look for dist-info in the build dir.

The second reason is that I think we need to separate build_distinfo from install_distinfo (#12279).  If we do this, then the new command has to write in the build dir, just like all other build_* commands (with possible exceptions).

The third reason is that I don’t like that every project that uses setuptools needs to add ProjectName.egg-info in the VCS ignore file (like .hgignore); if we use the build dir, our generated files are already covered by the ignore of the build dir.  (This makes me think that we may want to move MANIFEST to the build dir.)

I hope my reasons are clearer now; let me know if I did not explain something clearly enough, or if you disagree :)

----------
nosy: +carljm

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue8668>
_______________________________________


More information about the Python-bugs-list mailing list