From ee397c9d861c67755e8148bf5c09dc4d80426160 Mon Sep 17 00:00:00 2001 From: Liam Young Date: Fri, 31 Jul 2020 08:13:24 +0000 Subject: [PATCH 1/3] Add setuptools config --- setup.cfg | 18 ++++++++++++++++++ setup.py | 38 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 56 insertions(+) create mode 100644 setup.cfg create mode 100644 setup.py diff --git a/setup.cfg b/setup.cfg new file mode 100644 index 0000000..c63824e --- /dev/null +++ b/setup.cfg @@ -0,0 +1,18 @@ +[metadata] +name = ops_openstack +summary = Common Library for Openstack charms using Ops framework. +version = 0.0.1.dev1 +description-file = + README.rst +author = OpenStack Charmers +author-email = openstack-charmers@lists.ubuntu.com +url = https://github.com/openstack-charmers/ops-openstack +classifier = + Development Status :: 2 - Pre-Alpha + Intended Audience :: Developers + Topic :: System + Topic :: System :: Installation/Setup + opic :: System :: Software Distribution + Programming Language :: Python :: 3 + Programming Language :: Python :: 3.5 + License :: OSI Approved :: Apache Software License diff --git a/setup.py b/setup.py new file mode 100644 index 0000000..876a7aa --- /dev/null +++ b/setup.py @@ -0,0 +1,38 @@ +# -*- coding: utf-8 -*- + +# Copyright 2020 Canonical Ltd. +# +# 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. + +"""Module used to setup the interface_ceph_client framework.""" + +from __future__ import print_function + +from setuptools import setup, find_packages + +version = "0.0.1.dev1" +install_require = [ + 'charmhelpers', + 'ops', +] + +tests_require = [ + 'tox >= 2.3.1', +] + +setup( + license='Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0', + packages=find_packages(exclude=["unit_tests"]), + zip_safe=False, + install_requires=install_require, +) From cb2d095aeae0f4c852cf59f9efb7be4f103687a6 Mon Sep 17 00:00:00 2001 From: Liam Young Date: Fri, 31 Jul 2020 10:41:58 +0000 Subject: [PATCH 2/3] More setuptool fixes --- ops_openstack/__init__.py | 0 adapters.py => ops_openstack/adapters.py | 0 ops_openstack.py => ops_openstack/ops_openstack.py | 0 3 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 ops_openstack/__init__.py rename adapters.py => ops_openstack/adapters.py (100%) rename ops_openstack.py => ops_openstack/ops_openstack.py (100%) diff --git a/ops_openstack/__init__.py b/ops_openstack/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/adapters.py b/ops_openstack/adapters.py similarity index 100% rename from adapters.py rename to ops_openstack/adapters.py diff --git a/ops_openstack.py b/ops_openstack/ops_openstack.py similarity index 100% rename from ops_openstack.py rename to ops_openstack/ops_openstack.py From 04b6edb48016dd65510d23d2aadaa8127888049a Mon Sep 17 00:00:00 2001 From: Liam Young Date: Fri, 31 Jul 2020 13:46:38 +0000 Subject: [PATCH 3/3] Fix unit tests --- ops_openstack/{ops_openstack.py => core.py} | 0 unit_tests/test_ops_openstack.py | 6 +++--- 2 files changed, 3 insertions(+), 3 deletions(-) rename ops_openstack/{ops_openstack.py => core.py} (100%) diff --git a/ops_openstack/ops_openstack.py b/ops_openstack/core.py similarity index 100% rename from ops_openstack/ops_openstack.py rename to ops_openstack/core.py diff --git a/unit_tests/test_ops_openstack.py b/unit_tests/test_ops_openstack.py index 252166e..f23cd4d 100644 --- a/unit_tests/test_ops_openstack.py +++ b/unit_tests/test_ops_openstack.py @@ -26,10 +26,10 @@ from ops.model import ( WaitingStatus, ) -import ops_openstack +import ops_openstack.core -class OpenStackTestAPICharm(ops_openstack.OSBaseCharm): +class OpenStackTestAPICharm(ops_openstack.core.OSBaseCharm): PACKAGES = ['keystone-common'] REQUIRED_RELATIONS = ['shared-db'] @@ -75,7 +75,7 @@ class TestOSBaseCharm(CharmTestCase): 'os_utils'] def setUp(self): - super().setUp(ops_openstack, self.PATCHES) + super().setUp(ops_openstack.core, self.PATCHES) self.os_utils.manage_payload_services = MagicMock() self.harness = Harness( OpenStackTestAPICharm,