Hi,
On this issue in the qpageview
project, a user reports the following output from pip
:
~/frescobaldi$ pip install --verbose -e ./qpageview/
Using pip 22.0.2 from /usr/lib/python3/dist-packages/pip (python 3.10)
Defaulting to user installation because normal site-packages is not writeable
Obtaining file:///home/simon/frescobaldi/qpageview
Running command pip subprocess to install build dependencies
Collecting setuptools>=64
Using cached setuptools-67.7.2-py3-none-any.whl (1.1 MB)
Installing collected packages: setuptools
Successfully installed setuptools-67.7.2
Installing build dependencies ... done
Running command Checking if build backend supports build_editable
Checking if build backend supports build_editable ... done
ERROR: Project file:///home/simon/frescobaldi/qpageview 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.
Yet, on the same code repository at the same commit, using the same Python version and pip version (in a virtual environment), the installation works for me:
~/repos/qpageview $ python3.10 -m venv test-venv
~/repos/qpageview $ source test-venv/bin/activate
(test-venv) ~/repos/qpageview $ pip install pip==22.0.2
Collecting pip==22.0.2
Using cached pip-22.0.2-py3-none-any.whl (2.1 MB)
Installing collected packages: pip
Attempting uninstall: pip
Found existing installation: pip 22.3.1
Uninstalling pip-22.3.1:
Successfully uninstalled pip-22.3.1
Successfully installed pip-22.0.2
(test-venv) ~/repos/qpageview $ pip list
Package Version
---------- -------
pip 22.0.2
setuptools 65.5.1
WARNING: You are using pip version 22.0.2; however, version 23.1.2 is available.
You should consider upgrading via the '/home/jean/repos/qpageview/test-venv/bin/python3.10 -m pip install --upgrade pip' command.
(test-venv) ~/repos/qpageview $ pip install --verbose -e ./qpageview
Using pip 22.0.2 from /home/jean/repos/qpageview/test-venv/lib64/python3.10/site-packages/pip (python 3.10)
Obtaining file:///home/jean/repos/qpageview/qpageview
ERROR: file:///home/jean/repos/qpageview/qpageview does not appear to be a Python project: neither 'setup.py' nor 'pyproject.toml' found.
WARNING: You are using pip version 22.0.2; however, version 23.1.2 is available.
You should consider upgrading via the '/home/jean/repos/qpageview/test-venv/bin/python3.10 -m pip install --upgrade pip' command.
(test-venv) ~/repos/qpageview $ pip install --verbose -e .
Using pip 22.0.2 from /home/jean/repos/qpageview/test-venv/lib64/python3.10/site-packages/pip (python 3.10)
Obtaining file:///home/jean/repos/qpageview
Running command pip subprocess to install build dependencies
Collecting setuptools>=64
Using cached setuptools-67.7.2-py3-none-any.whl (1.1 MB)
Installing collected packages: setuptools
Successfully installed setuptools-67.7.2
WARNING: You are using pip version 22.0.2; however, version 23.1.2 is available.
You should consider upgrading via the '/home/jean/repos/qpageview/test-venv/bin/python3.10 -m pip install --upgrade pip' command.
Installing build dependencies ... done
Running command Checking if build backend supports build_editable
Checking if build backend supports build_editable ... done
Running command Getting requirements to build editable
/tmp/pip-build-env-abvqxe4v/overlay/lib/python3.10/site-packages/setuptools/config/pyprojecttoml.py:66: _BetaConfiguration: Support for `[tool.setuptools]` in `pyproject.toml` is still *beta*.
config = read_configuration(filepath, True, ignore_option_errors, dist)
No `packages` or `py_modules` configuration, performing automatic discovery.
`flat-layout` detected -- analysing .
discovered packages -- ['qpageview']
running egg_info
writing qpageview.egg-info/PKG-INFO
[lots of output trimmed...]
Successfully built qpageview
Installing collected packages: qpageview
Successfully installed qpageview-0.6.2
WARNING: You are using pip version 22.0.2; however, version 23.1.2 is available.
You should consider upgrading via the '/home/jean/repos/qpageview/test-venv/bin/python3.10 -m pip install --upgrade pip' command.
As you can see, inside the isolated build environment, the same setuptools version has been installed as the one that was installed for the user. Therefore, I’m confused as to why the user’s pip thinks this setuptools 67.7.2 doesn’t have support for editable builds.
Could this be a pip bug, or am I missing something? Also, how can I further debug the issue? Making the output more verbose (with --verbose --verbose --verbose
didn’t help).
Thanks.