File tree Expand file tree Collapse file tree 5 files changed +8
-12
lines changed Expand file tree Collapse file tree 5 files changed +8
-12
lines changed Original file line number Diff line number Diff line change 12
12
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
13
# See the License for the specific language governing permissions and
14
14
# limitations under the License.
15
+
16
+ __version__ = "0.0.1"
Original file line number Diff line number Diff line change @@ -26,10 +26,6 @@ class HostTestPluginResetMethod_pyOCD(HostTestPluginBase):
26
26
27
27
def __init__ (self ):
28
28
"""! ctor
29
- @details We can check module version by referring to version attribute
30
- import pkg_resources
31
- print pkg_resources.require("mbed-host-tests")[0].version
32
- '2.7'
33
29
"""
34
30
HostTestPluginBase .__init__ (self )
35
31
Original file line number Diff line number Diff line change 13
13
# See the License for the specific language governing permissions and
14
14
# limitations under the License.
15
15
16
- import pkg_resources
17
16
from sys import stdout
18
17
from .mbed_base import Mbed
18
+ from ... import __version__
19
19
20
20
21
21
class HostTestResults (object ):
@@ -123,9 +123,7 @@ def finish(self):
123
123
def get_hello_string (self ):
124
124
""" Hello string used as first print
125
125
"""
126
- pkg = 'mbed-host-tests'
127
- version = pkg_resources .require (pkg )[0 ].version
128
- return "host test executor ver. " + version
126
+ return "host test executor ver. " + __version__
129
127
130
128
131
129
class DefaultTestSelectorBase (Test ):
Original file line number Diff line number Diff line change 37
37
from ..host_tests_logger import HtrunLogger
38
38
from ..host_tests_conn_proxy import conn_process
39
39
from ..host_tests_toolbox .host_functional import handle_send_break_cmd
40
+ from ... import __version__
40
41
if (sys .version_info > (3 , 0 )):
41
42
from queue import Empty as QueueEmpty
42
43
else :
@@ -82,9 +83,7 @@ def __init__(self, options):
82
83
sys .exit (0 )
83
84
84
85
if options .version : # --version
85
- import pkg_resources # part of setuptools
86
- version = pkg_resources .require ("mbed-host-tests" )[0 ].version
87
- print (version )
86
+ print (__version__ )
88
87
sys .exit (0 )
89
88
90
89
if options .send_break_cmd : # -b with -p PORT (and optional -r RESET_TYPE)
Original file line number Diff line number Diff line change 17
17
from distutils .core import setup
18
18
from io import open
19
19
from setuptools import find_packages
20
+ import mbed_os_tools
20
21
21
22
DESCRIPTION = "The tools to build, test, and work with Mbed OS"
22
23
OWNER_NAMES = "Jimmy Brisson, Brian Daniels"
@@ -30,7 +31,7 @@ def read(fname):
30
31
31
32
setup (
32
33
name = "mbed-os-tools" ,
33
- version = "0.0.1" ,
34
+ version = mbed_os_tools . __version__ ,
34
35
description = DESCRIPTION ,
35
36
long_description = read ("README.md" ),
36
37
author = OWNER_NAMES ,
You can’t perform that action at this time.
0 commit comments