python-pywbem/python-pywbem.spec

60 lines
1.9 KiB
RPMSpec

#
# spec file for package python-pywbem
#
# Copyright (c) 2013 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/
#
Name: python-pywbem
BuildRequires: python-devel
BuildRequires: python-xml
Version: 0.7.0
Release: 0
Summary: Python module for making CIM operation calls using the WBEM protocol
License: LGPL-2.1+
Group: System/Management
Url: http://pywbem.sf.net/
Source0: pywbem-%{version}.tar.gz
Requires: python-xml
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%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
ln -s . pywbem
python setup.py build
%install
python setup.py install --prefix=%{_prefix} --root=%{buildroot}
#NOTE(saschpe): Definitely ugly but symlinking those binaries is the easiest way, thus
chmod +x %{buildroot}%{python_sitelib}/pywbem/{wbemcli,mof_compiler}.py
install -d %{buildroot}/usr/bin
ln -s %{python_sitelib}/pywbem/mof_compiler.py %{buildroot}/usr/bin/mofcomp
ln -s %{python_sitelib}/pywbem/wbemcli.py %{buildroot}/usr/bin/pywbemcli
%files
%defattr(-,root,root,-)
%doc README
%{_bindir}/mofcomp
%{_bindir}/pywbemcli
%{python_sitelib}/pywbem-%{version}-py%{py_ver}.egg-info
%{python_sitelib}/pywbem
%changelog