]>
Commit | Line | Data |
---|---|---|
f47042cd JR |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without python2 # CPython 2.x module | |
4 | %bcond_without python3 # CPython 3.x module | |
28de2195 | 5 | %bcond_with tests # tests (display required) |
f47042cd | 6 | |
cc8b386e | 7 | %define module PyOpenGL |
5e5b16b4 | 8 | Summary: OpenGL bindings for Python |
b0e7aa0f | 9 | Summary(pl.UTF-8): Dowiązania do OpenGL dla Pythona |
5e5b16b4 | 10 | Name: python-%{module} |
28de2195 | 11 | Version: 3.1.0 |
5ba71575 | 12 | Release: 4 |
0e091076 | 13 | Epoch: 1 |
28de2195 | 14 | License: BSD |
5e5b16b4 | 15 | Group: Development/Languages/Python |
28de2195 JB |
16 | #Source0Download: https://pypi.org/simple/pyopengl/ |
17 | Source0: https://files.pythonhosted.org/packages/source/p/pyopengl/%{module}-%{version}.tar.gz | |
18 | # Source0-md5: 0de021941018d46d91e5a8c11c071693 | |
19 | Source1: http://downloads.sourceforge.net/pyopengl/%{module}-Demo-3.0.1a1.tar.gz | |
cc8b386e | 20 | # Source1-md5: 75b66abdf2d0e5003798c0fa12abee6e |
5e5b16b4 | 21 | URL: http://pyopengl.sourceforge.net/ |
f47042cd | 22 | %if %{with python2} |
28de2195 JB |
23 | BuildRequires: python-devel >= 1:2.5 |
24 | BuildRequires: python-setuptools | |
25 | %if %{with tests} | |
26 | BuildRequires: python-numpy | |
27 | BuildRequires: python-pygame | |
28 | %endif | |
f47042cd JR |
29 | %endif |
30 | %if %{with python3} | |
28de2195 JB |
31 | BuildRequires: python3-devel >= 1:3.2 |
32 | BuildRequires: python3-setuptools | |
33 | %if %{with tests} | |
34 | BuildRequires: python3-numpy | |
35 | BuildRequires: python3-pygame | |
36 | %endif | |
f47042cd | 37 | %endif |
44b3a963 | 38 | BuildRequires: rpm-pythonprov |
28de2195 JB |
39 | BuildRequires: rpmbuild(macros) >= 1.714 |
40 | Requires: python-modules >= 1:2.5 | |
5ef1fb99 | 41 | Requires: python-numpy |
861d3682 | 42 | Obsoletes: PyOpenGL |
28de2195 | 43 | BuildArch: noarch |
9b5306c4 | 44 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
5e5b16b4 | 45 | |
5e5b16b4 AM |
46 | %description |
47 | OpenGL bindings for Python including support for GL extensions, GLU, | |
48 | WGL, GLUT, GLE, and Tk. | |
49 | ||
f64240f2 JR |
50 | %description -l pl.UTF-8 |
51 | Dowiązania do OpenGL dla Pythona wraz z rozszerzeniami GL, GLU, WGL, | |
58c3fba7 JB |
52 | GLUT, GLE i Tk. |
53 | ||
0c7b5aa8 AG |
54 | %package examples |
55 | Summary: Demos for PyOpenGL | |
56 | Summary(pl.UTF-8): Programy demonstracyjne dla pakietu PyOpenGL | |
57 | Group: Development/Languages/Python | |
fe6972ac | 58 | Requires: %{name} = %{epoch}:%{version}-%{release} |
0c7b5aa8 AG |
59 | |
60 | %description examples | |
61 | Demos for PyOpenGL. | |
62 | ||
63 | %description examples -l pl.UTF-8 | |
64 | Programy demonstracyjne dla pakietu PyOpenGL. | |
65 | ||
f47042cd JR |
66 | %package -n python3-%{module} |
67 | Summary: OpenGL bindings for Python | |
68 | Summary(pl.UTF-8): Dowiązania do OpenGL dla Pythona | |
69 | Group: Libraries/Python | |
28de2195 | 70 | Requires: python3-modules >= 1:3.2 |
f47042cd JR |
71 | Requires: python3-numpy |
72 | ||
73 | %description -n python3-%{module} | |
74 | OpenGL bindings for Python including support for GL extensions, GLU, | |
75 | WGL, GLUT, GLE, and Tk. | |
76 | ||
77 | %description -n python3-%{module} -l pl.UTF-8 | |
78 | Dowiązania do OpenGL dla Pythona wraz z rozszerzeniami GL, GLU, WGL, | |
79 | GLUT, GLE i Tk. | |
80 | ||
81 | %package -n python3-%{module}-examples | |
82 | Summary: Demos for PyOpenGL | |
83 | Summary(pl.UTF-8): Programy demonstracyjne dla pakietu PyOpenGL | |
84 | Group: Development/Languages/Python | |
85 | Requires: python3-%{module} = %{epoch}:%{version}-%{release} | |
86 | ||
87 | %description -n python3-%{module}-examples | |
88 | Demos for PyOpenGL. | |
89 | ||
90 | %description -n python3-%{module}-examples -l pl.UTF-8 | |
91 | Programy demonstracyjne dla pakietu PyOpenGL. | |
92 | ||
5e5b16b4 | 93 | %prep |
06d1bbff | 94 | %setup -q -n %{module}-%{version} -a 1 |
5e5b16b4 AM |
95 | |
96 | %build | |
f47042cd | 97 | %if %{with python2} |
87c537d3 | 98 | %py_build |
f47042cd | 99 | |
28de2195 | 100 | cd %{module}-Demo-3.0.1a1 |
87c537d3 | 101 | %py_build |
f47042cd | 102 | cd .. |
28de2195 JB |
103 | |
104 | %if %{with tests} | |
105 | cd tests | |
106 | %{__python} test_core.py | |
107 | cd .. | |
108 | %endif | |
f47042cd JR |
109 | %endif |
110 | ||
111 | %if %{with python3} | |
87c537d3 | 112 | %py3_build |
06d1bbff | 113 | |
28de2195 JB |
114 | cd %{module}-Demo-3.0.1a1 |
115 | %py3_build | |
116 | cd .. | |
117 | ||
118 | %if %{with tests} | |
119 | cd tests | |
120 | %{__python3} test_core.py | |
121 | cd .. | |
122 | %endif | |
f47042cd | 123 | %endif |
5e5b16b4 AM |
124 | |
125 | %install | |
126 | rm -rf $RPM_BUILD_ROOT | |
127 | ||
f47042cd | 128 | %if %{with python2} |
87c537d3 | 129 | %py_install |
06d1bbff | 130 | |
28de2195 | 131 | cd %{module}-Demo-3.0.1a1 |
87c537d3 | 132 | %py_install |
f47042cd | 133 | cd .. |
5e5b16b4 | 134 | |
58c3fba7 | 135 | %py_postclean |
f47042cd JR |
136 | %endif |
137 | ||
138 | %if %{with python3} | |
87c537d3 | 139 | %py3_install |
f47042cd | 140 | |
28de2195 | 141 | cd %{module}-Demo-3.0.1a1 |
87c537d3 | 142 | %py3_install |
28de2195 | 143 | cd .. |
f47042cd | 144 | %endif |
0c7b5aa8 | 145 | |
5e5b16b4 AM |
146 | %clean |
147 | rm -rf $RPM_BUILD_ROOT | |
148 | ||
f47042cd | 149 | %if %{with python2} |
5e5b16b4 AM |
150 | %files |
151 | %defattr(644,root,root,755) | |
28de2195 | 152 | %doc license.txt |
06d1bbff | 153 | %{py_sitescriptdir}/OpenGL |
28de2195 | 154 | %{py_sitescriptdir}/PyOpenGL-%{version}-py*.egg-info |
0c7b5aa8 AG |
155 | |
156 | %files examples | |
157 | %defattr(644,root,root,755) | |
06d1bbff | 158 | %{py_sitescriptdir}/PyOpenGL-Demo |
28de2195 | 159 | %{py_sitescriptdir}/PyOpenGL_Demo-3.0.1a1-py*.egg-info |
f47042cd JR |
160 | %endif |
161 | ||
162 | %if %{with python3} | |
163 | %files -n python3-%{module} | |
164 | %defattr(644,root,root,755) | |
28de2195 | 165 | %doc license.txt |
f47042cd | 166 | %{py3_sitescriptdir}/OpenGL |
28de2195 | 167 | %{py3_sitescriptdir}/PyOpenGL-%{version}-py*.egg-info |
f47042cd JR |
168 | |
169 | %files -n python3-%{module}-examples | |
170 | %defattr(644,root,root,755) | |
171 | %{py3_sitescriptdir}/PyOpenGL-Demo | |
28de2195 | 172 | %{py3_sitescriptdir}/PyOpenGL_Demo-3.0.1a1-py*.egg-info |
f47042cd | 173 | %endif |