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

Chris Jerdonek chris.jerdonek at gmail.com
Thu Mar 31 02:22:52 EDT 2016


On Wed, Mar 30, 2016 at 10:56 PM, Ionel Cristian Mărieș
<contact at ionelmc.ro> wrote:
>
> 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?

No, I'm only mounting the project / source files. The Docker build
step creates a virtualenv for use inside the image, which is in a
location different from the synced directory. I'm not syncing
site-packages as I'm not installing the requirements on my Mac (and in
particular the "downloadable" requirements). I'm only installing them
inside the Docker image at Docker build time (and it's not clear to me
whether packages pip-installed on my Mac would even be compatible with
a different OS on the Docker image).

It would be nice if pip-installing a project directory in editable
mode didn't require writing to the project directory. Is there a
fundamental reason it needs to?

Thanks,
--Chris


>> 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 or plugin system 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 file if you don't care about
> any of those features.
>
>
>
>
> Thanks,
> -- Ionel Cristian Mărieș, http://blog.ionelmc.ro


More information about the Distutils-SIG mailing list