]> git.pld-linux.org Git - packages/python-pivy.git/blob - python-pivy.spec
158779a4eced0f5624d854acf7fe585e94424d07
[packages/python-pivy.git] / python-pivy.spec
1 #
2 # Conditional build:
3 %bcond_without  python2 # CPython 2.x module
4 %bcond_without  python3 # CPython 3.x module
5 %bcond_without  qt      # SoQt GUI modules (only qt5 based SoQt is supported)
6
7 %define         module  pivy
8 Summary:        Coin binding for Python 2
9 Summary(pl.UTF-8):      Interfejs Pythona 2 do biblioteki Coin
10 Name:           python-%{module}
11 Version:        0.6.5
12 Release:        1
13 License:        ISC
14 Group:          Libraries/Python
15 #Source0Download: https://github.com/coin3d/pivy/releases
16 Source0:        https://github.com/coin3d/pivy/archive/%{version}/pivy-%{version}.tar.gz
17 # Source0-md5:  73b6083aa1c055c83294d0fa1fee037b
18 Patch0:         %{name}-swig-pyver.patch
19 URL:            https://github.com/coin3d/pivy
20 BuildRequires:  Coin-devel >= 4.0.0
21 BuildRequires:  OpenGL-GLU-devel
22 BuildRequires:  Qt5Gui-devel >= 5
23 BuildRequires:  Qt5OpenGL-devel >= 5
24 BuildRequires:  SoQt-devel >= 1.6.0
25 BuildRequires:  cmake >= 3.5
26 %{?with_python2:BuildRequires:  python-devel >= 1:2.7}
27 %{?with_python3:BuildRequires:  python3-devel >= 1:3.2}
28 BuildRequires:  qt5-build >= 5
29 BuildRequires:  rpm-pythonprov
30 BuildRequires:  rpmbuild(macros) >= 1.714
31 BuildRequires:  sed >= 4.0
32 BuildRequires:  swig-python >= 3.0.8
33 BuildRequires:  xorg-lib-libXmu-devel
34 Requires:       Coin >= 4.0.0
35 Requires:       python-modules >= 1:2.7
36 Provides:       python-Pivy = %{version}-%{release}
37 Obsoletes:      python-Pivy < 0.5.0-0.20110922.2
38 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
39
40 %description
41 Pivy is a Coin binding for Python. Coin is a high-level 3D graphics
42 library with a C++ Application Programming Interface. Coin uses
43 scene-graph data structures to render real-time graphics suitable for
44 mostly all kinds of scientific and engineering visualization
45 applications.
46
47 %description -l pl.UTF-8
48 Pivy to wiązania biblioteki Coin dla Pythona. Coin to wysokopoziomowa
49 biblioteka grafiki 3D z interfejsem programistycznym (API) C++.
50 Wykorzystuje struktury danych scena-graf do renderowania w czasie
51 rzeczywistym grafiki w sposób nadający się do większości zastosowań w
52 wizualizacji naukowej i inżynierskiej.
53
54 %package gui
55 Summary:        GUI (SoQt) support for Python 2 Coin binding
56 Summary(pl.UTF-8): Obsługa GUI (SoQt) do wiązań biblioteki Coin dla Pythona 2
57 Group:          Libraries/Python
58 Requires:       %{name} = %{version}-%{release}
59 Requires:       SoQt >= 1.6.0
60 Requires:       python-PySide2
61
62 %description gui
63 GUI (SoQt) support for Python 2 Coin binding.
64
65 %description gui -l pl.UTF-8
66 Obsługa GUI (SoQt) do wiązań biblioteki Coin dla Pythona 2.
67
68 %package -n python3-pivy
69 Summary:        Coin binding for Python 3
70 Summary(pl.UTF-8):      Interfejs Pythona 3 do biblioteki Coin
71 Group:          Libraries/Python
72 Requires:       Coin >= 4.0.0
73 Requires:       python-modules >= 1:3.2
74
75 %description -n python3-pivy
76 Pivy is a Coin binding for Python. Coin is a high-level 3D graphics
77 library with a C++ Application Programming Interface. Coin uses
78 scene-graph data structures to render real-time graphics suitable for
79 mostly all kinds of scientific and engineering visualization
80 applications.
81
82 %description -n python3-pivy -l pl.UTF-8
83 Pivy to wiązania biblioteki Coin dla Pythona. Coin to wysokopoziomowa
84 biblioteka grafiki 3D z interfejsem programistycznym (API) C++.
85 Wykorzystuje struktury danych scena-graf do renderowania w czasie
86 rzeczywistym grafiki w sposób nadający się do większości zastosowań w
87 wizualizacji naukowej i inżynierskiej.
88
89 %package -n python3-pivy-gui
90 Summary:        GUI (SoQt) support for Python 3 Coin binding
91 Summary(pl.UTF-8): Obsługa GUI (SoQt) do wiązań biblioteki Coin dla Pythona 3
92 Group:          Libraries/Python
93 Requires:       SoQt >= 1.6.0
94 Requires:       python3-PySide2
95 Requires:       python3-pivy = %{version}-%{release}
96
97 %description -n python3-pivy-gui
98 GUI (SoQt) support for Python 2 Coin binding.
99
100 %description -n python3-pivy-gui -l pl.UTF-8
101 Obsługa GUI (SoQt) do wiązań biblioteki Coin dla Pythona 2.
102
103 %prep
104 %setup -q -n pivy-%{version}
105 %patch0 -p1
106
107 %if "%{_lib}" != "lib"
108 # chosing lib<ABI> depends on CMAKE_INTERNAL_PLATFORM_ABI and CMAKE_SIZEOF_VOID_P
109 # properties, which are configured with at least C compiler
110 %{__sed} -i -e '/^project/ s/NONE/C/' CMakeLists.txt
111 %endif
112
113 %build
114 PATH=%{_libdir}/qt5/bin:$PATH
115
116 %if %{with python2}
117 %py_build \
118         %{!?with_qt:--without-soqt}
119 %endif
120
121 %if %{with python3}
122 %py3_build \
123         %{!?with_qt:--without-soqt}
124 %endif
125
126 %install
127 rm -rf $RPM_BUILD_ROOT
128
129 PATH=%{_libdir}/qt5/bin:$PATH
130
131 %if %{with python2}
132 %py_install \
133         %{!?with_qt:--without-soqt}
134
135 %py_postclean
136 %endif
137
138 %if %{with python3}
139 %py3_install \
140         %{!?with_qt:--without-soqt}
141 %endif
142
143 %clean
144 rm -rf $RPM_BUILD_ROOT
145
146 %files
147 %defattr(644,root,root,755)
148 %doc AUTHORS LICENSE NEWS README.md THANKS
149 %dir %{py_sitedir}/pivy
150 %attr(755,root,root) %{py_sitedir}/pivy/_coin.so
151 %{py_sitedir}/pivy/*.py[co]
152 %{py_sitedir}/pivy/graphics
153 %{py_sitedir}/pivy/quarter
154 %{py_sitedir}/Pivy-%{version}-py*.egg-info
155
156 %files gui
157 %defattr(644,root,root,755)
158 %dir %{py_sitedir}/pivy/gui
159 %attr(755,root,root) %{py_sitedir}/pivy/gui/_soqt.so
160 %{py_sitedir}/pivy/gui/*.py[co]
161
162 %files -n python3-pivy
163 %defattr(644,root,root,755)
164 %doc AUTHORS LICENSE NEWS README.md THANKS
165 %dir %{py3_sitedir}/pivy
166 %attr(755,root,root) %{py3_sitedir}/pivy/_coin.cpython-*.so
167 %{py3_sitedir}/pivy/*.py
168 %{py3_sitedir}/pivy/__pycache__
169 %{py3_sitedir}/pivy/graphics
170 %{py3_sitedir}/pivy/quarter
171 %{py3_sitedir}/Pivy-%{version}-py*.egg-info
172
173 %files -n python3-pivy-gui
174 %defattr(644,root,root,755)
175 %dir %{py3_sitedir}/pivy/gui
176 %attr(755,root,root) %{py3_sitedir}/pivy/gui/_soqt.cpython-*.so
177 %{py3_sitedir}/pivy/gui/*.py
178 %{py3_sitedir}/pivy/gui/__pycache__
This page took 0.245681 seconds and 2 git commands to generate.