File tree Expand file tree Collapse file tree 2 files changed +13
-2
lines changed Expand file tree Collapse file tree 2 files changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -271,7 +271,13 @@ fix (self: {
271
271
}
272
272
]
273
273
*/
274
- parseVersionConds = conds : map self . parseVersionCond ( splitComma conds ) ;
274
+ parseVersionConds =
275
+ conds :
276
+ let
277
+ # If the conditions are surrounded by parens strip them away
278
+ parenM = match "\\ ((.+)\\ )" conds ;
279
+ in
280
+ map self . parseVersionCond ( splitComma ( if parenM != null then head parenM else conds ) ) ;
275
281
276
282
/*
277
283
Compare two versions as parsed by `parseVersion` according to PEP-440.
Original file line number Diff line number Diff line change 353
353
} ;
354
354
} ;
355
355
356
- parseVersionConds = {
356
+ parseVersionConds = rec {
357
357
testSimple = {
358
358
expr = parseVersionConds ">=3.0.0rc1,<=4.0" ;
359
359
expected = [
393
393
}
394
394
] ;
395
395
} ;
396
+
397
+ testParen = {
398
+ expr = parseVersionConds "(>=3.0.0rc1,<=4.0)" ;
399
+ inherit ( testSimple ) expected ;
400
+ } ;
396
401
} ;
397
402
398
403
comparators = {
You can’t perform that action at this time.
0 commit comments