!33 [sync] PR-25: add python package

From: @openeuler-sync-bot 
Reviewed-by: @qiangxiaojun 
Signed-off-by: @qiangxiaojun
This commit is contained in:
openeuler-ci-bot 2023-12-19 06:41:55 +00:00 committed by Gitee
commit 171f1f39c1
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -2,7 +2,7 @@
Name: xdiagnose
Version: 1.0.1
Release: 2
Release: 3
Summary: system diagnostic tool set
License: MulanPSL-2.0
@ -21,12 +21,15 @@ Xdiagnose is an OS troubleshooting tool that integrates functions such as analys
%setup -n %{name}-%{version}
%build
python3 src/python/setup.py build
pushd src/python
python3 setup.py build
popd
sh build/build.sh -b %{buildroot}/%{_bindir}
%install
python3 src/python/setup.py install --single-version-externally-managed -O1 --root=$RPM_BUILD_ROOT --record=INSTALLED_FILES
pushd src/python
python3 setup.py install --single-version-externally-managed -O1 --root=$RPM_BUILD_ROOT --record=INSTALLED_FILES
popd
sh build/build.sh -i %{buildroot}/%{_bindir}
mkdir -p %{buildroot}%{_sysconfdir}/x-diagnose
cp -a config/diag.conf %{buildroot}%{_sysconfdir}/x-diagnose
@ -36,7 +39,7 @@ cp -a config/sysinspect.conf %{buildroot}%{_sysconfdir}/x-diagnose
rm -rf $RPM_BUILD_ROOT
%files -f INSTALLED_FILES
%files -f src/python/INSTALLED_FILES
%defattr(-,root,root)
%config(noreplace) %{_sysconfdir}/x-diagnose/diag.conf
%config(noreplace) %{_sysconfdir}/x-diagnose/sysinspect.conf
@ -44,7 +47,11 @@ rm -rf $RPM_BUILD_ROOT
%changelog
* Wed June 12 2023 wangxiaogang<wangxiaogang3@huawei.com> - 1.0.1-3
- fix python pack error
* Wed June 7 2023 wangxiaogang<wangxiaogang3@huawei.com> - 1.0.1-2
- new framework
* Fri Dec 2 2022 lankstra<lankstra@163.com> - 1.0.1-1
- init version.