From 10c7d0ee1d284355f6b8fb4c495a12c5d7078773 Mon Sep 17 00:00:00 2001 From: Kyle Benesch <4b796c65+github@gmail.com> Date: Tue, 23 May 2023 03:48:14 -0700 Subject: [PATCH] Warn when delocate is run without version metadata. --- delocate/__init__.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/delocate/__init__.py b/delocate/__init__.py index e29dbf0e..e95c8095 100644 --- a/delocate/__init__.py +++ b/delocate/__init__.py @@ -1,5 +1,7 @@ # Init for delocate package +import warnings + from .delocating import delocate_path, delocate_wheel, patch_wheel from .libsana import tree_libs, wheel_libs @@ -7,6 +9,12 @@ from ._version import __version__ except ImportError: __version__ = "0.0.0" + warnings.warn( + "Delocate was not installed and is missing version metadata." + "\nMake sure this package is installed in development mode with this command:" + "\n\tpip install --editable .", + RuntimeWarning, + ) __all__ = ( "delocate_path",