123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104 |
- %{!?python3_sitearch: %define python3_sitearch %(python3 -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}
- Name: python3-pycairo
- Summary: Python3 bindings for the cairo library
- Summary(ja): cairo ライブラリの Python3 バインディング
- Version: 1.10.0
- Release: 3%{?_dist_release}
- Group: Development/Languages
- License: LGPLv2
- URL: http://cairographics.org/pycairo
- Source: http://cairographics.org/releases/pycairo-%{version}.tar.bz2
- # patches from fedora
- Patch0: cairo-waf-use-python-config-as-shell-script.patch
- Patch1: pycairo-1.10.0-test-python3.patch
- Patch2: pycairo-1.10.0-pickle-python3.patch
- BuildRoot: %{_tmppath}/%{name}-%{version}-root
- BuildRequires: cairo-devel >= 1.10.0
- BuildRequires: python3-devel >= 3.0
- BuildRequires: pkgconfig
- Requires: python3 >= 3.0
- Requires: cairo >= 1.10.0
- %description
- Python3 bindings for the cairo library.
- %package devel
- Summary: Libraries and headers for pycairo
- Group: Development/Libraries
- Requires: %{name} = %{version}-%{release}
- Requires: cairo-devel >= 1.10.0
- Requires: python3-devel >= 3.0
- %description devel
- This package contains files required to build wrappers for cairo add-on
- libraries so that they interoperate with pycairo3.
- %prep
- %setup -q -n pycairo-%{version}
- # Ensure that ./waf has created the cached unpacked version
- # of the wafadmin source tree.
- # This will be created to a subdirectory like
- # .waf3-1.5.18-a7b91e2a913ce55fa6ecdf310df95752
- python3 ./waf --version
- %patch0 -p0
- %patch1 -p1
- %patch2 -p1
- %build
- export CFLAGS="$RPM_OPT_FLAGS"
- export PYTHON=python3
- python3 ./waf configure \
- --prefix=%{_prefix} \
- --libdir=%{_libdir}
- # do not fail on utf-8 encoded files
- LANG=en_US.utf8 python3 ./waf build -v
- # remove executable bits from examples
- find ./examples/ -type f -print0 | xargs -0 chmod -x
- %install
- rm -rf $RPM_BUILD_ROOT
- DESTDIR=$RPM_BUILD_ROOT python3 ./waf install
- find $RPM_BUILD_ROOT -name '*.la' | xargs rm -f
- # Remove stowaway py2 build artifacts
- find $RPM_BUILD_ROOT -name '*.pyc' | xargs rm -f
- find $RPM_BUILD_ROOT -name '*.pyo' | xargs rm -f
- %clean
- rm -rf $RPM_BUILD_ROOT
- %files
- %defattr(-,root,root,-)
- %doc AUTHORS COPYING* INSTALL NEWS README
- %{python3_sitearch}/cairo/
- %files devel
- %defattr(-,root,root,-)
- %{_includedir}/pycairo/py3cairo.h
- %{_libdir}/pkgconfig/py3cairo.pc
- %changelog
- * Tue Jun 28 2016 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.10.0-3
- - rebuild with python-3.5.2
- - remove old patches
- - add Patch0,1,2 from fedora
- * Mon Jan 12 2015 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.10.0-2
- - rebuild with python-3.4.2
- - add Patch0 (pycairo-1.10.0-waf_unpack-1.patch)
- - add Patch1 (pycairo-1.10.0-waf_python_3_4-1.patch)
- * Sat Oct 26 2013 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.10.0-1
- - initial build
|