From c38e16bd8b7adcb9898a675753f365bd94cab6a8 Mon Sep 17 00:00:00 2001 From: Al Bailey Date: Thu, 29 Jun 2023 17:20:49 +0000 Subject: [PATCH] Package the pecan templates with the code The pecan xml template files are used by the API to format the results of certain operations in certain response modes. Those xml files are now included in the setuptools packaging and are included in the debian files. This change also moves all the package configuration into the setup.cfg file. PBR conflicts with the package_data definitions in the setup files so pbr is no longer used for versioning. Test Plan: PASS Bootstrap AIO-SX and verify files are included Story: 2010676 Task: 48400 Signed-off-by: Al Bailey Change-Id: Ibcea8d6f4da8b089b4b59c9c2ca96a988be0795f --- software/setup.cfg | 28 +++++++++++++++++++--------- software/setup.py | 6 ++---- software/software/__init__.py | 2 ++ 3 files changed, 23 insertions(+), 13 deletions(-) diff --git a/software/setup.cfg b/software/setup.cfg index 9f18743f..ab153c8b 100644 --- a/software/setup.cfg +++ b/software/setup.cfg @@ -1,14 +1,13 @@ [metadata] name = software -summary = A Project Gating System -description_file = - README.rst +version = attr: software.VERSION +summary = Unified Software Management +description = file: README.rst author = StarlingX Team author_email = starlingx-discuss@lists.starlingx.io home_page = https://www.starlingx.io/ -python_requires = >=3.9 license_files = LICENSE -classifier = +classifiers = Environment :: OpenStack Intended Audience :: Information Technology Intended Audience :: System Administrators @@ -18,15 +17,26 @@ classifier = Programming Language :: Python :: 3 Programming Language :: Python :: 3.9 -[files] -packages = - software +[options] +packages = find: +python_requires = >=3.9 +install_requires = + pycryptodomex -[entry_points] +[options.packages.find] +exclude = + software.tests* + +[options.package_data] +* = + templates/* + +[options.entry_points] console_scripts = software = software.software_client:main software-controller-daemon = software.software_controller:main software-agent = software.software_agent:main + [wheel] universal = 1 diff --git a/software/setup.py b/software/setup.py index 4729f4d8..4e042b36 100644 --- a/software/setup.py +++ b/software/setup.py @@ -5,7 +5,5 @@ # import setuptools -setuptools.setup( - setup_requires=['pbr'], - pbr=True -) +setuptools.setup() + diff --git a/software/software/__init__.py b/software/software/__init__.py index e69de29b..3bf7dae5 100644 --- a/software/software/__init__.py +++ b/software/software/__init__.py @@ -0,0 +1,2 @@ +# The version of this component +VERSION = 1.0