Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Duplicate
-
1.1.5
-
None
-
GNU/Linux 6.0.2-2-MANJARO x86_64
-
3.10.4
Description
This commit which uses the non-stdlib packaging library at build time now breaks anyone trying to install on POSIX from source.
/tmp> python -m venv env |
/tmp> source ./env/bin/activate.fish |
(env) /tmp> pip install mariadb |
Collecting mariadb
|
Downloading mariadb-1.1.5.tar.gz (81 kB) |
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 81.9/81.9 KB 708.0 kB/s eta 0:00:00 |
Preparing metadata (setup.py) ... error
|
error: subprocess-exited-with-error |
|
× python setup.py egg_info did not run successfully. |
│ exit code: 1 |
╰─> [8 lines of output] |
Traceback (most recent call last):
|
File "<string>", line 2, in <module> |
File "<pip-setuptools-caller>", line 34, in <module> |
File "/tmp/pip-install-e76pgcey/mariadb_d9442f68620f4d98ba2087f53cd310e9/setup.py", line 12, in <module> |
from mariadb_posix import get_config |
File "/tmp/pip-install-e76pgcey/mariadb_d9442f68620f4d98ba2087f53cd310e9/mariadb_posix.py", line 4, in <module> |
from packaging import version |
ModuleNotFoundError: No module named 'packaging' |
[end of output]
|
|
note: This error originates from a subprocess, and is likely not a problem with pip. |
error: metadata-generation-failed |
|
× Encountered error while generating package metadata. |
╰─> See above for output. |
|
note: This is an issue with the package mentioned above, not pip. |
hint: See above for details. |
Fortunately, the fix is easy. I see this commit adding packaging as a runtime dependency only which isn't enough. To add a build-time dependency, create a pyproject.toml containing:
[build-system]
|
requires = [
|
"setuptools",
|
"packaging",
|
]
|
Then pip automagically ensures that packaging is downloaded before trying to execute the setup.py.
Attachments
Issue Links
- is duplicated by
-
CONPY-233 mariadb python adapter installation broken in new 1.1.5 release
- Closed