diff options
| author | Jason R. Coombs <jaraco@jaraco.com> | 2021-11-14 03:35:15 -0500 |
|---|---|---|
| committer | Jason R. Coombs <jaraco@jaraco.com> | 2021-11-14 12:50:13 -0500 |
| commit | 0fc3bc079b8fec1662e6e0df540490e4198d6862 (patch) | |
| tree | 02e866c694ff56ba57bdfea0ae3cb5193683643b /setuptools | |
| parent | d212daa48743609fc439d8f5cbb2b4e8effbd55f (diff) | |
| download | python-setuptools-git-feature/deprecate-installer.tar.gz | |
Reduce scope of setup_requires deprecation to only deprecate the installation of these requirements, but still honor setup_requires in PEP 517 installers. Fixes #2877.feature/deprecate-installer
Diffstat (limited to 'setuptools')
| -rw-r--r-- | setuptools/__init__.py | 6 | ||||
| -rw-r--r-- | setuptools/installer.py | 7 |
2 files changed, 7 insertions, 6 deletions
diff --git a/setuptools/__init__.py b/setuptools/__init__.py index a623262e..9d6f0bc0 100644 --- a/setuptools/__init__.py +++ b/setuptools/__init__.py @@ -4,7 +4,6 @@ from fnmatch import fnmatchcase import functools import os import re -import warnings import _distutils_hack.override # noqa: F401 @@ -145,11 +144,6 @@ def _install_setup_requires(attrs): # Honor setup.cfg's options. dist.parse_config_files(ignore_option_errors=True) if dist.setup_requires: - warnings.warn( - "setup_requires is deprecated. Supply build " - "dependencies using PEP 517 pyproject.toml build-requires.", - SetuptoolsDeprecationWarning, - ) dist.fetch_build_eggs(dist.setup_requires) diff --git a/setuptools/installer.py b/setuptools/installer.py index 57e2b587..b7096df1 100644 --- a/setuptools/installer.py +++ b/setuptools/installer.py @@ -3,11 +3,13 @@ import os import subprocess import sys import tempfile +import warnings from distutils import log from distutils.errors import DistutilsError import pkg_resources from setuptools.wheel import Wheel +from ._deprecation_warning import SetuptoolsDeprecationWarning def _fixup_find_links(find_links): @@ -22,6 +24,11 @@ def fetch_build_egg(dist, req): # noqa: C901 # is too complex (16) # FIXME """Fetch an egg needed for building. Use pip/wheel to fetch/build a wheel.""" + warnings.warn( + "setuptools.installer is deprecated. Requirements should " + "be satisfied by a PEP 517 installer.", + SetuptoolsDeprecationWarning, + ) # Warn if wheel is not available try: pkg_resources.get_distribution('wheel') |
