]>
Commit | Line | Data |
---|---|---|
8324896f AF |
1 | Summary: Python 3.x Cairo bindings |
2 | Summary(pl.UTF-8): Dowiązania Pythona 3.x dla Cairo | |
3 | Name: python3-pycairo | |
9073c451 | 4 | Version: 1.10.0 |
8324896f AF |
5 | Release: 1 |
6 | License: LGPL v3 | |
7 | Group: Libraries | |
8 | Source0: http://cairographics.org/releases/pycairo-%{version}.tar.bz2 | |
9073c451 | 9 | # Source0-md5: e6fd3f2f1e6a72e0db0868c4985669c5 |
8324896f | 10 | URL: http://cairographics.org/ |
9073c451 | 11 | BuildRequires: cairo-devel >= 1.10.0 |
8324896f AF |
12 | BuildRequires: pkgconfig |
13 | BuildRequires: python3 >= 3.1 | |
14 | BuildRequires: python3-devel >= 3.1 | |
15 | # for tests only | |
16 | #BuildRequires: python-numpy | |
9073c451 | 17 | # not released yet |
8324896f AF |
18 | #BuildRequires: python-xpyb >= 1.3 |
19 | BuildRequires: rpm-pythonprov | |
9073c451 | 20 | Requires: cairo >= 1.10.0 |
8324896f AF |
21 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
22 | ||
23 | %description | |
24 | Python 3.x Cairo bindings. | |
25 | ||
26 | %description -l pl.UTF-8 | |
27 | Dowiązania Pythona 3.x dla Cairo. | |
28 | ||
29 | %package devel | |
30 | Summary: Development files for pycairo | |
31 | Summary(pl.UTF-8): Pliki programistyczne pycairo | |
32 | Group: Development/Libraries | |
33 | Requires: %{name} = %{version}-%{release} | |
9073c451 | 34 | Requires: cairo-devel >= 1.10.0 |
8324896f AF |
35 | |
36 | %description devel | |
37 | Development files for pycairo. | |
38 | ||
39 | %description devel -l pl.UTF-8 | |
40 | Pliki programistyczne pycairo. | |
41 | ||
42 | %package examples | |
43 | Summary: Example programs using Python Cairo bindings | |
44 | Summary(pl.UTF-8): Przykładowe programy w Pythonie używające Cairo | |
45 | Group: Libraries/Python | |
46 | Requires: %{name} = %{version}-%{release} | |
47 | ||
48 | %description examples | |
49 | Example programs using Python Cairo bindings. | |
50 | ||
51 | %description examples -l pl.UTF-8 | |
52 | Przykładowe programy w Pythonie używające Cairo. | |
53 | ||
54 | %prep | |
55 | %setup -q -n pycairo-%{version} | |
56 | ||
57 | %build | |
58 | CC="%{__cc}" \ | |
59 | CXX="%{__cxx}" \ | |
60 | CPP="%{__cpp}" \ | |
61 | CFLAGS="%{rpmcflags}" \ | |
62 | CXXFLAGS="%{rpmcxxflags}" \ | |
9073c451 | 63 | PYTHON="%{_bindir}/python3" \ |
8324896f AF |
64 | PYTHONDIR="%{py3_sitedir}" \ |
65 | python3 ./waf %{?_smp_mflags} configure \ | |
66 | --prefix=%{_prefix} | |
67 | ||
8324896f AF |
68 | python3 ./waf build |
69 | ||
70 | %install | |
71 | rm -rf $RPM_BUILD_ROOT | |
72 | install -d $RPM_BUILD_ROOT%{_examplesdir} | |
73 | ||
74 | python3 ./waf install \ | |
75 | --destdir=$RPM_BUILD_ROOT | |
76 | ||
77 | %if "%{_lib}" != "lib" | |
78 | install -d $RPM_BUILD_ROOT%{_pkgconfigdir} | |
79 | mv $RPM_BUILD_ROOT%{_prefix}/lib/pkgconfig/*.pc $RPM_BUILD_ROOT%{_pkgconfigdir} | |
80 | %endif | |
81 | ||
82 | cp -a examples $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} | |
83 | ||
8324896f AF |
84 | %py3_postclean |
85 | ||
86 | %clean | |
87 | rm -rf $RPM_BUILD_ROOT | |
88 | ||
89 | %files | |
90 | %defattr(644,root,root,755) | |
91 | %doc AUTHORS COPYING NEWS README | |
92 | %dir %{py3_sitedir}/cairo | |
9073c451 | 93 | %attr(755,root,root) %{py3_sitedir}/cairo/_cairo.cpython-*.so |
8324896f AF |
94 | %{py3_sitedir}/cairo/__init__.py[co] |
95 | ||
96 | %files devel | |
97 | %defattr(644,root,root,755) | |
98 | %{_includedir}/pycairo | |
99 | %{_pkgconfigdir}/py3cairo.pc | |
100 | ||
101 | %files examples | |
102 | %defattr(644,root,root,755) | |
103 | %{_examplesdir}/%{name}-%{version} |