From 50efcee9fcf6fe3ccdb86c463e80abe8551f7350 Mon Sep 17 00:00:00 2001 From: Jakub Kuczys <6032823+jack1142@users.noreply.github.com> Date: Fri, 17 Jun 2022 19:35:49 +0200 Subject: [PATCH] fix: non-isolated build fails when versioneer is installed --- setup.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 617f7bb..69e8101 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