mesonbuild / meson-python

Meson PEP 517 Python build backend
https://mesonbuild.com/meson-python/
MIT License
120 stars 59 forks source link

Backend subprocess exited when trying to invoke build_sdist #507

Closed brobr closed 9 months ago

brobr commented 9 months ago

Hi,

Recent pandas uses mesonpy for buidling. Trying to install mesonpy from source on Slackware64-current gives an error I cannot place.

    Found ninja-1.11.1 at /usr/bin/ninja
    + meson dist --allow-dirty --no-tests --formats gztar                           
    Dist currently only works with Git or Mercurial repos

    ERROR Backend subprocess exited when trying to invoke build_sdist

Building a Slackware-installable python package is done with

  python3 -m build --no-isolation
  python3 -m installer -d "$PKG" dist/*.whl

Do you have an idea what is missing to get the package built?

The full terminal trace below:

  meson_python-0.14.0/PKG-INFO
  /usr/lib64/python3.9/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
    warnings.warn(
  * Getting build dependencies for sdist...
  * Building sdist...
  + meson setup /tmp/SBo/meson_python-0.14.0 /tmp/SBo/meson_python-0.14.0/.mesonpy-bvjk4t8r -Dbuildtype=release -Db_ndebug=if-release -Db_vscrt=md --native-file=/tmp/SBo/meson_python-0.14.0/.mesonpy-bvjk4t8r/meson-python-native-file.ini
  The Meson build system
  Version: 1.2.1
  Source dir: /tmp/SBo/meson_python-0.14.0
  Build dir: /tmp/SBo/meson_python-0.14.0/.mesonpy-bvjk4t8r
  Build type: native build
  Project name: meson-python
  Project version: 0.14.0
  Host machine cpu family: x86_64
  Host machine cpu: x86_64
  Program python found: YES (/usr/bin/python3)
  Build targets in project: 0

  meson-python 0.14.0

    User defined options
      Native files: /tmp/SBo/meson_python-0.14.0/.mesonpy-bvjk4t8r/meson-python-native-file.ini
      buildtype   : release
      b_ndebug    : if-release
      b_vscrt     : md

  Found ninja-1.11.1 at /usr/bin/ninja
  + meson dist --allow-dirty --no-tests --formats gztar                           
  Dist currently only works with Git or Mercurial repos

  ERROR Backend subprocess exited when trying to invoke build_sdist
rgommers commented 9 months ago

You are trying to rebuild an sdist from outside a git repo. If you already downloaded an sdist, you should run python3 -m build --wheel --no-isolation so that build doesn't try to build an sdist from another sdist (that cannot work).

brobr commented 9 months ago

Fab, including --wheel worked; thanks a lot !