conda-forge/staged-recipes

Using setup.py develop

Closed this issue · 3 comments

Hi there,
Many thanks for the effort in easing packaging!

I was trying to create a recipe for NILM_Metadata. It has a single dependency (PyYaml). However, it needs to be installed using python setup.py develop, owing to some package specific reasons.

I was wondering if the python setup.py develop is causing issues in creating recipe. Link to the PR. Is there a workaround?

TL;DR Installing in develop mode is likely to be problematic. This should not be used for a conda recipe. The result will be a broken package.

Long answer: The reason being that a development install means that an *.egg-link file, which points back to the source directory. As a result, the final package will not actually contain the source code, but only a reference to the location of the source code on the system it was built on. Given that conda-build create a temporary directory to contain the source code while building and then removes this directory immediately afterwards, this link will point to a non-existent location after the build completes. This is why the package will be broken.

Follow-up: Could you please briefly explain why a develop install is needed? Unfortunately I lack the time to read the linked issues in detail, but my impression is there is some data that needs to be copied over with the package. If that is the case, I would recommend looking into setuptools options to do this and propose something along these lines to the developers of the code base.

Going to close this out. Though feel free to respond to the questions raised.

Thanks a lot for the clarification. I'm happy for the issue to be closed.