-
-
Notifications
You must be signed in to change notification settings - Fork 140
/
python3-pycuda.spec
156 lines (119 loc) · 4.77 KB
/
python3-pycuda.spec
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
# This file is part of Xpra.
# Copyright (C) 2014-2021 Antoine Martin <antoine@xpra.org>
# Xpra is released under the terms of the GNU GPL v2, or, at your option, any
# later version. See the file COPYING for details.
#we don't want to depend on libcuda via RPM dependencies
#so that we can install NVidia drivers without using RPM packages:
%define __requires_exclude ^libcuda.*$
%define _disable_source_fetch 0
%global debug_package %{nil}
%define STUBS_DIR targets/x86_64-linux/lib/stubs/
%ifarch aarch64
%define STUBS_DIR targets/sbsa-linux/lib/stubs/
%endif
Name: python3-pycuda
Version: 2021.1
Release: 1
URL: http://mathema.tician.de/software/pycuda
Summary: Python3 wrapper CUDA
License: MIT
Group: Development/Libraries/Python
Source0: https://files.pythonhosted.org/packages/5a/56/4682a5118a234d15aa1c8768a528aac4858c7b04d2674e18d586d3dfda04/pycuda-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Provides: python3-pycuda
BuildRequires: make
BuildRequires: gcc-c++
BuildRequires: python3-devel
BuildRequires: python3-setuptools
BuildRequires: python3-numpy
BuildRequires: boost-python3-devel
BuildRequires: libglvnd-devel
BuildRequires: cuda
%description
PyCUDA lets you access Nvidia‘s CUDA parallel computation API from Python.
Requires: python3-decorator
Requires: python3-numpy
Requires: python3-pytools
Requires: python3-six
Suggests: nvidia-driver-cuda-libs
%prep
sha256=`sha256sum %{SOURCE0} | awk '{print $1}'`
if [ "${sha256}" != "ab87312d0fc349d9c17294a087bb9615cffcf966ad7b115f5b051008a48dd6ed" ]; then
echo "invalid checksum for %{SOURCE0}"
exit 1
fi
%setup -q -n pycuda-%{version}
%build
CUDA=/opt/cuda
%{__python3} ./configure.py \
--cuda-enable-gl \
--cuda-root=$CUDA \
--cudadrv-lib-dir=%{_libdir} \
--boost-inc-dir=%{_includedir} \
--boost-lib-dir=%{_libdir} \
--no-cuda-enable-curand
# --boost-python-libname=boost_python37
# --boost-thread-libname=boost_thread
LDFLAGS=-L$CUDA/%{STUBS_DIR} CXXFLAGS=-L$CUDA/%{STUBS_DIR} %{__python3} setup.py build
#make
%install
CUDA=/opt/cuda
LDFLAGS=-L$CUDA/%{STUBS_DIR} CXXFLAGS=-L$CUDA/%{STUBS_DIR} %{__python3} setup.py install --prefix=%{_prefix} --root=%{buildroot}
%clean
rm -rf %{buildroot}
%files
%defattr(-,root,root)
%doc examples/ test/
%{python3_sitearch}/pycuda*
%changelog
* Sun May 02 2021 Antoine Martin <antoine@xpra.org> - 2021.1-1
- new upstream release
* Wed Feb 17 2021 Antoine Martin <antoine@xpra.org> - 2020.1-3
- verify source checksum
* Thu Jan 07 2021 Antoine Martin <antoine@xpra.org> - 2020.1-2
- add weak dependency on the driver RPM which provides libcuda
* Wed Jan 06 2021 Antoine Martin <antoine@xpra.org> - 2020.1-1
- new upstream release
* Thu Sep 26 2019 Antoine Martin <antoine@xpra.org> - 2019.1.2-2
- build only for python3
* Wed Sep 25 2019 Antoine Martin <antoine@xpra.org> - 2019.1.2-1
- build for centos8
- new upstream release
* Mon May 20 2019 Antoine Martin <antoine@xpra.org> - 2019.1-1
- new upstream release
- remove patch which has been merged
* Sun Jan 13 2019 Antoine Martin <antoine@xpra.org> - 2018.1.1-3
- add patch for releasing the GIL during init and make_context
* Sun Jan 13 2019 Antoine Martin <antoine@xpra.org> - 2018.1.1-2
- add missing python six dependency
* Tue Sep 18 2018 Antoine Martin <antoine@xpra.org> - 2018.1.1-1
- new upstream release fixing Fedora 29 builds
* Thu Aug 02 2018 Antoine Martin <antoine@xpra.org> - 2018.1-1
- new upstream release
* Wed Aug 09 2017 Antoine Martin <antoine@xpra.org> - 2017.1.1-1
- new upstream release
* Tue Jul 18 2017 Antoine Martin <antoine@xpra.org> - 2017.1-2
- build python3 variant too
* Thu Jun 01 2017 Antoine Martin <antoine@xpra.org> - 2017.1-1
- new upstream release
* Sat Dec 24 2016 Antoine Martin <antoine@xpra.org> - 2016.1.2-2
- try harder to supersede the old package name
* Fri Jul 29 2016 Antoine Martin <antoine@xpra.org> - 2016.1.2-1
- new upstream release
* Sun Jul 17 2016 Antoine Martin <antoine@xpra.org> - 2016.1.1-1
- new upstream release
- rename and obsolete old python package name
* Fri Apr 01 2016 Antoine Martin <antoine@xpra.org> - 2016.1-1
- new upstream release
* Wed Nov 04 2015 Antoine Martin <antoine@xpra.org> - 2015.1.3-1
- new upstream release
* Wed Jul 01 2015 Antoine Martin <antoine@xpra.org> - 2015.1.2-1
- new upstream release
* Wed Jun 17 2015 Antoine Martin <antoine@xpra.org> - 2015.1-1
- new upstream release
* Sun Mar 29 2015 Antoine Martin <antoine@xpra.org> - 2014.1-3
- remove dependency on libcuda so the package can be installed without using the RPM drivers
* Fri Nov 07 2014 Antoine Martin <antoine@xpra.org> - 2014.1-2
- remove curand bindings which require libcurand found in full CUDA SDK
* Wed Sep 03 2014 Antoine Martin <antoine@xpra.org> - 2014.1-1
- initial packaging