diff options
| author | Ralf Gommers <ralf.gommers@gmail.com> | 2022-01-22 17:54:46 +0100 |
|---|---|---|
| committer | Ralf Gommers <ralf.gommers@gmail.com> | 2022-02-15 14:45:30 +0100 |
| commit | 0ae08d026eaf8a975156c9149e318812bb9586bb (patch) | |
| tree | c1dc11cfcc526e118411c367b1be4d6288eff6c8 /numpy/distutils | |
| parent | 5b9b9395036702a23275592293c6501f423269ba (diff) | |
| download | numpy-0ae08d026eaf8a975156c9149e318812bb9586bb.tar.gz | |
DEP: deprecate `numpy.distutils`, and add a migration guide
Diffstat (limited to 'numpy/distutils')
| -rw-r--r-- | numpy/distutils/__init__.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/numpy/distutils/__init__.py b/numpy/distutils/__init__.py index 79974d1c2..e8255aa1e 100644 --- a/numpy/distutils/__init__.py +++ b/numpy/distutils/__init__.py @@ -19,6 +19,8 @@ LAPACK, and for setting include paths and similar build options, please see """ +import warnings + # Must import local ccompiler ASAP in order to get # customized CCompiler.spawn effective. from . import ccompiler @@ -26,6 +28,15 @@ from . import unixccompiler from .npy_pkg_config import * +warnings.warn("\n\n" + " `numpy.distutils` is deprecated since NumPy 1.23.0, as a result\n" + " of the deprecation of `distutils` itself. It will be removed for\n" + " Python >= 3.12. For older Python versions it will remain present.\n" + " It is recommended to use `setuptools < 60.0` for those Python versions.\n" + " For more details, see: TODO! \n\n", + DeprecationWarning, stacklevel=2 +) + # If numpy is installed, add distutils.test() try: from . import __config__ |
