From 8eb5e256b6497ad071c958af09db6d8617f417ad Mon Sep 17 00:00:00 2001 From: Caspar van Leeuwen Date: Tue, 24 Sep 2024 08:30:52 +0200 Subject: [PATCH] Make sure to import the fallback version _first_ --- setup.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index 7479b4b2..b5ec6d87 100644 --- a/setup.py +++ b/setup.py @@ -26,8 +26,6 @@ setuptools_scm_requirement = 'setuptools_scm>=4.0.0,<=4.1.2' scm_dict = {'write_to': version_file_path, 'write_to_template': '__version__ "{version}"'} -# Add the fallback version to whatever was set for scm_dict -scm_dict['fallback_version'] = __version__ # if python_version < (3, 8): # scm_dict = {'write_to': 'eessi/testsuite/_version.py'} @@ -38,8 +36,10 @@ # scm_require = ['setuptools>=61', 'setuptools_scm>=8'] # scm_arg_key = "version_file" +# Add the fallback version to whatever was set for scm_dict sys.path.append('.') from eessi.testsuite import __version__ +scm_dict['fallback_version'] = __version__ setuptools.setup( # use_scm_version={scm_arg_key: 'eessi/testsuite/_version.py', 'fallback_version': __version__},