python3-pycairo-vl.spec 2.7 KB

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