@@ -211,6 +211,67 @@ for :ref:`building pandas with GitPod <contributing-gitpod>`.
211
211
Step 3: build and install pandas
212
212
--------------------------------
213
213
214
+ Quick start (pip + meson, editable)
215
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
216
+
217
+ If you just want the fastest route to a working development install using the
218
+ Meson backend through pip (PEP 517), use the following. This performs an
219
+ editable install and will automatically rebuild C/Cython components when
220
+ you import pandas.
221
+
222
+ .. code-block :: shell
223
+
224
+ # from the repo root, after creating/activating your env
225
+ # fetch tags so the version string can be computed
226
+ git fetch upstream --tags
227
+
228
+ # install in editable mode with meson backend
229
+ python -m pip install -ve . --no-build-isolation -Ceditable-verbose=true
230
+
231
+ .. tip ::
232
+ Set a build directory to speed up rebuilds by keeping artifacts in one place::
233
+
234
+ python -m pip install -ve . --no-build-isolation \
235
+ -Cbuilddir=".meson_build" -Csetup-args="-Dbuildtype=debug"
236
+
237
+ The ``-Dbuildtype=debug `` flag improves debugging of C extensions. Omit it
238
+ for optimized builds.
239
+
240
+ Windows-specific notes
241
+ ^^^^^^^^^^^^^^^^^^^^^^
242
+
243
+ * Ensure the "Build Tools for Visual Studio 2022" with the
244
+ "Desktop development with C++" workload is installed. If Meson cannot
245
+ find ``cl.exe ``, add the optional component
246
+ ``MSVC v142 - VS 2019 C++ x64/x86 build tools `` from the installer.
247
+ * Use an elevated "x64 Native Tools Command Prompt for VS 2022" or a standard
248
+ PowerShell where the build tools are on ``PATH ``.
249
+ * Long paths: enable them to avoid build errors when the source path is deep::
250
+
251
+ git config --global core.longpaths true
252
+
253
+ * PowerShell execution policy can block virtualenv activation scripts. If needed::
254
+
255
+ Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
256
+
257
+ * To see Meson’s automatic rebuild output on import every time, either pass
258
+ ``-Ceditable-verbose=true `` in the install command (above) or set the env var::
259
+
260
+ set MESONPY_EDITABLE_VERBOSE=1 # PowerShell/cmd (for current session)
261
+
262
+ Next steps
263
+ ^^^^^^^^^^
264
+
265
+ * Verify the install::
266
+
267
+ python -c "import pandas, sys; print(pandas.__version__, sys.executable)"
268
+
269
+ * Run a focused test subset before the full suite::
270
+
271
+ pytest pandas/tests/frame/test_constructors.py -q
272
+
273
+ The sections below describe the supported build methods in more detail.
274
+
214
275
There are currently two supported ways of building pandas, pip/meson and setuptools(setup.py).
215
276
Historically, pandas has only supported using setuptools to build pandas. However, this method
216
277
requires a lot of convoluted code in setup.py and also has many issues in compiling pandas in parallel
0 commit comments