Skip to content

[FTBS] latest python-gmp 0.5.0 from PyPi fails to build because of a check for a non-existent GIT version #327

@Corin-EU

Description

@Corin-EU

This is on openSUSE Leap 15.6 with locally installed Python 3.12 and locally installed
pip==26.0.1
meson-python==0.19.0
├── meson [required: >=1.2.3, installed: 1.9.1]
├── packaging [required: >=23.2, installed: 26.0]
└── pyproject-metadata [required: >=0.9.0, installed: 0.11.0]
└── packaging [required: >=23.2, installed: 26.0]

After downloading the source code archive from PyPi, unpacking, and trying to instal with pip --

   Using pip 26.0.1 from /usr/local/lib/python3.12/site-packages/pip (python 3.12)
   Processing ./.
   Running command Preparing metadata (pyproject.toml)
    + meson setup /usr/src/build/python_gmp-0.5.0 /usr/src/build/python_gmp-0.5.0/.mesonpy-wea7z76c -Dbuildtype=release -Db_ndebug=if-release -Db_vscrt=md --native-file=/usr/src/build/python_gmp-0.5.0/.mesonpy-wea7z76c/meson-python-native-file.ini
   The Meson build system
   Version: 1.9.1
   Source dir: /usr/src/build/python_gmp-0.5.0
  Build dir: /usr/src/build/python_gmp-0.5.0/.mesonpy-wea7z76c
  Build type: native build

 ../meson.build:2:17: ERROR: Command `/usr/bin/python scripts/gitversion.py` failed with status -6.

The meson.build file has the entry

            version: run_command('python', 'scripts/gitversion.py',
                         check: true).stdout().strip(),

The script gitversion.py tries to get the source code version of the module as if the source code was in a GIT repository which is not a valid method for a PyPi source code archive.

There should be a check on whether or not the source code is a GIT archive repository and if not, get the version from the PKG-INFO file or some other source code version specifying file.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions