I noticed that when I do an editable install (pip install --user -e .
), sometimes, setuptools make a build
directory and egg-links to /.../my_module/build/lib
.
While sometimes (if I do it in another project), it does not create this directory and simply egg-links to /.../my_module
However, I can't figure out why. In the first case, the project is not really editable (since it seems to build the package, and link to the build version)
What does cause setup tools to use build/lib
rather than the package dev directory ?
(Note : these are full python projects that are intended to be distributed with sdist)
as far as I understand you, in order to use a third-party module without installing it, just in the same place where your program is located, create a new directory, put the __ init __.py file and copy the third-party module there. And then you can in your code address it like this
The setuptools
build_py
command seems to be automatically called when there is a build step specified int thesetup.py
, typical example isuse_2to3=True
. Then, the "editable" is not "respected" in a way, since you need to rebuild each time.