Skip to content

Commit 31737a2

Browse files
authored
fix: non-isolated build fails when versioneer is installed (scikit-build#175)
fix scikit-build#171
1 parent e6df5a9 commit 31737a2

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

setup.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@
99

1010
# Add current folder to path
1111
# This is required to import versioneer in an isolated pip build
12-
sys.path.append(os.path.dirname(os.path.abspath(__file__)))
12+
# Prepending allows not to break on a non-isolated build when versioneer
13+
# is already installed (c.f. https://github.com/scikit-build/cmake-python-distributions/issues/171)
14+
sys.path.insert(0, os.path.dirname(os.path.abspath(__file__)))
1315

1416
import versioneer # noqa: E402
1517

0 commit comments

Comments
 (0)