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