From 8ddc013b5f96c0ed128bf9d84f9f7c7a5e4cf193 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B8rgen=20Kvalsvik?= Date: Sun, 13 Dec 2020 14:10:11 +0100 Subject: [PATCH] Point setuptools to file setuptools_scm 5.0 considers a directory a direct target, rather than a containing directory, which the build scripts (brokenly) assumed. A better approach has been known for some time [2], but never implemented. [1] https://github.com/pypa/setuptools_scm/blob/master/CHANGELOG.rst#v500 [2] https://github.com/pypa/setuptools_scm/issues/131 --- python/setup.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/python/setup.py b/python/setup.py index b365e28f8..fc486a1d4 100644 --- a/python/setup.py +++ b/python/setup.py @@ -65,7 +65,8 @@ def getversion(): if not 'SEGYIO_NO_GIT_VER' in os.environ and os.path.isdir(src('../.git')): return { 'use_scm_version': { - 'relative_to' : src(''), + 'root': '..', + 'relative_to' : __file__, # write to ./python 'write_to' : os.path.join(src(''), versionfile), }