summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pytest.ini1
-rw-r--r--setuptools/command/editable_wheel.py18
2 files changed, 19 insertions, 0 deletions
diff --git a/pytest.ini b/pytest.ini
index 14c7e94c..f171d853 100644
--- a/pytest.ini
+++ b/pytest.ini
@@ -60,3 +60,4 @@ filterwarnings=
ignore:Setuptools is replacing distutils
ignore:Support for project metadata in .pyproject.toml. is still experimental
+ ignore::setuptools.command.editable_wheel.InformationOnly
diff --git a/setuptools/command/editable_wheel.py b/setuptools/command/editable_wheel.py
index 48202990..2776577f 100644
--- a/setuptools/command/editable_wheel.py
+++ b/setuptools/command/editable_wheel.py
@@ -15,6 +15,7 @@ import re
import shutil
import sys
import logging
+import warnings
from itertools import chain
from pathlib import Path
from tempfile import TemporaryDirectory
@@ -166,6 +167,15 @@ class editable_wheel(Command):
populate = _LinkTree(self.distribution, name, auxiliary_build_dir, tmp)
populate(unpacked_dir)
+ msg = f"""\n
+ Strict editable installation performed using the auxiliary directory:
+ {auxiliary_build_dir}
+
+ Please be careful to not remove this directory, otherwise you might not be able
+ to import/use your package.
+ """
+ warnings.warn(msg, InformationOnly)
+
def _populate_static_pth(self, name: str, project_dir: Path, unpacked_dir: Path):
"""Populate wheel using the "lax" ``.pth`` file strategy, for ``src-layout``."""
src_dir = self.package_dir[""]
@@ -583,3 +593,11 @@ def _finder_template(
"""
mapping = dict(sorted(mapping.items(), key=lambda p: p[0]))
return _FINDER_TEMPLATE.format(name=name, mapping=mapping, namespaces=namespaces)
+
+
+class InformationOnly(UserWarning):
+ """Currently there is no clear way of displaying messages to the users
+ that use the setuptools backend directly via ``pip``.
+ The only thing that might work is a warning, although it is not the
+ most appropriate tool for the job...
+ """