From 8231e3c4ae1b1efb4113849fb6cbd94a0be9d46d Mon Sep 17 00:00:00 2001 From: mayeut Date: Sat, 31 Jul 2021 16:14:11 +0200 Subject: [PATCH] fix: non-isolated build fails when versioneer is installed fix #171 --- setup.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py index e4de8fc3e..1e76983ab 100755 --- a/setup.py +++ b/setup.py @@ -9,7 +9,9 @@ # Add current folder to path # This is required to import versioneer in an isolated pip build -sys.path.append(os.path.dirname(os.path.abspath(__file__))) +# Prepending allows not to break on a non-isolated build when versioneer +# is already installed (c.f. https://github.com/scikit-build/cmake-python-distributions/issues/171) +sys.path.insert(0, os.path.dirname(os.path.abspath(__file__))) import versioneer # noqa: E402