From a4bb8699ae1fb9f51034f66f9a16b7e1ec1b6515 Mon Sep 17 00:00:00 2001 From: Angus Salkeld Date: Thu, 12 Jun 2014 21:57:42 +1000 Subject: [PATCH] Correct the name that the client is installed as pip needs to be able to find the library as "python-mistralclient" not "mistralclient". Change-Id: Ie2ea7fa1e464fd79c423e82013b08d575c5688c9 Closes-Bug: #1329283 --- mistralclient/__init__.py | 19 +++++++++++++++++++ mistralclient/tests/test_cli_executions.py | 3 +-- mistralclient/version.py | 20 -------------------- 3 files changed, 20 insertions(+), 22 deletions(-) delete mode 100644 mistralclient/version.py diff --git a/mistralclient/__init__.py b/mistralclient/__init__.py index e69de29b..f8f1a431 100644 --- a/mistralclient/__init__.py +++ b/mistralclient/__init__.py @@ -0,0 +1,19 @@ +# Copyright 2014 Rackspace Hosting +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. You may obtain +# a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. + +import pbr.version + + +__version__ = pbr.version.VersionInfo( + 'python-mistralclient').version_string() diff --git a/mistralclient/tests/test_cli_executions.py b/mistralclient/tests/test_cli_executions.py index 529bcedb..e99add6f 100644 --- a/mistralclient/tests/test_cli_executions.py +++ b/mistralclient/tests/test_cli_executions.py @@ -21,7 +21,6 @@ import mock from mistralclient.tests import base from mistralclient.commands import executions from mistralclient.api.executions import Execution -from mistralclient import version EXECUTION = Execution(mock, { 'id': '123', @@ -44,7 +43,7 @@ class TestCLIExecutions(base.BaseCommandTest): @mock.patch('mistralclient.api.executions.ExecutionManager.create') def test_create_ctx_file(self, mock): mock.return_value = EXECUTION - path = pkg.resource_filename(version.version_info.package, + path = pkg.resource_filename('mistralclient', 'tests/resources/ctx.json') result = self.call(executions.Create, app_args=['name', 'id', path]) diff --git a/mistralclient/version.py b/mistralclient/version.py deleted file mode 100644 index 1f23e988..00000000 --- a/mistralclient/version.py +++ /dev/null @@ -1,20 +0,0 @@ -# -*- coding: utf-8 -*- -# -# Copyright 2013 - Mirantis, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -from pbr import version - -version_info = version.VersionInfo('mistralclient') -version_string = version_info.version_string