From 8e3f539df4da757cd57e363acb918c640c6430a4 Mon Sep 17 00:00:00 2001 From: Daniel Schmidt Date: Fri, 18 Feb 2022 18:03:50 +0100 Subject: [PATCH 1/2] Add "build C extensions" note The C extensions must also be created when you bind your local repository for the first time. --- .../development/contributing_environment.rst | 26 ++++++++++++------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/doc/source/development/contributing_environment.rst b/doc/source/development/contributing_environment.rst index b28f7c833d7ad..849fbbbc8804a 100644 --- a/doc/source/development/contributing_environment.rst +++ b/doc/source/development/contributing_environment.rst @@ -26,14 +26,27 @@ with a full pandas development environment. **Docker Commands** -Pass your GitHub username in the ``DockerFile`` to use your own fork:: +Build the Docker image:: # Build the image pandas-yourname-env docker build --tag pandas-yourname-env . - # Run a container and bind your local forked repo, pandas-yourname, to the container - docker run -it --rm -v path-to-pandas-yourname:/home/pandas-yourname pandas-yourname-env + # Or build the image by passing your GitHub username to use your own fork + docker build --build-arg gh_username=yourname --tag pandas-yourname-env . -Even easier, you can integrate Docker with the following IDEs: +Run Container:: + + # Run a container and bind your local repo to the container + docker run -it -w /home/pandas --rm -v path-to-local-pandas-repo:/home/pandas pandas-yourname-env + +.. note:: + If you bind your local repo for the first time, you have to build the C extensions afterwards. + Run the following command inside the container:: + + python setup.py build_ext -j 4 + + You might need to rebuild the C extensions if/when you merge your repo with upstream/main. + +*Even easier, you can integrate Docker with the following IDEs:* **Visual Studio Code** @@ -47,11 +60,6 @@ Enable Docker support and use the Services tool window to build and manage image run and interact with containers. See https://www.jetbrains.com/help/pycharm/docker.html for details. -Note that you might need to rebuild the C extensions if/when you merge with upstream/main using:: - - python setup.py build_ext -j 4 - - Creating an environment without Docker --------------------------------------- From 294bced9487dfef0a46c53cd55c98e81ced3495c Mon Sep 17 00:00:00 2001 From: Daniel Schmidt Date: Thu, 24 Feb 2022 08:12:24 +0100 Subject: [PATCH 2/2] add details when the extension has to be re-build --- doc/source/development/contributing_environment.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/doc/source/development/contributing_environment.rst b/doc/source/development/contributing_environment.rst index 849fbbbc8804a..fb27d07cfb18f 100644 --- a/doc/source/development/contributing_environment.rst +++ b/doc/source/development/contributing_environment.rst @@ -44,7 +44,8 @@ Run Container:: python setup.py build_ext -j 4 - You might need to rebuild the C extensions if/when you merge your repo with upstream/main. + You need to rebuild the C extensions anytime the Cython code in ``pandas/_libs`` changes. + This most frequently occurs when changing or merging branches. *Even easier, you can integrate Docker with the following IDEs:*