-
Type: Task
-
Resolution: Fixed
-
Priority: Unknown
-
Affects Version/s: None
-
Component/s: None
-
None
-
Python Drivers
-
Not Needed
-
Context
After the changes in PYTHON-4451 and PYTHON-4489, it is no longer possible to install pymongo from source (or sdist) with old versions of pip, for example:
[2024/06/14 13:42:33.753] + python -m pip install -e . [2024/06/14 13:42:38.601] ERROR: Command errored out with exit status 1: [2024/06/14 13:42:38.601] command: /data/mci/81cd2316d38fbbd146938bff32a636d1/src/.venv/bin/python -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/data/mci/81cd2316d38fbbd146938bff32a636d1/src/setup.py'"'"'; __file__='"'"'/data/mci/81cd2316d38fbbd146938bff32a636d1/src/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' develop --no-deps [2024/06/14 13:42:38.601] cwd: /data/mci/81cd2316d38fbbd146938bff32a636d1/src/ [2024/06/14 13:42:38.601] Complete output (5 lines): [2024/06/14 13:42:38.601] Traceback (most recent call last): [2024/06/14 13:42:38.601] File "<string>", line 1, in <module> [2024/06/14 13:42:38.601] File "/data/mci/81cd2316d38fbbd146938bff32a636d1/src/setup.py", line 5, in <module> [2024/06/14 13:42:38.601] raise RuntimeError(msg) [2024/06/14 13:42:38.601] RuntimeError: PyMongo>=4.8 no longer supports building via setup.py, use python -m pip install <path/to/pymongo> instead [2024/06/14 13:42:38.601] ---------------------------------------- [2024/06/14 13:42:38.601] ERROR: Command errored out with exit status 1: /data/mci/81cd2316d38fbbd146938bff32a636d1/src/.venv/bin/python -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/data/mci/81cd2316d38fbbd146938bff32a636d1/src/setup.py'"'"'; __file__='"'"'/data/mci/81cd2316d38fbbd146938bff32a636d1/src/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' develop --no-deps Check the logs for full command output. [2024/06/14 13:42:38.607] WARNING: You are using pip version 21.1.1; however, version 24.0 is available.
Definition of done
We need to document the minimum version of pip required to install from sdist and update the error message above to mention updating pip to >= that version.