Skip to content

Conversation

antznette1
Copy link

  • Added a concise “Quick start (pip + meson, editable)” section to
    doc/source/development/contributing_environment.rst.
  • Included Windows-specific guidance (VS Build Tools, PATH, long paths, execution policy, and Meson editable verbosity).
  • Provided a “Next steps” sanity check and focused test command.

Motivation

  • Streamlines the dev install path using pip + Meson (PEP 517), which auto-rebuilds C/Cython on import.
  • Addresses common Windows pitfalls that frequently block first-time contributors.

Key changes

  • New quick-start code block for editable install:
    • git fetch upstream --tags
    • python -m pip install -ve . --no-build-isolation -Ceditable-verbose=true
    • Optional -Cbuilddir=".meson_build" and -Csetup-args="-Dbuildtype=debug" tips

Windows notes: Build Tools, long paths, execution policy, and MESONPY_EDITABLE_VERBOSE.

Validation steps

  • Local editable install built successfully on Windows (3.12, MSVC, Meson).
  • Sphinx html docs built locally; the new section renders correctly in:
    • doc/build/html/development/contributing_environment.html

Please note that the change is purely documentation; no API or behavior changes.
Screenshot 2025-10-09 001025
Screenshot 2025-10-09 001156
Screenshot 2025-10-09 001222

Copy link
Member

@mroeschke mroeschke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this pull request but is this associated with an issue? Also was this PR generated with AI?

@antznette1
Copy link
Author

@mroeschke

I used an AI assistant to help draft the wording, but I validated and edited it myself and verified the commands locally on Windows. I can open a tracking issue and link it here.

Copy link
Contributor

@Alvaro-Kothe Alvaro-Kothe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It feels like you are simply rewriting what's already documented.

Comment on lines 214 to 238
Quick start (pip + meson, editable)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

If you just want the fastest route to a working development install using the
Meson backend through pip (PEP 517), use the following. This performs an
editable install and will automatically rebuild C/Cython components when
you import pandas.

.. code-block:: shell
# from the repo root, after creating/activating your env
# fetch tags so the version string can be computed
git fetch upstream --tags
# install in editable mode with meson backend
python -m pip install -ve . --no-build-isolation -Ceditable-verbose=true
.. tip::
Set a build directory to speed up rebuilds by keeping artifacts in one place::

python -m pip install -ve . --no-build-isolation \
-Cbuilddir=".meson_build" -Csetup-args="-Dbuildtype=debug"

The ``-Dbuildtype=debug`` flag improves debugging of C extensions. Omit it
for optimized builds.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This feels like a reword of what's written below.

Comment on lines 240 to 249
Windows-specific notes
^^^^^^^^^^^^^^^^^^^^^^

* Ensure the "Build Tools for Visual Studio 2022" with the
"Desktop development with C++" workload is installed. If Meson cannot
find ``cl.exe``, add the optional component
``MSVC v142 - VS 2019 C++ x64/x86 build tools`` from the installer.
* Use an elevated "x64 Native Tools Command Prompt for VS 2022" or a standard
PowerShell where the build tools are on ``PATH``.
* Long paths: enable them to avoid build errors when the source path is deep::
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This feels like a reword of what's written above.

Comment on lines 263 to 273
^^^^^^^^^^

* Verify the install::

python -c "import pandas, sys; print(pandas.__version__, sys.executable)"

* Run a focused test subset before the full suite::

pytest pandas/tests/frame/test_constructors.py -q

The sections below describe the supported build methods in more detail.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similar instructions are written below.

Comment on lines 257 to 260
* To see Meson’s automatic rebuild output on import every time, either pass
``-Ceditable-verbose=true`` in the install command (above) or set the env var::

set MESONPY_EDITABLE_VERBOSE=1 # PowerShell/cmd (for current session)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is written below.

@Akindotcome
Copy link

@Alvaro-Kothe
Thanks for the review. Agreed; this can be trimmed to avoid duplicating content that’s already below. I’ll reduce this to a minimal at-a-glance quick-start and link to the existing Meson section and Windows notes, and move the extra tips to where they already live.

@antznette1
Copy link
Author

I’ve trimmed the quick-start to a minimal two-command block and removed duplicated Windows/verification content. The section now links to the existing detailed sections (“Build options”, “Checking the build”, “Keeping up to date”) and “Step 1” for Windows toolchain setup. Built docs locally on Windows; the updated section renders as expected.

@mroeschke
Copy link
Member

I agree with @Alvaro-Kothe that this is just summarizing what is on this page, which is also a "quick start" on how to set up a development environment.

I think it would be best to open an issue first describing what's lacking from the current setup docs and why it's needed so closing this PR until that discussion is had

@mroeschke mroeschke closed this Oct 10, 2025
@antznette1 antznette1 deleted the doc-meson-quickstart branch October 11, 2025 00:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants