Files
python-pywbem/python-pywbem.spec

95 lines
2.7 KiB
RPMSpec

#
# spec file for package python-pywbem
#
# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
# norootforbuild
Name: python-pywbem
BuildRequires: python-devel
BuildRequires: python-setuptools
BuildRequires: python-pip
BuildRequires: python-ply
%if 0%{?suse_version}
BuildRequires: python-xml
%if 0%{?suse_version} < 1200
BuildRequires: python-m2crypto
%else
BuildRequires: python-M2Crypto
%endif
%else
BuildRequires: m2crypto
%endif
Version: 0.10.0
Release: 4
Group: System/Management
Summary: Python module for making CIM operation calls using the WBEM protocol
License: LGPL-2.1
Url: http://pywbem.github.io/
Source0: pywbem-%{version}.tar.gz
# upstream compatibility
Provides: pywbem = %{version}
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%if 0%{?suse_version}
Requires: python-xml
%if 0%{?suse_version} < 1200
Requires: python-m2crypto
%else
Requires: python-M2Crypto
%endif
%else
Requires: m2crypto
%endif
Requires: python-PyYAML
%{!?py_sitedir: %global py_sitedir %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
%{!?py_sitearch: %global py_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
%{!?py_requires: %define py_requires Requires: python}
%{py_requires}
%description
PyWBEM is a Python module for making CIM operation calls using the WBEM
protocol to query and update managed objects.
%prep
%setup -q -n pywbem-%{version}
%build
python setup.py build
%install
python setup.py install --prefix=%{_prefix} \
--root $RPM_BUILD_ROOT \
--install-purelib=%{py_sitedir}
# don't clash with sblim-wbemcli
mv $RPM_BUILD_ROOT/usr/bin/wbemcli $RPM_BUILD_ROOT/usr/bin/pywbemcli
# END OF INSTALL
rm -f $RPM_BUILD_ROOT/usr/bin/*.bat
%files
%defattr(-,root,root,-)
%dir %{py_sitedir}/pywbem
%{py_sitedir}/pywbem-*.egg-info
%{py_sitedir}/pywbem/*
%{_bindir}/pywbemcli
%{_bindir}/wbemcli.py
%{_bindir}/mof_compiler
%doc README.md pywbem/LICENSE.txt