diff --git a/README.en.md b/README.en.md new file mode 100644 index 0000000000000000000000000000000000000000..cfc2551478a9ac260a12fc87f21e321219f87920 --- /dev/null +++ b/README.en.md @@ -0,0 +1,36 @@ +# libvirt-python + +#### Description +The libvirt virtualization API python2 binding. + +#### Software Architecture +Software architecture description + +#### Installation + +1. xxxx +2. xxxx +3. xxxx + +#### Instructions + +1. xxxx +2. xxxx +3. xxxx + +#### Contribution + +1. Fork the repository +2. Create Feat_xxx branch +3. Commit your code +4. Create Pull Request + + +#### Gitee Feature + +1. You can use Readme\_XXX.md to support different languages, such as Readme\_en.md, Readme\_zh.md +2. Gitee blog [blog.gitee.com](https://blog.gitee.com) +3. Explore open source project [https://gitee.com/explore](https://gitee.com/explore) +4. The most valuable open source project [GVP](https://gitee.com/gvp) +5. The manual of Gitee [https://gitee.com/help](https://gitee.com/help) +6. The most popular members [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/) diff --git a/README.md b/README.md new file mode 100644 index 0000000000000000000000000000000000000000..0c697569b182d6f7e12c751649eec9dda2e8dcd4 --- /dev/null +++ b/README.md @@ -0,0 +1,37 @@ +# libvirt-python + +#### 介绍 +The libvirt virtualization API python2 binding. + +#### 软件架构 +软件架构说明 + + +#### 安装教程 + +1. xxxx +2. xxxx +3. xxxx + +#### 使用说明 + +1. xxxx +2. xxxx +3. xxxx + +#### 参与贡献 + +1. Fork 本仓库 +2. 新建 Feat_xxx 分支 +3. 提交代码 +4. 新建 Pull Request + + +#### 码云特技 + +1. 使用 Readme\_XXX.md 来支持不同的语言,例如 Readme\_en.md, Readme\_zh.md +2. 码云官方博客 [blog.gitee.com](https://blog.gitee.com) +3. 你可以 [https://gitee.com/explore](https://gitee.com/explore) 这个地址来了解码云上的优秀开源项目 +4. [GVP](https://gitee.com/gvp) 全称是码云最有价值开源项目,是码云综合评定出的优秀开源项目 +5. 码云官方提供的使用手册 [https://gitee.com/help](https://gitee.com/help) +6. 码云封面人物是一档用来展示码云会员风采的栏目 [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/) diff --git a/libvirt-python-6.2.0.tar b/libvirt-python-6.2.0.tar new file mode 100644 index 0000000000000000000000000000000000000000..65d3ede722ffc68939f757adf920b8cc76c04f8d Binary files /dev/null and b/libvirt-python-6.2.0.tar differ diff --git a/libvirt-python-6.2.0.tar.gz b/libvirt-python-6.2.0.tar.gz deleted file mode 100644 index 3e9bcc8daf4fccfafc9dd015792dced3d189a634..0000000000000000000000000000000000000000 Binary files a/libvirt-python-6.2.0.tar.gz and /dev/null differ diff --git a/libvirt-python.spec b/libvirt-python.spec index aafbddbb35dfd1d35c247a490ae3d79165fb656a..f9bcedfdd7987efb5cf52b3c0af6f2f43c497691 100644 --- a/libvirt-python.spec +++ b/libvirt-python.spec @@ -1,20 +1,44 @@ -# -*- rpm-spec -*- +%define supported_platform 0 -Summary: The libvirt virtualization API python3 binding +%define _with_python2 1 +%define _with_python3 0 +%define py2_versioned_deps 1 + +%{!?with_python2: %define with_python2 %{_with_python2}} +%{!?with_python3: %define with_python3 %{_with_python3}} + +Summary: The libvirt virtualization API python2 binding Name: libvirt-python Version: 6.2.0 Release: 1 -Source0: http://libvirt.org/sources/python/%{name}-%{version}.tar.gz +Source0: libvirt-python-6.2.0.tar Url: http://libvirt.org License: LGPLv2+ BuildRequires: libvirt-devel == %{version} +%if %{with_python2} +%if %{py2_versioned_deps} +BuildRequires: python2-devel +BuildRequires: python2-nose +BuildRequires: python2-lxml +%else +BuildRequires: python-devel +BuildRequires: python-nose +BuildRequires: python-lxml +%endif +%endif +%if %{with_python3} BuildRequires: python3-devel BuildRequires: python3-nose BuildRequires: python3-lxml +%endif BuildRequires: gcc -# Don't want provides for python shared objects +%if %{with_python2} +%{?filter_provides_in: %filter_provides_in %{python2_sitearch}/.*\.so} +%endif +%if %{with_python3} %{?filter_provides_in: %filter_provides_in %{python3_sitearch}/.*\.so} +%endif %{?filter_setup} %description @@ -23,6 +47,23 @@ written in the Python programming language to use the interface supplied by the libvirt library to use the virtualization capabilities of recent versions of Linux (and other OSes). +%if %{with_python2} +%package -n python2-libvirt +Summary: The libvirt virtualization API python2 binding +Url: http://libvirt.org +License: LGPLv2+ +%{?python_provide:%python_provide python2-libvirt} +Provides: libvirt-python = %{version}-%{release} +Obsoletes: libvirt-python <= 3.6.0-1%{?dist} + +%description -n python2-libvirt +The python2-libvirt package contains a module that permits applications +written in the Python programming language to use the interface +supplied by the libvirt library to use the virtualization capabilities +of recent versions of Linux (and other OSes). +%endif + +%if %{with_python3} %package -n python3-libvirt Summary: The libvirt virtualization API python3 binding Url: http://libvirt.org @@ -33,30 +74,52 @@ Obsoletes: libvirt-python3 <= 3.6.0-1%{?dist} %description -n python3-libvirt The python3-libvirt package contains a module that permits applications -written in the Python 3.x programming language to use the interface +written in the Python programming language to use the interface supplied by the libvirt library to use the virtualization capabilities of recent versions of Linux (and other OSes). +%endif %prep %setup -q -# Unset execute bit for example scripts; it can introduce spurious -# RPM dependencies, like /usr/bin/python3 -# for the -python3 package find examples -type f -exec chmod 0644 \{\} \; %build +%if %{with_python2} +%py2_build +%endif +%if %{with_python3} %py3_build +%endif %install -%py3_install +%if %{with_python2} +%py2_install +%{__python2} setup.py install --skip-build --root=%{buildroot} +%endif +%if %{with_python3} +%{__python3} setup.py install --skip-build --root=%{buildroot} +%endif %check +%if %{with_python2} +%{__python2} setup.py test +%endif +%if %{with_python3} %{__python3} setup.py test +%endif + +%if %{with_python2} +%files -n python2-libvirt +%{python2_sitearch}/libvirt.py* +%{python2_sitearch}/libvirt_qemu.py* +%{python2_sitearch}/libvirt_lxc.py* +%{python2_sitearch}/libvirtmod* +%{python2_sitearch}/*egg-info +%endif +%if %{with_python3} %files -n python3-libvirt -%defattr(-,root,root) -%doc ChangeLog AUTHORS NEWS README COPYING COPYING.LESSER examples/ %{python3_sitearch}/libvirt.py* %{python3_sitearch}/libvirtaio.py* %{python3_sitearch}/libvirt_qemu.py* @@ -67,9 +130,8 @@ find examples -type f -exec chmod 0644 \{\} \; %{python3_sitearch}/__pycache__/libvirtaio.cpython-*.py* %{python3_sitearch}/libvirtmod* %{python3_sitearch}/*egg-info +%endif %changelog -* Wed Apr 15 2020 Xu Yandong - 6.2.0-1 -- Rebase to version 6.2.0. -* Fri Jul 19 2019 openEuler Buildteam - 5.5.0-1 -- Update to 5.5.0 release, Initial package for openEuler. +* Mon May 24 2021 openstack-sig +- Package Spec generated