Files
oidc-auth-armada-app/python-k8sapp-oidc/centos/python-k8sapp-oidc.spec
Angie Wang f10e169367 Enable helm plugin delivery with the application
This creates a new package spec called python-k8sapp-oidc that will
build two packages: python-k8sapp-oidc and python-k8sapp-oidc-wheels.
These packages will hold all the stevedore plugins needed to support
the application.

These packages are included in the build dependencies for the
stx-oidc-auth-helm package build where the wheels file will
be included in the application tarball.

The helm plugins have been relocated to this repo and provided in
a k8sapp_oidc python module. This module will be extracted from the
wheels and installed on the platform via the sysinv application
framework. The module will be made available when the application
is enabled.

Now that the plugins and the application are residing in the same
repository, GITREVCOUNT will be used to drive the package version of
both to keep them in sync.

Tox test support has been provided for the plugin module.

Change-Id: Iead16c79aa1e3863d8568c9615f4215f2f6ec02b
Story: 2006537
Task: 39108
Depends-On: https://review.opendev.org/713969
Signed-off-by: Angie Wang <angie.wang@windriver.com>
Signed-off-by: Robert Church <robert.church@windriver.com>
2020-06-11 04:18:18 -04:00

62 lines
1.4 KiB
RPMSpec

%global app_name oidc-auth-apps
%global pypi_name k8sapp-oidc
%global sname k8sapp_oidc
Name: python-%{pypi_name}
Version: 1.0
Release: %{tis_patch_ver}%{?_tis_dist}
Summary: StarlingX sysinv extensions: OIDC authorization K8S app
License: Apache-2.0
Source0: %{name}-%{version}.tar.gz
BuildArch: noarch
BuildRequires: python-setuptools
BuildRequires: python-pbr
BuildRequires: python2-pip
BuildRequires: python2-wheel
%description
StarlingX sysinv extensions: OIDC authorization K8S app
%package -n python2-%{pypi_name}
Summary: StarlingX sysinv extensions: OIDC authorization K8S app
Requires: python-pbr >= 2.0.0
Requires: sysinv >= 1.0
%description -n python2-%{pypi_name}
StarlingX sysinv extensions: OIDC authorization K8S app
%prep
%setup
# Remove bundled egg-info
rm -rf %{pypi_name}.egg-info
%build
export PBR_VERSION=%{version}
%{__python2} setup.py build
%py2_build_wheel
%install
export PBR_VERSION=%{version}.%{tis_patch_ver}
export SKIP_PIP_INSTALL=1
%{__python2} setup.py install --skip-build --root %{buildroot}
mkdir -p ${RPM_BUILD_ROOT}/plugins/%{app_name}
install -m 644 dist/*.whl ${RPM_BUILD_ROOT}/plugins/%{app_name}/
%files
%{python2_sitelib}/%{sname}
%{python2_sitelib}/%{sname}-*.egg-info
%package wheels
Summary: %{name} wheels
%description wheels
Contains python wheels for %{name}
%files wheels
/plugins/*