python-os-win/python-os-win.spec

125 lines
3.9 KiB
RPMSpec
Raw Normal View History

2021-07-23 11:40:21 +08:00
%global _empty_manifest_terminate_build 0
2021-01-27 10:39:24 +08:00
Name: python-os-win
2021-07-23 11:40:21 +08:00
Version: 5.4.0
2021-08-03 01:07:38 +00:00
Release: 2
2021-07-23 11:40:21 +08:00
Summary: Windows / Hyper-V library for OpenStack projects.
2021-01-27 10:39:24 +08:00
License: Apache-2.0
2021-01-06 09:56:28 +08:00
URL: http://www.cloudbase.it/
2021-07-23 11:40:21 +08:00
Source0: https://files.pythonhosted.org/packages/00/5c/bf5faff804f71f01a99396b0fc35a6c0ec0b5af72c7975753121c3b8379f/os-win-5.4.0.tar.gz
2021-01-06 09:56:28 +08:00
BuildArch: noarch
%description
2021-01-27 10:39:24 +08:00
This library contains Windows / Hyper-V code commonly used in the OpenStack \
2021-07-23 11:40:21 +08:00
projects: nova, cinder, networking-hyperv. The library can be used in any \
other OpenStack projects where it is needed.
2021-01-06 09:56:28 +08:00
2021-01-27 10:39:24 +08:00
%package -n python3-os-win
2021-07-23 11:40:21 +08:00
Summary: Windows / Hyper-V library for OpenStack projects.
Provides: python-os-win
# Base build requires
2021-01-06 09:56:28 +08:00
BuildRequires: python3-devel
2021-07-23 11:40:21 +08:00
BuildRequires: python3-setuptools
2021-01-06 09:56:28 +08:00
BuildRequires: python3-pbr
BuildRequires: python3-pip
2021-07-23 11:40:21 +08:00
BuildRequires: python3-wheel
# General requires
BuildRequires: python3-eventlet
BuildRequires: python3-oslo-concurrency
BuildRequires: python3-oslo-config
BuildRequires: python3-oslo-i18n
BuildRequires: python3-oslo-log
BuildRequires: python3-oslo-utils
BuildRequires: python3-stestr
BuildRequires: python3-ddt
BuildRequires: python3-oslotest
BuildRequires: python3-pycodestyle
BuildRequires: python3-hacking
BuildRequires: python3-testscenarios
BuildRequires: python3-testtools
BuildRequires: python3-coverage
# General requires
Requires: python3-eventlet
Requires: python3-oslo-concurrency
Requires: python3-oslo-config
Requires: python3-oslo-i18n
Requires: python3-oslo-log
Requires: python3-oslo-utils
Requires: python3-pbr
# Test requires
Requires: python3-subunit
Requires: python3-oslotest
Requires: python3-os-testr
Requires: python3-testtools
Requires: python3-testrepository
Requires: python3-testscenarios
Requires: python3-stestr
2021-01-06 09:56:28 +08:00
2021-01-27 10:39:24 +08:00
%description -n python3-os-win
This library contains Windows / Hyper-V code commonly used in the OpenStack \
2021-07-23 11:40:21 +08:00
projects: nova, cinder, networking-hyperv. The library can be used in any \
other OpenStack projects where it is needed.
2021-01-06 09:56:28 +08:00
2021-07-23 11:40:21 +08:00
%package help
Summary: Windows / Hyper-V library for OpenStack projects.
Provides: python3-os-win-doc
%description help
This library contains Windows / Hyper-V code commonly used in the OpenStack \
projects: nova, cinder, networking-hyperv. The library can be used in any \
other OpenStack projects where it is needed.
2021-01-06 09:56:28 +08:00
%prep
2021-07-23 11:40:21 +08:00
%autosetup -n os-win-5.4.0
2021-01-06 09:56:28 +08:00
%build
2021-07-23 11:40:21 +08:00
%py3_build
2021-01-06 09:56:28 +08:00
%install
2021-07-23 11:40:21 +08:00
%py3_install
install -d -m755 %{buildroot}/%{_pkgdocdir}
if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi
if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi
if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi
if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi
pushd %{buildroot}
if [ -d usr/lib ]; then
find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst
fi
if [ -d usr/lib64 ]; then
find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst
fi
if [ -d usr/bin ]; then
find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst
fi
if [ -d usr/sbin ]; then
find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst
fi
touch doclist.lst
if [ -d usr/share/man ]; then
find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst
fi
popd
mv %{buildroot}/filelist.lst .
mv %{buildroot}/doclist.lst .
%check
export OS_TEST_PATH='./os_win/tests/unit'
export PATH=$PATH:$RPM_BUILD_ROOT/usr/bin
export PYTHONPATH=$PWD
PYTHON=%{__python3} stestr-3 --test-path $OS_TEST_PATH run
%files -n python3-os-win -f filelist.lst
%dir %{python3_sitelib}/*
%files help -f doclist.lst
%{_docdir}/*
2021-01-06 09:56:28 +08:00
%changelog
2021-08-03 01:07:38 +00:00
* Tue Aug 03 2021 wangxiyuan <wangxiyuan1007@gmail.com> - 5.4.0-2
- Drop wrong requires
2021-07-23 11:40:21 +08:00
* Fri Jul 23 2021 OpenStack_SIG <openstack@openeuler.org> - 5.4.0-1
- Update to 5.4.0
2021-01-06 09:56:28 +08:00
* Wed Jan 20 2021 zhangy1317 <zhangy1317@foxmail.com> 2021.1.20
- Update to 2021.1.20