2019-12-06 18:05:55 +08:00
|
|
|
%global py2_build_dir %{_builddir}/%{name}-%{version}-%{release}-python2
|
|
|
|
|
%bcond_with python2
|
2019-12-16 17:49:24 +08:00
|
|
|
%global __requires_exclude ^.*python[2|3]*.7dist\\(.*\\).*$
|
2019-12-06 18:05:55 +08:00
|
|
|
|
|
|
|
|
Name: pywbem
|
|
|
|
|
Version: 0.12.4
|
2019-12-16 17:49:24 +08:00
|
|
|
Release: 4
|
2019-12-06 18:05:55 +08:00
|
|
|
Summary: WBEM client and WBEM indication listener
|
|
|
|
|
License: LGPLv2
|
|
|
|
|
URL: https://github.com/pywbem/pywbem
|
2020-01-10 14:59:21 +08:00
|
|
|
Source0: https://github.com/pywbem/pywbem/archive/%{version}.tar.gz
|
2019-12-06 18:05:55 +08:00
|
|
|
|
|
|
|
|
%if %{with python2}
|
|
|
|
|
BuildRequires: python2-pip python2-pbr python2-pyyaml python2-ply python2-rpm-macros python2-devel
|
|
|
|
|
%endif
|
|
|
|
|
BuildRequires: python3-pip python3-PyYAML python3-ply python3-rpm-macros python3-pbr python3-devel git
|
|
|
|
|
BuildArch: noarch
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%description
|
|
|
|
|
A WBEM client allows issuing operations to a WBEM server, using the CIM (Common
|
|
|
|
|
Information Model) operations over HTTP (CIM-XML) protocol defined in the DMTF
|
|
|
|
|
standards DSP0200 and DSP0201. The CIM/WBEM infrastructure is used for a wide
|
|
|
|
|
variety of systems management tasks supported by systems running WBEM servers.
|
|
|
|
|
A WBEM indication listener allows receiving indications generated by a WBEM server.
|
|
|
|
|
|
|
|
|
|
%if %{with python2}
|
|
|
|
|
%package -n python2-pywbem
|
|
|
|
|
Summary: Python2 WBEM client and WBEM indication listener
|
|
|
|
|
Requires: m2crypto python2-pyyaml python2-six python2-ply python2-mock python2-pbr
|
|
|
|
|
Provides: pywbem = %{version}-%{release}
|
|
|
|
|
Obsoletes: pywbem < %{version}-%{release}
|
|
|
|
|
%{?python_provide:%python_provide python2-pywbem}
|
|
|
|
|
|
|
|
|
|
%description -n python2-pywbem
|
|
|
|
|
A WBEM client allows issuing operations to a WBEM server, using the CIM (Common
|
|
|
|
|
Information Model) operations over HTTP (CIM-XML) protocol defined in the DMTF
|
|
|
|
|
standards DSP0200 and DSP0201. The CIM/WBEM infrastructure is used for a wide
|
|
|
|
|
variety of systems management tasks supported by systems running WBEM servers.
|
|
|
|
|
A WBEM indication listener allows receiving indications generated by a WBEM server.
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%package -n python3-pywbem
|
|
|
|
|
Summary: Python3 WBEM client and WBEM indication listenex
|
|
|
|
|
Requires: python3-PyYAML python3-six python3-ply python3-mock python3-pbr
|
|
|
|
|
BuildArch: noarch
|
|
|
|
|
|
|
|
|
|
%description -n python3-pywbem
|
|
|
|
|
A WBEM client allows issuing operations to a WBEM server, using the CIM (Common
|
|
|
|
|
Information Model) operations over HTTP (CIM-XML) protocol defined in the DMTF
|
|
|
|
|
standards DSP0200 and DSP0201. The CIM/WBEM infrastructure is used for a wide
|
|
|
|
|
variety of systems management tasks supported by systems running WBEM servers.
|
|
|
|
|
A WBEM indication listener allows receiving indications generated by a WBEM server.
|
|
|
|
|
|
|
|
|
|
%if %{with python2}
|
|
|
|
|
%package twisted
|
|
|
|
|
Summary: Python2 WBEM client bindings for Twisted Python
|
|
|
|
|
Requires: python2-twisted %{name} = %{version}-%{release}
|
|
|
|
|
BuildArch: noarch
|
|
|
|
|
|
|
|
|
|
%description twisted
|
|
|
|
|
Twisted is an event-driven networking engine written in Python and licensed under
|
|
|
|
|
the open source MIT license.
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%prep
|
|
|
|
|
%autosetup -n %{name}-%{version} -p1
|
|
|
|
|
|
|
|
|
|
%build
|
|
|
|
|
|
|
|
|
|
%if %{with python2}
|
|
|
|
|
cp -a . %{py2_build_dir}
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
PBR_VERSION="%{version}" CFLAGS="%{optflags}" %{__python3} setup.py build
|
|
|
|
|
|
|
|
|
|
%if %{with python2}
|
|
|
|
|
cd %{py2_build_dir}
|
|
|
|
|
PBR_VERSION="%{version}" CFLAGS="%{optflags}" %{__python2} setup.py build
|
|
|
|
|
cd -
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%install
|
|
|
|
|
%if %{with python2}
|
|
|
|
|
cd %{py2_build_dir}
|
|
|
|
|
env PYTHONPATH=%{buildroot}/%{python2_sitelib} PBR_VERSION="%{version}" \
|
|
|
|
|
%{__python2} setup.py install -O1 --skip-build --root %{buildroot}
|
|
|
|
|
install -m644 attic/twisted_client.py %{buildroot}/%{python2_sitelib}/pywbem/twisted_client.py
|
|
|
|
|
cd -
|
|
|
|
|
rm -rf %{buildroot}/usr/bin/
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
env PYTHONPATH=%{buildroot}/%{python3_sitelib} PBR_VERSION="%{version}" \
|
|
|
|
|
%{__python3} setup.py install -O1 --skip-build --root %{buildroot}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%if %{with python2}
|
|
|
|
|
%files -n python2-pywbem
|
|
|
|
|
%doc LICENSE.txt
|
|
|
|
|
%{python2_sitelib}/*.egg-info
|
|
|
|
|
%{python2_sitelib}/pywbem*
|
|
|
|
|
|
|
|
|
|
%files twisted
|
|
|
|
|
%{python2_sitelib}/pywbem/twisted_client.py*
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%files -n python3-pywbem
|
|
|
|
|
%{python3_sitelib}/*
|
|
|
|
|
%{_bindir}/*
|
|
|
|
|
%exclude /usr/bin/*.bat
|
|
|
|
|
%doc README.rst LICENSE.txt
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%changelog
|
2019-12-16 17:49:24 +08:00
|
|
|
* Mon Dec 16 2019 likexin<likexin4@huawei.com> - 0.12.4-4
|
|
|
|
|
- modify requires_exclude
|
|
|
|
|
|
2019-12-16 14:35:05 +08:00
|
|
|
* Mon Dec 16 2019 likexin<likexin4@huawei.com> - 0.12.4-3
|
|
|
|
|
- add requires_exclude python dist
|
|
|
|
|
|
2019-12-06 18:05:55 +08:00
|
|
|
* Thu Nov 28 2019 likexin<likexin4@huawei.com> - 0.12.4-2
|
|
|
|
|
- Package init
|