Trees | Indices | Help |
|
---|
Module for parsing and testing package version predicate strings.
re.compile(r'(?i)
^\s*
(
[
a-
z_]
\w*
(?:
\.[
a-
z_]
\w...
re.compile(r'^\s*
\((
.*
)
\)\s*
$')
re.compile(r'^\s*
(
<=|
>=|
<|
>|
!=|
==)
\s*
(
[
^
\...
{
'
!=
'
:
<built-in function ne>,
'
<
'
:
<built-in functi...
None
Imports: re, distutils, operator
Parse a single version comparison.
Return (comparison string, StrictVersion)
Return the name and optional version number of a provision.
The version number, if given, will be returned as a `StrictVersion` instance, otherwise it will be `None`.
>>> split_provision('mypkg') ('mypkg', None) >>> split_provision(' mypkg( 1.2 ) ') ('mypkg', StrictVersion ('1.2'))
re.compile(r'(?i)
^\s*
(
[
a-
z_]
\w*
(?:
\.[
a-
z_]
\w*
)
*
)
(
.*
)
')
re.compile(r'^\s*
(
<=|
>=|
<|
>|
!=|
==)
\s*
(
[
^
\s,]
+
)
\s*
$')
{
'
!=
'
:
<built-in function ne>,
'
<
'
:
<built-in function lt>,
'
<=
'
:
<built-in function le>,
'
==
'
:
<built-in function eq>,
'
>
'
:
<built-in function gt>,
'
>=
'
:
<built-in function ge>}
Trees | Indices | Help |
|
---|