Blob Blame History Raw
%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}

Name:		nwsclient
Summary: 	NetWorkSpaces Client for Python
Version:	1.6.3
Release:	2%{?dist}
License:	GPLv2+
Group:		Development/Tools
Source0:	http://downloads.sourceforge.net/nws-py/%{name}-%{version}.tar.gz
URL:		http://nws-py.sourceforge.net/
BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch:	noarch
BuildRequires:	python-devel, python-setuptools-devel

%description
NetWorkSpaces (NWS) is a powerful, open-source software package that makes it 
easy to use clusters from within scripting languages like Python, R, and 
Matlab. It uses a Space-based approach, similar to JavaSpaces (TM) for example,
that makes it easier to write distributed applications.

NetWorkSpaces for Python is the Python API to the NetWorkSpaces server. It 
allows different Python scripts to communicate and coordinate with each other, 
and (with some restrictions) with scripts written in other languages, such as
R and Matlab.  The restriction is that only strings can be passed between 
different languages. NetWorkSpaces doesn't provide a standard way to serialize 
objects between different languages, but by allowing strings to be used, 
programmers can choose their own mechanism (XML or YAML, for example).

%prep
%setup -q

%build
%{__python} -c 'import setuptools; execfile("setup.py")' build

%install
rm -rf %{buildroot}
NWS_MAN_DIR=%{_mandir}/man1 NWS_DOC_DIR=%{_datadir}/doc/%{name}-%{version} %{__python} -c 'import setuptools; execfile("setup.py")' install --skip-build --root %{buildroot}
cp -a PKG-INFO %{buildroot}%{_datadir}/doc/%{name}-%{version}/

chmod -x %{buildroot}%{_datadir}/doc/%{name}-%{version}/examples/*

%clean
rm -rf %{buildroot}

%files
%defattr(-,root,root,-)
%doc %{_datadir}/doc/%{name}-%{version}/
%{_bindir}/*
%exclude %{_bindir}/PythonNWSSleighWorker.pyc
%exclude %{_bindir}/PythonNWSSleighWorker.pyo
%{python_sitelib}/nws/
%{python_sitelib}/%{name}-%{version}-py*.egg-info
%{_mandir}/man1/*

%changelog
* Thu Dec  4 2008 Tom "spot" Callaway <tcallawa@redhat.com> 1.6.3-2
- fix source0 url
- exclude the byte compiled binaries
- use setuptools to ensure egg-info

* Fri Oct 17 2008 Tom "spot" Callaway <tcallawa@redhat.com> 1.6.3-1
- initial version for Fedora