diff options
author | Raphaël Barrois <raphael.barrois@polytechnique.org> | 2013-10-29 00:59:55 +0100 |
---|---|---|
committer | Raphaël Barrois <raphael.barrois@polytechnique.org> | 2013-10-29 01:00:01 +0100 |
commit | 03037e2ff14ddd7062e8a5b6bae6dd9deebb7ec2 (patch) | |
tree | f3bcbae9cc4de8daa17af1e644de0cb0d0c42496 | |
parent | 8b5a94ea1ba41bb5f7037ca866490724bb265fff (diff) | |
download | semantic-version-03037e2ff14ddd7062e8a5b6bae6dd9deebb7ec2.tar.gz |
Fix toplevel import of validate() (Closes #2).
-rw-r--r-- | README | 12 | ||||
-rw-r--r-- | src/semantic_version/__init__.py | 2 |
2 files changed, 13 insertions, 1 deletions
@@ -113,6 +113,17 @@ Obviously, :class:`Versions <Version>` can be compared: False +It is also possible to check whether a given string is a proper semantic version string: + + +.. code-block:: pycon + + >>> semantic_version.validate('0.1.3') + True + >>> semantic_version.validate('0a2') + False + + Requirement specification ------------------------- @@ -224,6 +235,7 @@ definition or (for the empty pre-release number) if a single dash is appended >>> Version('0.1.0-alpha') in Spec('>=0.1.0-') # Include pre-release in checks False + Including build identifiers in specifications """"""""""""""""""""""""""""""""""""""""""""" diff --git a/src/semantic_version/__init__.py b/src/semantic_version/__init__.py index 5db23c3..d4dc2af 100644 --- a/src/semantic_version/__init__.py +++ b/src/semantic_version/__init__.py @@ -7,4 +7,4 @@ __author__ = "Raphaël Barrois <raphael.barrois+semver@polytechnique.org>" __version__ = '2.2.0' -from .base import compare, match, Spec, SpecItem, Version +from .base import compare, match, validate, Spec, SpecItem, Version |