-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement pip's editable installation method for condaverse #35
Comments
I wonder if the tools provide straightforward dependency lists that could be fed into conda? Maybe not for the |
I don't see why "conda-build develop" shouldn't be updated to use pep517. There isn't much to it, but it uses the "add a .pth file to $CONDA_PREFIX/lib/python3.x/site-packages/conda.pth" mechanism. PEP 517 is different. Instead of installing a I would implement it with "no build isolation" so that everything was installed in the current conda environment. We might copy https://github.com/pypa/pip/blob/HEAD/src/pip/_internal/pyproject.py, pip's pyproject.toml parser to get the build-system requirements, and conda-install those. After those are installed it's possible to call https://pyproject-hooks.readthedocs.io/en/latest/pyproject_hooks.html#pyproject_hooks.BuildBackendHookCaller.build_editable (and possibly its prerequisite We would use https://packaging.pypa.io/en/stable/metadata.html#packaging.metadata.Metadata.requires_python to get the requirements and try to "conda install" them. We could then delegate the rest of the install to "pip --no-deps". So the same as pip except we make sure conda installs the dependencies in the places where they would otherwise have been installed with pip. Possibly with some exceptions e.g. when there is a git URL https://peps.python.org/pep-0508/#examples |
Have you tried running |
Ah, heh, the |
We should be able to add -e (or any pip argument) to the pip: section of an environment file but it would not use conda to install the dependencies. |
pypa build does the isolated enviroment trick for wheel builds, does not support editable wheels (they recommend using the lower level project, which leaves the task of installing the build system and possibly creating an isolated environment undone) https://github.com/pypa/build/blob/main/src/build/env.py#L86-L90 |
See #36 for the bare minimum changes needed. It should do the following:
|
See conda/conda-build#5380 for the (extremely rough) approach I would take. |
See also https://github.com/pypa/installer to install a wheel without bothering with dependencies. |
I wonder if, following the lack of resolution of the develop subcommand in conda-build, it would be worth implementing something similar using the capabilities of conda-pypi, basically providing a PyPI aware
conda develop
command.The text was updated successfully, but these errors were encountered: