From 6af8280173e6d0d38a825225aea87df76ad7ec87 Mon Sep 17 00:00:00 2001 From: Fangchen Li Date: Tue, 29 Jun 2021 09:47:50 -0500 Subject: [PATCH 01/10] DEPS: update setuptools min version --- doc/source/getting_started/install.rst | 2 +- doc/source/whatsnew/v1.3.0.rst | 2 +- pyproject.toml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/source/getting_started/install.rst b/doc/source/getting_started/install.rst index 88e54421daa11..948bb9e52590e 100644 --- a/doc/source/getting_started/install.rst +++ b/doc/source/getting_started/install.rst @@ -262,7 +262,7 @@ Visualization ========================= ================== ============================================================= Dependency Minimum Version Notes ========================= ================== ============================================================= -setuptools 38.6.0 Utils for entry points of plotting backend +setuptools 51.0.0 Utils for entry points of plotting backend matplotlib 2.2.3 Plotting library Jinja2 2.10 Conditional formatting with DataFrame.style tabulate 0.8.7 Printing in Markdown-friendly format (see `tabulate`_) diff --git a/doc/source/whatsnew/v1.3.0.rst b/doc/source/whatsnew/v1.3.0.rst index 60dc7096c9d1e..d1919d377a622 100644 --- a/doc/source/whatsnew/v1.3.0.rst +++ b/doc/source/whatsnew/v1.3.0.rst @@ -645,7 +645,7 @@ If installed, we now require: +-----------------+-----------------+----------+---------+ | mypy (dev) | 0.812 | | X | +-----------------+-----------------+----------+---------+ -| setuptools | 38.6.0 | | X | +| setuptools | 51.0.0 | | X | +-----------------+-----------------+----------+---------+ For `optional libraries `_ the general recommendation is to use the latest version. diff --git a/pyproject.toml b/pyproject.toml index 86b255ab6bf58..0d1aefb9d4b55 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -2,7 +2,7 @@ # Minimum requirements for the build system to execute. # See https://github.com/scipy/scipy/pull/12940 for the AIX issue. requires = [ - "setuptools>=38.6.0", + "setuptools>=51.0.0", "wheel", "Cython>=0.29.21,<3", # Note: sync with setup.py # Numpy requirements for different OS/architectures From 7bc5a426af9191b10ae9e96867c86295028d4c73 Mon Sep 17 00:00:00 2001 From: Fangchen Li Date: Tue, 29 Jun 2021 10:13:16 -0500 Subject: [PATCH 02/10] update doc --- doc/source/development/contributing_environment.rst | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/doc/source/development/contributing_environment.rst b/doc/source/development/contributing_environment.rst index bc0a3556b9ac1..6d85a7472f363 100644 --- a/doc/source/development/contributing_environment.rst +++ b/doc/source/development/contributing_environment.rst @@ -189,9 +189,8 @@ Creating a Python environment (pip) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ If you aren't using conda for your development environment, follow these instructions. -You'll need to have at least the :ref:`minimum Python version ` that pandas supports. If your Python version -is 3.8.0 (or later), you might need to update your ``setuptools`` to version 42.0.0 (or later) -in your development environment before installing the build dependencies:: +You'll need to have at least the :ref:`minimum Python version ` that pandas supports. +In your development environment before installing the build dependencies:: pip install --upgrade setuptools From 9ac6943a9eac2fc7dfb7dc6f85ca919d693ac1e3 Mon Sep 17 00:00:00 2001 From: Fangchen Li Date: Tue, 29 Jun 2021 15:41:13 -0500 Subject: [PATCH 03/10] add setuptools to environment.yml --- environment.yml | 1 + requirements-dev.txt | 1 + 2 files changed, 2 insertions(+) diff --git a/environment.yml b/environment.yml index 956f3e8dbff74..148669611b8a9 100644 --- a/environment.yml +++ b/environment.yml @@ -84,6 +84,7 @@ dependencies: - numexpr>=2.7.0 - scipy>=1.2 - numba>=0.46.0 + - setuptools>=51.0.0 # entry_points # optional for io # --------------- diff --git a/requirements-dev.txt b/requirements-dev.txt index 03c7b7ef41b70..fb35c868ff68a 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -56,6 +56,7 @@ matplotlib>=2.2.2 numexpr>=2.7.0 scipy>=1.2 numba>=0.46.0 +setuptools>=51.0.0 beautifulsoup4>=4.6.0 html5lib lxml From 8a12e210b0623287011c411859b8cc08726523d1 Mon Sep 17 00:00:00 2001 From: Fangchen Li Date: Wed, 30 Jun 2021 07:45:54 -0500 Subject: [PATCH 04/10] remove setuptools from environment.yml --- environment.yml | 1 - requirements-dev.txt | 1 - 2 files changed, 2 deletions(-) diff --git a/environment.yml b/environment.yml index 148669611b8a9..956f3e8dbff74 100644 --- a/environment.yml +++ b/environment.yml @@ -84,7 +84,6 @@ dependencies: - numexpr>=2.7.0 - scipy>=1.2 - numba>=0.46.0 - - setuptools>=51.0.0 # entry_points # optional for io # --------------- diff --git a/requirements-dev.txt b/requirements-dev.txt index fb35c868ff68a..03c7b7ef41b70 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -56,7 +56,6 @@ matplotlib>=2.2.2 numexpr>=2.7.0 scipy>=1.2 numba>=0.46.0 -setuptools>=51.0.0 beautifulsoup4>=4.6.0 html5lib lxml From 0b812a01f777760b2da0ccecee6cd32abb8ba3db Mon Sep 17 00:00:00 2001 From: Fangchen Li Date: Thu, 1 Jul 2021 09:13:36 -0500 Subject: [PATCH 05/10] fix doc --- doc/source/development/contributing_environment.rst | 4 +--- doc/source/getting_started/install.rst | 2 +- doc/source/whatsnew/v1.3.0.rst | 2 +- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/doc/source/development/contributing_environment.rst b/doc/source/development/contributing_environment.rst index 6d85a7472f363..fb21b6867720d 100644 --- a/doc/source/development/contributing_environment.rst +++ b/doc/source/development/contributing_environment.rst @@ -190,9 +190,7 @@ Creating a Python environment (pip) If you aren't using conda for your development environment, follow these instructions. You'll need to have at least the :ref:`minimum Python version ` that pandas supports. -In your development environment before installing the build dependencies:: - - pip install --upgrade setuptools +You also need to have ``setuotools`` 51.0.0 or later to build pandas. **Unix**/**macOS with virtualenv** diff --git a/doc/source/getting_started/install.rst b/doc/source/getting_started/install.rst index 948bb9e52590e..88e54421daa11 100644 --- a/doc/source/getting_started/install.rst +++ b/doc/source/getting_started/install.rst @@ -262,7 +262,7 @@ Visualization ========================= ================== ============================================================= Dependency Minimum Version Notes ========================= ================== ============================================================= -setuptools 51.0.0 Utils for entry points of plotting backend +setuptools 38.6.0 Utils for entry points of plotting backend matplotlib 2.2.3 Plotting library Jinja2 2.10 Conditional formatting with DataFrame.style tabulate 0.8.7 Printing in Markdown-friendly format (see `tabulate`_) diff --git a/doc/source/whatsnew/v1.3.0.rst b/doc/source/whatsnew/v1.3.0.rst index 921406f534f54..b1ee8ca03d3ee 100644 --- a/doc/source/whatsnew/v1.3.0.rst +++ b/doc/source/whatsnew/v1.3.0.rst @@ -645,7 +645,7 @@ If installed, we now require: +-----------------+-----------------+----------+---------+ | mypy (dev) | 0.812 | | X | +-----------------+-----------------+----------+---------+ -| setuptools | 51.0.0 | | X | +| setuptools | 38.6.0 | | X | +-----------------+-----------------+----------+---------+ For `optional libraries `_ the general recommendation is to use the latest version. From 73d59fe950e56f84387696882bc3ea72f8462b30 Mon Sep 17 00:00:00 2001 From: Fangchen Li Date: Thu, 1 Jul 2021 09:22:37 -0500 Subject: [PATCH 06/10] Update doc/source/development/contributing_environment.rst Co-authored-by: Simon Hawkins --- doc/source/development/contributing_environment.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/source/development/contributing_environment.rst b/doc/source/development/contributing_environment.rst index fb21b6867720d..7b52bf760b601 100644 --- a/doc/source/development/contributing_environment.rst +++ b/doc/source/development/contributing_environment.rst @@ -190,7 +190,7 @@ Creating a Python environment (pip) If you aren't using conda for your development environment, follow these instructions. You'll need to have at least the :ref:`minimum Python version ` that pandas supports. -You also need to have ``setuotools`` 51.0.0 or later to build pandas. +You also need to have ``setuptools`` 51.0.0 or later to build pandas. **Unix**/**macOS with virtualenv** From efb2fc72aff445c7cd383d61852ef757a4d507a1 Mon Sep 17 00:00:00 2001 From: Fangchen Li Date: Thu, 8 Jul 2021 17:48:54 -0500 Subject: [PATCH 07/10] add instruction for upgrading setuptools --- doc/source/development/contributing_environment.rst | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/doc/source/development/contributing_environment.rst b/doc/source/development/contributing_environment.rst index 7b52bf760b601..95b6b47e3985a 100644 --- a/doc/source/development/contributing_environment.rst +++ b/doc/source/development/contributing_environment.rst @@ -191,6 +191,11 @@ Creating a Python environment (pip) If you aren't using conda for your development environment, follow these instructions. You'll need to have at least the :ref:`minimum Python version ` that pandas supports. You also need to have ``setuptools`` 51.0.0 or later to build pandas. +In your development environment, use the ``pip`` to upgrade ``setuptools``. + +.. code-block:: bash + + pip install --upgrade setuptools **Unix**/**macOS with virtualenv** From 4d578be70230524a995b984d29c360f37ca14856 Mon Sep 17 00:00:00 2001 From: Fangchen Li Date: Thu, 8 Jul 2021 18:32:06 -0500 Subject: [PATCH 08/10] remove code-block --- doc/source/development/contributing_environment.rst | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/doc/source/development/contributing_environment.rst b/doc/source/development/contributing_environment.rst index 95b6b47e3985a..5ba41837022a4 100644 --- a/doc/source/development/contributing_environment.rst +++ b/doc/source/development/contributing_environment.rst @@ -193,9 +193,7 @@ You'll need to have at least the :ref:`minimum Python version ` You also need to have ``setuptools`` 51.0.0 or later to build pandas. In your development environment, use the ``pip`` to upgrade ``setuptools``. -.. code-block:: bash - - pip install --upgrade setuptools + pip install --upgrade setuptools **Unix**/**macOS with virtualenv** From 1d6c1e4db4504c7ba88809284d79155ac7625617 Mon Sep 17 00:00:00 2001 From: Fangchen Li Date: Mon, 26 Jul 2021 16:00:45 -0500 Subject: [PATCH 09/10] add setuptools to requirements.txt --- doc/source/development/contributing_environment.rst | 3 --- requirements-dev.txt | 1 + scripts/generate_pip_deps_from_conda.py | 8 ++++++++ 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/doc/source/development/contributing_environment.rst b/doc/source/development/contributing_environment.rst index 193c6f84c5fdf..1f9b34c7a784e 100644 --- a/doc/source/development/contributing_environment.rst +++ b/doc/source/development/contributing_environment.rst @@ -191,9 +191,6 @@ Creating a Python environment (pip) If you aren't using conda for your development environment, follow these instructions. You'll need to have at least the :ref:`minimum Python version ` that pandas supports. You also need to have ``setuptools`` 51.0.0 or later to build pandas. -In your development environment, use the ``pip`` to upgrade ``setuptools``. - - pip install --upgrade setuptools **Unix**/**macOS with virtualenv** diff --git a/requirements-dev.txt b/requirements-dev.txt index efab43279aba6..49e966cc3a1cf 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -84,3 +84,4 @@ types-python-dateutil types-PyMySQL types-pytz types-setuptools +setuptools>=51.0.0 diff --git a/scripts/generate_pip_deps_from_conda.py b/scripts/generate_pip_deps_from_conda.py index 5117150be67c3..2ea50fa3ac8d4 100755 --- a/scripts/generate_pip_deps_from_conda.py +++ b/scripts/generate_pip_deps_from_conda.py @@ -17,6 +17,7 @@ import re import sys +import toml import yaml EXCLUDE = {"python", "c-compiler", "cxx-compiler"} @@ -96,6 +97,13 @@ def generate_pip_from_conda( ) pip_content = header + "\n".join(pip_deps) + "\n" + # add setuptools to requirements-dev.txt + meta = toml.load(pathlib.Path(conda_path.parent, "pyproject.toml")) + for requirement in meta["build-system"]["requires"]: + if "setuptools" in requirement: + pip_content += requirement + pip_content += "\n" + if compare: with pip_path.open() as file: return pip_content != file.read() From 2aba4783d57b95dbee8b6cffba53b046c8efba20 Mon Sep 17 00:00:00 2001 From: Fangchen Li Date: Mon, 26 Jul 2021 16:08:37 -0500 Subject: [PATCH 10/10] add toml to pre-commit dependency list --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 3a07aae11dc1b..dca1a84867e72 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -110,7 +110,7 @@ repos: entry: python scripts/generate_pip_deps_from_conda.py files: ^(environment.yml|requirements-dev.txt)$ pass_filenames: false - additional_dependencies: [pyyaml] + additional_dependencies: [pyyaml, toml] - id: sync-flake8-versions name: Check flake8 version is synced across flake8, yesqa, and environment.yml language: python