diff options
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | python-pycuda.spec | 141 | ||||
-rw-r--r-- | sources | 1 |
3 files changed, 143 insertions, 0 deletions
@@ -0,0 +1 @@ +/pycuda-2022.2.2.tar.gz diff --git a/python-pycuda.spec b/python-pycuda.spec new file mode 100644 index 0000000..5fd590d --- /dev/null +++ b/python-pycuda.spec @@ -0,0 +1,141 @@ +%global _empty_manifest_terminate_build 0 +Name: python-pycuda +Version: 2022.2.2 +Release: 1 +Summary: Python wrapper for Nvidia CUDA +License: MIT +URL: http://mathema.tician.de/software/pycuda +Source0: https://mirrors.nju.edu.cn/pypi/web/packages/78/09/9df5358ffb74d225243b56a65ffe196de481fcd8f731f55e41f2d5d36015/pycuda-2022.2.2.tar.gz +BuildArch: noarch + + +%description +PyCUDA lets you access `Nvidia <https://nvidia.com>`_'s `CUDA +<https://nvidia.com/cuda/>`_ parallel computation API from Python. +Several wrappers of the CUDA API already exist-so what's so special +about PyCUDA? +* Object cleanup tied to lifetime of objects. This idiom, often + called + `RAII <https://en.wikipedia.org/wiki/Resource_Acquisition_Is_Initialization>`_ + in C++, makes it much easier to write correct, leak- and + crash-free code. PyCUDA knows about dependencies, too, so (for + example) it won't detach from a context before all memory + allocated in it is also freed. +* Convenience. Abstractions like pycuda.driver.SourceModule and + pycuda.gpuarray.GPUArray make CUDA programming even more + convenient than with Nvidia's C-based runtime. +* Completeness. PyCUDA puts the full power of CUDA's driver API at + your disposal, if you wish. It also includes code for + interoperability with OpenGL. +* Automatic Error Checking. All CUDA errors are automatically + translated into Python exceptions. +* Speed. PyCUDA's base layer is written in C++, so all the niceties + above are virtually free. +* Helpful `Documentation <https://documen.tician.de/pycuda>`_. +Relatedly, like-minded computing goodness for `OpenCL <https://www.khronos.org/registry/OpenCL/>`_ +is provided by PyCUDA's sister project `PyOpenCL <https://pypi.org/project/pyopencl>`_. + +%package -n python3-pycuda +Summary: Python wrapper for Nvidia CUDA +Provides: python-pycuda +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-pip +%description -n python3-pycuda +PyCUDA lets you access `Nvidia <https://nvidia.com>`_'s `CUDA +<https://nvidia.com/cuda/>`_ parallel computation API from Python. +Several wrappers of the CUDA API already exist-so what's so special +about PyCUDA? +* Object cleanup tied to lifetime of objects. This idiom, often + called + `RAII <https://en.wikipedia.org/wiki/Resource_Acquisition_Is_Initialization>`_ + in C++, makes it much easier to write correct, leak- and + crash-free code. PyCUDA knows about dependencies, too, so (for + example) it won't detach from a context before all memory + allocated in it is also freed. +* Convenience. Abstractions like pycuda.driver.SourceModule and + pycuda.gpuarray.GPUArray make CUDA programming even more + convenient than with Nvidia's C-based runtime. +* Completeness. PyCUDA puts the full power of CUDA's driver API at + your disposal, if you wish. It also includes code for + interoperability with OpenGL. +* Automatic Error Checking. All CUDA errors are automatically + translated into Python exceptions. +* Speed. PyCUDA's base layer is written in C++, so all the niceties + above are virtually free. +* Helpful `Documentation <https://documen.tician.de/pycuda>`_. +Relatedly, like-minded computing goodness for `OpenCL <https://www.khronos.org/registry/OpenCL/>`_ +is provided by PyCUDA's sister project `PyOpenCL <https://pypi.org/project/pyopencl>`_. + +%package help +Summary: Development documents and examples for pycuda +Provides: python3-pycuda-doc +%description help +PyCUDA lets you access `Nvidia <https://nvidia.com>`_'s `CUDA +<https://nvidia.com/cuda/>`_ parallel computation API from Python. +Several wrappers of the CUDA API already exist-so what's so special +about PyCUDA? +* Object cleanup tied to lifetime of objects. This idiom, often + called + `RAII <https://en.wikipedia.org/wiki/Resource_Acquisition_Is_Initialization>`_ + in C++, makes it much easier to write correct, leak- and + crash-free code. PyCUDA knows about dependencies, too, so (for + example) it won't detach from a context before all memory + allocated in it is also freed. +* Convenience. Abstractions like pycuda.driver.SourceModule and + pycuda.gpuarray.GPUArray make CUDA programming even more + convenient than with Nvidia's C-based runtime. +* Completeness. PyCUDA puts the full power of CUDA's driver API at + your disposal, if you wish. It also includes code for + interoperability with OpenGL. +* Automatic Error Checking. All CUDA errors are automatically + translated into Python exceptions. +* Speed. PyCUDA's base layer is written in C++, so all the niceties + above are virtually free. +* Helpful `Documentation <https://documen.tician.de/pycuda>`_. +Relatedly, like-minded computing goodness for `OpenCL <https://www.khronos.org/registry/OpenCL/>`_ +is provided by PyCUDA's sister project `PyOpenCL <https://pypi.org/project/pyopencl>`_. + +%prep +%autosetup -n pycuda-2022.2.2 + +%build +%py3_build + +%install +%py3_install +install -d -m755 %{buildroot}/%{_pkgdocdir} +if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi +if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi +if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi +if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi +pushd %{buildroot} +if [ -d usr/lib ]; then + find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/lib64 ]; then + find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/bin ]; then + find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/sbin ]; then + find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst +fi +touch doclist.lst +if [ -d usr/share/man ]; then + find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst +fi +popd +mv %{buildroot}/filelist.lst . +mv %{buildroot}/doclist.lst . + +%files -n python3-pycuda -f filelist.lst +%dir %{python3_sitelib}/* + +%files help -f doclist.lst +%{_docdir}/* + +%changelog +* Tue Apr 11 2023 Python_Bot <Python_Bot@openeuler.org> - 2022.2.2-1 +- Package Spec generated @@ -0,0 +1 @@ +df753e579ce0f3c67612b2cc65f467ab pycuda-2022.2.2.tar.gz |