source: projects/specs/trunk/p/python3-pycairo/python3-pycairo-vl.spec @ 10405

Revision 10405, 2.7 KB checked in by Takemikaduchi, 8 years ago (diff)

gcc-5.4.0 & python3-3.5.2

Line 
1%{!?python3_sitearch: %define python3_sitearch %(python3 -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}
2
3Name: python3-pycairo
4Summary: Python3 bindings for the cairo library
5Summary(ja): cairo ライブラリの Python3 バインディング
6Version: 1.10.0
7Release: 3%{?_dist_release}
8
9Group: Development/Languages
10License: LGPLv2
11URL: http://cairographics.org/pycairo
12
13Source: http://cairographics.org/releases/pycairo-%{version}.tar.bz2
14
15# patches from fedora
16Patch0: cairo-waf-use-python-config-as-shell-script.patch
17Patch1: pycairo-1.10.0-test-python3.patch
18Patch2: pycairo-1.10.0-pickle-python3.patch
19
20BuildRoot: %{_tmppath}/%{name}-%{version}-root
21BuildRequires: cairo-devel >= 1.10.0
22BuildRequires: python3-devel >= 3.0
23BuildRequires: pkgconfig
24Requires: python3 >= 3.0
25Requires: cairo >= 1.10.0
26
27%description
28Python3 bindings for the cairo library.
29
30%package devel
31Summary: Libraries and headers for pycairo
32Group: Development/Libraries
33Requires: %{name} = %{version}-%{release}
34Requires: cairo-devel >= 1.10.0
35Requires: python3-devel >= 3.0
36
37%description devel
38This package contains files required to build wrappers for cairo add-on
39libraries so that they interoperate with pycairo3.
40
41%prep
42%setup -q -n pycairo-%{version}
43
44# Ensure that ./waf has created the cached unpacked version
45# of the wafadmin source tree.
46# This will be created to a subdirectory like
47#    .waf3-1.5.18-a7b91e2a913ce55fa6ecdf310df95752
48python3 ./waf --version
49
50%patch0 -p0
51%patch1 -p1
52%patch2 -p1
53
54%build
55export CFLAGS="$RPM_OPT_FLAGS"
56export PYTHON=python3
57python3 ./waf configure \
58                        --prefix=%{_prefix} \
59                        --libdir=%{_libdir}
60
61
62# do not fail on utf-8 encoded files
63LANG=en_US.utf8 python3 ./waf build -v
64
65# remove executable bits from examples
66find ./examples/ -type f -print0 | xargs -0 chmod -x
67
68%install
69rm -rf $RPM_BUILD_ROOT
70
71DESTDIR=$RPM_BUILD_ROOT python3 ./waf install
72find $RPM_BUILD_ROOT -name '*.la' | xargs rm -f
73
74# Remove stowaway py2 build artifacts
75find $RPM_BUILD_ROOT -name '*.pyc' | xargs rm -f
76find $RPM_BUILD_ROOT -name '*.pyo' | xargs rm -f
77
78%clean
79rm -rf $RPM_BUILD_ROOT
80
81%files
82%defattr(-,root,root,-)
83%doc AUTHORS COPYING* INSTALL NEWS README
84%{python3_sitearch}/cairo/
85
86%files devel
87%defattr(-,root,root,-)
88%{_includedir}/pycairo/py3cairo.h
89%{_libdir}/pkgconfig/py3cairo.pc
90
91%changelog
92* Tue Jun 28 2016 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.10.0-3
93- rebuild with python-3.5.2
94- remove old patches
95- add Patch0,1,2 from fedora
96
97* Mon Jan 12 2015 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.10.0-2
98- rebuild with python-3.4.2
99- add Patch0 (pycairo-1.10.0-waf_unpack-1.patch)
100- add Patch1 (pycairo-1.10.0-waf_python_3_4-1.patch)
101
102* Sat Oct 26 2013 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.10.0-1
103- initial build
104
Note: See TracBrowser for help on using the repository browser.