From 31737a27067c3f8296b422f0510a916a2f0fc776 Mon Sep 17 00:00:00 2001 From: Matthieu Darbois Date: Sun, 1 Aug 2021 10:08:16 +0200 Subject: [PATCH] fix: non-isolated build fails when versioneer is installed (#175) 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