Skip to content
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

Should get_requires_for_build_editable return (at least) ["pip>21.3"]? #466

Closed
ivirshup opened this issue Nov 9, 2021 · 3 comments
Closed

Comments

@ivirshup
Copy link

ivirshup commented Nov 9, 2021

Editable installs via pip<21.3 require a setuptools based build. Otherwise you'll get errors like:

ERROR: File "setup.py" or "setup.cfg" not found. Directory cannot be installed in editable mode: /Users/isaac/github/anndata
(A "pyproject.toml" file was found, but editable mode currently requires a setuptools-based build.)

Would this be solved by having get_requires_for_build_editable to add "pip>21.3" to requirements?

@takluyver
Copy link
Member

I don't think so, because older versions of pip won't look at get_requires_for_build_editable, so it won't help them. 😉 Even if they did, it would only be installed in the temporary build environment.

More philosophically, part of the aim of standardising editable installations is that you don't necessarily have to use pip at all - you could implement another frontend which can use the same mechanisms. (I'm not sure there's really any point for editable installs, but even so...)

@ivirshup
Copy link
Author

ivirshup commented Nov 9, 2021

I don't think so, because older versions of pip won't look at get_requires_for_build_editable

Ah yeah, fair. Is there a way to even specify this? I think older versions of pip may just fail before looking at any requirements.

More philosophically, part of the aim of standardising editable installations is that you don't necessarily have to use pip at all - you could implement another frontend which can use the same mechanisms

I like that we can tell new contributors for a set of packages that you create an dev install with pip install -e, and we don't have to care about standardising on a build backend.

I'm not sure there's really any point for editable installs

Would you consider the symlink install editable?

@takluyver
Copy link
Member

Is there a way to even specify this?

The mechanism for editable installs was only standardised recently. Before that it was just a setuptools feature that pip knew about. Creating a setup.py which gives a helpful error message for python setup.py develop might do it - I don't know exactly what pip does if there's both pyproject.toml and setup.py.

Would you consider the symlink install editable?

In case it wasn't clear, I meant there's not much point creating an alternative frontend for editable installs, as I think pip install -e . covers the only thing you'd want it for. I can definitely see the use of editable installs in general.

I do consider the symlink install as a variant of editable installation. Unfortunately, it's one that's not possible with the new standard mechanism.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants