File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed
Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change 2929 - name : Checkout main repository
3030 uses : actions/checkout@v5
3131 with :
32- fetch-depth : 0 # get full history (so no need for "git fetch --unshallow")
32+ fetch-depth : 0 # get full history (so no need for "git fetch --unshallow")
3333
3434 # Configure git identity
3535 - name : Configure git
Original file line number Diff line number Diff line change @@ -63,17 +63,20 @@ def _checkDIRACVersion():
6363 """
6464 from importlib .metadata import requires , version # pylint: disable=import-error,no-name-in-module
6565 from packaging .requirements import Requirement # pylint: disable=no-name-in-module
66+ from packaging .specifiers import SpecifierSet
6667
6768 deps = [Requirement (x ) for x in requires ("WebAppDIRAC" )]
6869 deps = [x for x in deps if x .name .lower () == "dirac" ]
6970 if len (deps ) != 1 :
7071 raise NotImplementedError (f"This shouldn't be possible: { deps !r} " )
72+
7173 dirac_version = version ("DIRAC" )
72- dirac_spec = deps [0 ].specifier
74+ dirac_spec = SpecifierSet (deps [0 ].specifier , prereleases = True )
75+
7376 if dirac_version not in dirac_spec :
7477 raise RuntimeError (
7578 "WebAppDIRAC {} requires {} but {} is incompatible" .format (
76- version ("WebAppDIRAC" ), dirac_version , dirac_spec
79+ version ("WebAppDIRAC" ), dirac_spec , dirac_version
7780 )
7881 )
7982
You can’t perform that action at this time.
0 commit comments