summaryrefslogtreecommitdiff
path: root/setuptools/command
diff options
context:
space:
mode:
authorAnderson Bravalheri <andersonbravalheri@gmail.com>2022-06-16 18:16:55 +0100
committerAnderson Bravalheri <andersonbravalheri@gmail.com>2022-06-16 18:16:55 +0100
commit01d961a8b990d50e326ea4759dd62dd215ad2b4d (patch)
treeb3bbf866e32b766eb75fa8d73f64df6c0f8bc23e /setuptools/command
parentdf4419251fa5742fd5b2b4d5a9f11a3915be19ba (diff)
downloadpython-setuptools-git-01d961a8b990d50e326ea4759dd62dd215ad2b4d.tar.gz
Add warning with information for the user about link tree
Diffstat (limited to 'setuptools/command')
-rw-r--r--setuptools/command/editable_wheel.py18
1 files changed, 18 insertions, 0 deletions
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...
+ """