Skip to content

Commit

Permalink
Fixed CI
Browse files Browse the repository at this point in the history
  • Loading branch information
Sylvain MARIE committed Sep 26, 2024
1 parent 13cb1b2 commit 11777ba
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,12 @@
"write_to": "src/pytest_cases/_version.py",
}
# Use the 'version_file_template' directive if possible to avoid type hints and annotations (python <3.8)
from packaging.version import Version
setuptools_scm_version = pkg_resources.get_distribution("setuptools_scm").version
if Version(setuptools_scm_version) >= Version('6'):
# for some reason importing packaging.version.Version here fails on python 3.5
# from packaging.version import Version
# if Version(setuptools_scm_version) >= Version('6'):
setuptools_scm_version_major = int(setuptools_scm_version.split(".")[0])
if setuptools_scm_version_major >= 6:
# template_arg_name = "version_file_template" if Version(setuptools_scm_version) >= Version('8.1') else "write_to_template"
# print(Version(setuptools_scm_version))
# print(template_arg_name)
Expand Down

0 comments on commit 11777ba

Please sign in to comment.