You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Probably does not matter, but this is running inside a Docker container inside an Alpine VM on an Intel Mac
Description
Trying pip install -e . on a project that has pyproject.toml but no setup.cfg gives the following:
ERROR: Project file:///home/developer/src/packaging-test has a 'pyproject.toml' and its build backend is missing the 'build_editable' hook. Since it does not have a 'setup.py' nor a 'setup.cfg', it cannot be installed in editable mode. Consider using a build backend that supports PEP 660.
Expected behavior
The same behavior that happens when an empty setup.cfg exists: the editable install succeeds, and relevant files are importable.
$ pip install -e .
Obtaining file:///home/developer/src/packaging-test
Installing build dependencies ... done
Checking if build backend supports build_editable ... done
ERROR: Project file:///home/developer/src/packaging-test has a 'pyproject.toml' and its build backend is missing the 'build_editable' hook. Since it does not have a 'setup.py' nor a 'setup.cfg', it cannot be installed in editable mode. Consider using a build backend that supports PEP 660.
Output
Obtaining file:///home/developer/src/packaging-test Installing build dependencies ... done Checking if build backend supports build_editable ... doneERROR: Project file:///home/developer/src/packaging-test has a 'pyproject.toml' and its build backend is missing the 'build_editable' hook. Since it does not have a 'setup.py' nor a 'setup.cfg', it cannot be installed in editable mode. Consider using a build backend that supports PEP 660.
For reference, the following things work:
A non-editable install succeeds:
$ pip install .
Processing /home/developer/src/packaging-test
Installing build dependencies ... done
Getting requirements to build wheel ... done
Installing backend dependencies ... done
Preparing metadata (pyproject.toml) ... done
Building wheels for collected packages: one-python
Building wheel for one-python (pyproject.toml) ... done
Created wheel for one-python: filename=one_python-0.0.0-py3-none-any.whl size=1147 sha256=b458720439656246e39e4a4975950227cfd04114821b2b1e7a37bf3c444600fe
Stored in directory: /home/developer/.cache/pip/wheels/54/a5/23/ea1c47be2f99b77892adebb70a760f7b94e5de40af92367e16
Successfully built one-python
Installing collected packages: one-python
Attempting uninstall: one-python
Found existing installation: one-python 0.0.0
Uninstalling one-python-0.0.0:
Successfully uninstalled one-python-0.0.0
Successfully installed one-python-0.0.0
Creating an empty setup.cfg causes an editable install to succeed:
Hi @moshez, I think I will close this issue as a duplicate, as pointed out by Dustin (it is best to keep the conversation centralized in one place).
The existing workaround is to keep either setup.cfg (an empty file will suffice, but you can also keep your flake8 configuration there) or setup.py (with the minimal setuptools stub import setuptools; setuptools.setup()).
setuptools version
setuptools==61.0.0
Python version
Python 3.10.0
OS
Debian 11.1
Additional environment information
Probably does not matter, but this is running inside a Docker container inside an Alpine VM on an Intel Mac
Description
Trying
pip install -e .
on a project that haspyproject.toml
but nosetup.cfg
gives the following:Expected behavior
The same behavior that happens when an empty
setup.cfg
exists: the editable install succeeds, and relevant files are importable.How to Reproduce
Pre-requisites:
22.0.4
one_python.py
pyproject.toml
An editable install fails:
Output
For reference, the following things work:
A non-editable install succeeds:
Creating an empty
setup.cfg
causes an editable install to succeed:The text was updated successfully, but these errors were encountered: