Uploaded image for project: 'MariaDB Connector/Python'
  1. MariaDB Connector/Python
  2. CONPY-234

mariadb-1.1.5 doesn't build from source on Linux: Missing `packaging` dependency



    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Duplicate
    • 1.1.5
    • N/A
    • Build
    • None
    • GNU/Linux 6.0.2-2-MANJARO x86_64
    • 3.10.4


      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:

      requires = [

      Then pip automagically ensures that packaging is downloaded before trying to execute the setup.py.


        Issue Links



              georg Georg Richter
              Brénainn Brénainn Woodsend
              0 Vote for this issue
              1 Start watching this issue



                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.