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