Skip to content

Commit 11777ba

Browse files
author
Sylvain MARIE
committed
Fixed CI
1 parent 13cb1b2 commit 11777ba

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

setup.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,12 @@
3434
"write_to": "src/pytest_cases/_version.py",
3535
}
3636
# Use the 'version_file_template' directive if possible to avoid type hints and annotations (python <3.8)
37-
from packaging.version import Version
3837
setuptools_scm_version = pkg_resources.get_distribution("setuptools_scm").version
39-
if Version(setuptools_scm_version) >= Version('6'):
38+
# for some reason importing packaging.version.Version here fails on python 3.5
39+
# from packaging.version import Version
40+
# if Version(setuptools_scm_version) >= Version('6'):
41+
setuptools_scm_version_major = int(setuptools_scm_version.split(".")[0])
42+
if setuptools_scm_version_major >= 6:
4043
# template_arg_name = "version_file_template" if Version(setuptools_scm_version) >= Version('8.1') else "write_to_template"
4144
# print(Version(setuptools_scm_version))
4245
# print(template_arg_name)

0 commit comments

Comments
 (0)