[Distutils] question re: local development workflow / egg-info / synced directories

Ionel Cristian Mărieș contact at ionelmc.ro
Thu Mar 31 01:56:19 EDT 2016


On Thu, Mar 31, 2016 at 3:03 AM, Chris Jerdonek <chris.jerdonek at gmail.com>
wrote:

> When developing locally, however, the sync process mounts the synced
> directory "over" the directory that was initialized at Docker-build
> time. Thus the egg-info directories are missing from the synced
> version of the directory.
>

​Are you mounting the site-packages or something else?​


> 2. install the projects in editable mode locally on my Mac so the
> egg-info directories will also sync over (but I'm not sure if egg-info
> directories are sufficiently cross-platform), or
>

​Assuming you mount the site-packages this should be fine as long as the
paths are the same, this is because easy-install.pth will contain absolute
paths​. When you do `setup.py develop` an entry is added in
easy-install.pth and that egg-info dir is created.

Note that the egg-info metadata is mostly used for entrypoint discovery
(eg: you use console_scripts
<https://pythonhosted.org/setuptools/setuptools.html#automatic-script-creation>
or plugin system
<https://pytest.org/latest/writing_plugins.html#making-your-plugin-installable-by-others>
based on entrypoints).

Also, develop installs allow overriding the develop command, so they might
do something extra (like pytest-cov "installs" a pth file for the
subprocess support).

That means you can just symlink or use a pth
<https://docs.python.org/2/library/site.html?highlight=pth> file if you
don't care about any of those features.




Thanks,
-- Ionel Cristian Mărieș, http://blog.ionelmc.ro
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/distutils-sig/attachments/20160331/82c35edc/attachment.html>


More information about the Distutils-SIG mailing list