Robot Framework
version.py
Go to the documentation of this file.
1 # Copyright 2008-2015 Nokia Networks
2 # Copyright 2016- Robot Framework Foundation
3 #
4 # Licensed under the Apache License, Version 2.0 (the "License");
5 # you may not use this file except in compliance with the License.
6 # You may obtain a copy of the License at
7 #
8 # http://www.apache.org/licenses/LICENSE-2.0
9 #
10 # Unless required by applicable law or agreed to in writing, software
11 # distributed under the License is distributed on an "AS IS" BASIS,
12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 # See the License for the specific language governing permissions and
14 # limitations under the License.
15 
16 import re
17 import sys
18 
19 # Version number typically updated by running `invoke set-version <version>`.
20 # Run `invoke --help set-version` or see tasks.py for details.
21 VERSION = '6.0.2.dev1'
22 
23 
24 def get_version(naked=False):
25  if naked:
26  return re.split('(a|b|rc|.dev)', VERSION)[0]
27  return VERSION
28 
29 
30 def get_full_version(program=None, naked=False):
31  version = '%s %s (%s %s on %s)' % (program or '',
32  get_version(naked),
34  sys.version.split()[0],
35  sys.platform)
36  return version.strip()
37 
38 
40  if 'PyPy' in sys.version:
41  return 'PyPy'
42  return 'Python'
def get_full_version(program=None, naked=False)
Definition: version.py:30
def get_interpreter()
Definition: version.py:39
def get_version(naked=False)
Definition: version.py:24