Skip to content

TRACKER: Getting Started with Meson/Bug Reports #49683

Open
@lithomas1

Description

@lithomas1

Background

In #49115, we are adding support for a new build system meson. This build system addresses some of the flaws of the setuptools-based build system, such as race conditions on parallel builds. It is also much simpler and easier to understand, and we'll be able to clean up a bunch of build related code once it's merged.

How to build/test with meson

# Create a new conda environment, or update your existing one
conda env create --file=environment.yml
# conda env update --file environment.yml --prune # For updating your existing environment, make sure "pandas-dev" is activated 
pip install oldest-supported-numpy>=0.10 # Needed since pip will not auto pull dependencies in no-build-isolation mode

# This is the build command. 
# On your first run, it'll create the build directory(named builddir here).
# Subsequent builds will re-use it.
pip install . -ve --no-build-isolation --config-settings="builddir=builddir" 

# If you want to debug, pass -Ddebug=true, e.g.
pip install . -ve --no-build-isolation --config-settings builddir="builddir" --config-settings setup-args="-Dbuildtype=debug"

# Test command (same as with pandas built by setuptools)
# e.g.
# Note: If you built pandas in editable mode, you now don't have to rebuild the C extensions every time you change a C/Cython file. It will now be automatically rebuilt on import.
pytest pandas

Timeline

  • Enable meson based builds in the CI( BLD: Setup meson builds #49115)
  • Move to using a stable version of meson/meson-python once all fixes have been upstreamed, and released.
  • Update documentation for setting up and building pandas with meson.
    - Mostly done. The debugging docs need to be updated
  • Remove all setuptools code.

Ideally, meson build support and removal of setuptools should be fully complete by 2.1 (the next minor release).

Known Issues

N/A.

Purpose of this thread

I've opened this thread to get some feedback and to track any build issues users might be having with meson.

Metadata

Metadata

Assignees

No one assigned

    Labels

    BuildLibrary building on various platformsMaster TrackerHigh level tracker for similar issues

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions