1

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)

hl037_
  • 3,520
  • 1
  • 27
  • 58

2 Answers2

0

The setuptools build_py command seems to be automatically called when there is a build step specified int the setup.py, typical example is use_2to3=True. Then, the "editable" is not "respected" in a way, since you need to rebuild each time.

hl037_
  • 3,520
  • 1
  • 27
  • 58
-3

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

  • no, this is not the question and your response is bad practice for applications. re-read. this not about importing, it's about setuptools editable installs – hl037_ Jul 12 '18 at 13:53
  • (but I will agree I did many typo in the question, and that was not easy to understand ^^') – hl037_ Jul 12 '18 at 13:56