From d302ca306a7fb5b04a70dafb0a55555ec8ba3412 Mon Sep 17 00:00:00 2001 From: "Ian H. Pittwood" Date: Tue, 11 Jun 2019 16:14:32 -0500 Subject: [PATCH] Implement PBR for XLS plugin Spyglass uses PBR for its packaging so it makes sense that its plugins would do the same. This change makes the necessary updates to have spyglass-plugin-xls use python build reasonableness. Implements PBR in setup.py and setup.cfg Moves YAPF configuration into setup.cfg Change-Id: Ie0dab14bc266a0000566995c8fb2f9640fce7868 --- .style.yapf | 6 ------ requirements.txt | 2 +- setup.cfg | 32 ++++++++++++++++++++++++++++++++ setup.py | 23 ++--------------------- 4 files changed, 35 insertions(+), 28 deletions(-) delete mode 100644 .style.yapf create mode 100644 setup.cfg diff --git a/.style.yapf b/.style.yapf deleted file mode 100644 index 7dca927..0000000 --- a/.style.yapf +++ /dev/null @@ -1,6 +0,0 @@ -[style] -based_on_style = pep8 -allow_split_before_dict_value = false -blank_line_before_nested_class_or_def = true -blank_line_before_module_docstring = true -split_before_logical_operator = false diff --git a/requirements.txt b/requirements.txt index 5492042..7031be5 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,4 +2,4 @@ click==7.0 PyYAML==5.1.1 openpyxl==2.6.2 -git+https://opendev.org/airship/spyglass.git \ No newline at end of file +git+https://opendev.org/airship/spyglass.git#egg=spyglass \ No newline at end of file diff --git a/setup.cfg b/setup.cfg new file mode 100644 index 0000000..45677f6 --- /dev/null +++ b/setup.cfg @@ -0,0 +1,32 @@ +[metadata] +name = spyglass-plugin-xls +version = 0.0.1 +summary = Spyglass Excel data source plugin +description = Plugin to extract data for Spyglass from Excel spreadsheets +description-file = README.rst +author = The Airship Authors +author-email = airship-discuss@lists.airshipit.org +home-page = https://opendev.org/airship/spyglass-plugin-xls +license = Apache-2 +requires-python = >=3.5 +classifier = + Intended Audience :: Information Technology + Intended Audience :: System Administrators + License :: OSI Approved :: Apache Software License + Operating System :: POSIX :: Linux + Programming Language :: Python + Programming Language :: Python :: 3 + Programming Language :: Python :: 3.5 + Programming Language :: Python :: 3.6 + +[files] +packages = + spyglass_plugin_xls + +[yapf] +based_on_style = pep8 +allow_split_before_dict_value = false +blank_line_before_nested_class_or_def = true +blank_line_before_module_docstring = true +split_before_logical_operator = false +split_before_first_argument = true \ No newline at end of file diff --git a/setup.py b/setup.py index 26225af..bd650c7 100644 --- a/setup.py +++ b/setup.py @@ -11,25 +11,6 @@ # 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 setuptools -from setuptools import setup -from setuptools import find_packages - -setup( - name='spyglass_plugin_xls', - version='0.0.1', - description='Excel data source plugin for Spyglass', - url='https://opendev.org/airship/spyglass-plugin-xls', - python_requires='>=3.5.0', - license='Apache 2.0', - packages=find_packages(), - install_requires=[ - 'click==7.0', - 'PyYAML==5.1', - 'openpyxl==2.6.2', - ], - dependency_links=[ - 'git+https://opendev.org/airship/spyglass.git', - ], - include_package_data=True, -) +setuptools.setup(setup_requires=['pbr>=2.0.0'], pbr=True)