[Distutils] quickly installing packages in "editable" mode

Chris Jerdonek chris.jerdonek at gmail.com
Sun Mar 25 17:47:07 EDT 2018


I'm interested in finding ways to speed up a development workflow that
involves installing several local packages in "editable" mode in a
Docker image.

For example, if I use `pip install -e project1 -e project2 ...` in a
certain case, it takes on the order of 3-4 seconds. But if I create
the .egg-link files, .egg-info directories, etc. "by hand," it only
takes on the order of 0.07 seconds.

I'm okay with using a hacky solution because these are simple, pure
Python projects and it's in a development environment, but if I can
rely on existing third-party libraries (via Python, not subprocess),
that would be ideal.

Do people know of libraries that can help with this sort of thing? As
another example, it seems like one of the steps is to update
"site-packages/easy-install.pth", but setuptools doesn't seem to
expose this as a stand-alone function. I also briefly glanced at
things like distlib, the "site" module, and pkg_resources, but I
didn't seem to see an API for updating a .pth file. Or maybe I can
bypass having to create / update a ".pth" by using symlinks.


More information about the Distutils-SIG mailing list