]> git.pld-linux.org Git - packages/python-PyOpenGL.git/blob - python-PyOpenGL.spec
rebuild with python 3.10
[packages/python-PyOpenGL.git] / python-PyOpenGL.spec
1 #
2 # Conditional build:
3 %bcond_without  python2 # CPython 2.x module
4 %bcond_without  python3 # CPython 3.x module
5 %bcond_with     tests   # tests (display required)
6
7 %define         module          PyOpenGL
8 Summary:        OpenGL bindings for Python
9 Summary(pl.UTF-8):      Dowiązania do OpenGL dla Pythona
10 Name:           python-%{module}
11 Version:        3.1.0
12 Release:        4
13 Epoch:          1
14 License:        BSD
15 Group:          Development/Languages/Python
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
20 # Source1-md5:  75b66abdf2d0e5003798c0fa12abee6e
21 URL:            http://pyopengl.sourceforge.net/
22 %if %{with python2}
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
29 %endif
30 %if %{with python3}
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
37 %endif
38 BuildRequires:  rpm-pythonprov
39 BuildRequires:  rpmbuild(macros) >= 1.714
40 Requires:       python-modules >= 1:2.5
41 Requires:       python-numpy
42 Obsoletes:      PyOpenGL
43 BuildArch:      noarch
44 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
45
46 %description
47 OpenGL bindings for Python including support for GL extensions, GLU,
48 WGL, GLUT, GLE, and Tk.
49
50 %description -l pl.UTF-8
51 Dowiązania do OpenGL dla Pythona wraz z rozszerzeniami GL, GLU, WGL,
52 GLUT, GLE i Tk.
53
54 %package examples
55 Summary:        Demos for PyOpenGL
56 Summary(pl.UTF-8):      Programy demonstracyjne dla pakietu PyOpenGL
57 Group:          Development/Languages/Python
58 Requires:       %{name} = %{epoch}:%{version}-%{release}
59
60 %description examples
61 Demos for PyOpenGL.
62
63 %description examples -l pl.UTF-8
64 Programy demonstracyjne dla pakietu PyOpenGL.
65
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
70 Requires:       python3-modules >= 1:3.2
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
93 %prep
94 %setup -q -n %{module}-%{version} -a 1
95
96 %build
97 %if %{with python2}
98 %py_build
99
100 cd %{module}-Demo-3.0.1a1
101 %py_build
102 cd ..
103
104 %if %{with tests}
105 cd tests
106 %{__python} test_core.py
107 cd ..
108 %endif
109 %endif
110
111 %if %{with python3}
112 %py3_build
113
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
123 %endif
124
125 %install
126 rm -rf $RPM_BUILD_ROOT
127
128 %if %{with python2}
129 %py_install
130
131 cd %{module}-Demo-3.0.1a1
132 %py_install
133 cd ..
134
135 %py_postclean
136 %endif
137
138 %if %{with python3}
139 %py3_install
140
141 cd %{module}-Demo-3.0.1a1
142 %py3_install
143 cd ..
144 %endif
145
146 %clean
147 rm -rf $RPM_BUILD_ROOT
148
149 %if %{with python2}
150 %files
151 %defattr(644,root,root,755)
152 %doc license.txt
153 %{py_sitescriptdir}/OpenGL
154 %{py_sitescriptdir}/PyOpenGL-%{version}-py*.egg-info
155
156 %files examples
157 %defattr(644,root,root,755)
158 %{py_sitescriptdir}/PyOpenGL-Demo
159 %{py_sitescriptdir}/PyOpenGL_Demo-3.0.1a1-py*.egg-info
160 %endif
161
162 %if %{with python3}
163 %files -n python3-%{module}
164 %defattr(644,root,root,755)
165 %doc license.txt
166 %{py3_sitescriptdir}/OpenGL
167 %{py3_sitescriptdir}/PyOpenGL-%{version}-py*.egg-info
168
169 %files -n python3-%{module}-examples
170 %defattr(644,root,root,755)
171 %{py3_sitescriptdir}/PyOpenGL-Demo
172 %{py3_sitescriptdir}/PyOpenGL_Demo-3.0.1a1-py*.egg-info
173 %endif
This page took 0.087052 seconds and 3 git commands to generate.