File python-scikits-cuda.spec of Package python-scikits-cuda
#
# spec file for package python-scikits-cuda
#
# Copyright (c) 2012 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/
#
Summary: Python interface to various CUDA libraries
License: BSD-3-Clause
Group: Development/Libraries/Python
Name: python-scikits-cuda
Version: 0.042
Release: 0
Source0: scikits.cuda-%{version}.tar.xz
Source1: %{name}.rpmlintrc
Url: http://bionet.ee.columbia.edu/code/scikits.cuda.html
%if 0%{?suse_version} <= 1110
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
%else
BuildArch: noarch
%endif
Requires: python-decorator
Requires: python-py
Requires: python-pycuda
Requires: python-pytools
Requires: python-scipy
BuildRequires: fdupes
BuildRequires: gcc-c++
BuildRequires: nvidia-computeG02
BuildRequires: nvidia-cuda-toolkit-devel
BuildRequires: python-Pygments
BuildRequires: python-Sphinx
BuildRequires: python-devel
BuildRequires: python-distribute
BuildRequires: python-matplotlib
BuildRequires: python-numpy-devel
BuildRequires: python-pycuda
BuildRequires: python-scipy-devel
BuildRequires: xz
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
This SciKit (toolkit for SciPy) provides Python interfaces to a subset of the
functions in the CUDA, CUDART, CUBLAS, and CUFFT libraries distributed as part
of NVIDIA's CUDA Programming Toolkit, as well as interfaces to select functions
in the free-of-charge CULA Toolkit. In contrast to most existing Python wrappers
for these libraries (many of which only provide a low-level interface to the
actual library functions), this package uses PyCUDA to provide high-level functions
comparable to those in the NumPy package.
%prep
%setup -q -n scikits.cuda-%{version}
%build
python setup.py build
%install
python setup.py install --prefix=%{_prefix} --root=%{buildroot}
# remove unwanted file
rm %{buildroot}%{python_sitelib}/scikits/__init__.py
# Remove shebang
for f in `find %{buildroot}%{python_sitelib}/scikits -name '*.py'`; do
sed -i -e 1d ${f}
done
# find duplicates
%fdupes %{buildroot}%{python_sitelib}
# Fix python-bytecode-inconsistent-mtime
pushd %{buildroot}%{python_sitelib}/scikits
%py_compile .
popd
# Building the docs requires a working cuda and GPU installation
#export PYTHONPATH=%%{buildroot}%%{python_sitelib}
#make -C docs PAPER=letter html
%clean
rm -rf %{buildroot}
%files
%defattr(-,root,root)
%doc AUTHORS CHANGES LICENSE README.rst demos/
%dir %{python_sitelib}/scikits
%{python_sitelib}/scikits/cuda
%{python_sitelib}/scikits.cuda-%{version}-py%{py_ver}.egg-info
%{python_sitelib}/scikits.cuda-%{version}-py%{py_ver}-nspkg.pth
%changelog