python-elementtree-vl.spec 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. %define python_sitearch %(%{__python} -c 'from distutils import sysconfig; print sysconfig.get_python_lib(1)')
  2. %define python_sitelib %(%{__python} -c 'from distutils import sysconfig; print sysconfig.get_python_lib()')
  3. %define real_name elementtree
  4. Summary: Fast XML parser and writer
  5. Name: python-elementtree
  6. %define real_version 1.2.6-20050316
  7. %define real_version_celementtree 1.0.2-20050302
  8. Version: 1.2.6
  9. Release: 3%{?_dist_release}
  10. License: PSF
  11. Group: Development/Libraries
  12. URL: http://effbot.org/zone/element-index.htm
  13. Source0: http://effbot.org/downloads/elementtree-%{real_version}.tar.gz
  14. Source1: http://effbot.org/downloads/cElementTree-%{real_version_celementtree}.tar.gz
  15. Source2: cElementTree-system-expat-setup.py
  16. BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
  17. BuildRequires: expat-devel, python-devel
  18. Provides: cElementTree.so
  19. %description
  20. The Element type is a simple but flexible container object, designed
  21. to store hierarchical data structures, such as simplified XML
  22. infosets, in memory. The element type can be described as a cross
  23. between a Python list and a Python dictionary.
  24. This package also includes the C implementation, %{real_version_celementtree}.
  25. %prep
  26. %setup -a1 -n %{real_name}-%{real_version}
  27. pushd cElementTree-%{real_version_celementtree}
  28. %{__mv} -f setup.py setup.py-orig
  29. %{__cp} -f %{SOURCE2} setup.py
  30. %{__mv} -f CHANGES ../CHANGES-cElementTree
  31. %{__mv} -f README ../README-cElementTree
  32. popd
  33. %build
  34. %{__python} setup.py build
  35. pushd cElementTree-%{real_version_celementtree}
  36. CFLAGS="%{optflags}" %{__python} setup.py build
  37. popd
  38. %install
  39. %{__rm} -rf %{buildroot}
  40. %{__python} setup.py install -O1 --skip-build --root="%{buildroot}" --prefix="%{_prefix}"
  41. pushd cElementTree-%{real_version_celementtree}
  42. %{__python} setup.py install -O1 --skip-build --root="%{buildroot}" --prefix="%{_prefix}"
  43. popd
  44. %clean
  45. %{__rm} -rf %{buildroot}
  46. %files
  47. %defattr(-, root, root, 0755)
  48. %doc CHANGES* README* benchmark.py docs/ samples/
  49. %{python_sitelib}/elementtree/
  50. %{python_sitearch}/*.so
  51. %changelog
  52. * Tue Feb 02 2010 Shu KONNO <owa@bg.wakwak.com> 1.2.6-3
  53. - rebuild with python-2.6
  54. * Mon Jul 21 2008 Shu KONNO <owa@bg.wakwak.com> 1.2.6-2
  55. - rebuilt with python-2.5.2
  56. * Mon Apr 28 2008 Daisuke SUZUKI <daisuke@linux.or.jp> 1.2.6-1
  57. - initial build for Vine Linux
  58. * Sun Aug 13 2006 Dag Wieers <dag@wieers.com> - 1.2.6-7 #4303
  59. - Provide cElementtree.so because external packages (vzyum) require it.
  60. * Fri Jan 27 2006 Dag Wieers <dag@wieers.com> - 1.2.6-6
  61. - Removed python-abi since older releases do not provide it.
  62. * Thu Jan 05 2006 Dag Wieers <dag@wieers.com> - 1.2.6-5
  63. - Obsoleted python-celementtree.
  64. * Tue Jul 26 2005 Jeff Pitman <symbiont+pyvault@berlios.de> 1.2.6-4.1
  65. - pyvaultize
  66. * Mon Apr 4 2005 Jeremy Katz <katzj@redhat.com> - 1.2.6-4
  67. - rebuild for core
  68. - use %%setup -q -a 1 instead of unzipping source1
  69. * Tue Mar 30 2005 Konstantin Ryabitsev <icon@linux.duke.edu> - 1.2.6-3
  70. - Use python_sitearch for the C library.
  71. * Tue Mar 29 2005 Konstantin Ryabitsev <icon@linux.duke.edu> - 1.2.6-2
  72. - Use python_sitelib
  73. - Own the elementtree dir in site-packages
  74. - BuildRequire python-devel
  75. - Do not namely require expat
  76. - Do not use INSTALLED_FILES (safer)
  77. - Use ghosting for .pyo
  78. * Thu Mar 17 2005 Konstantin Ryabitsev <icon@linux.duke.edu> - 1.2.6-1
  79. - Version 1.2.6 of ElementTree.
  80. * Thu Mar 10 2005 Konstantin Ryabitsev <icon@linux.duke.edu> - 1.2.5-1
  81. - Rename as python-elementtree.
  82. * Sat Mar 5 2005 Konstantin Ryabitsev <icon@linux.duke.edu> - 1.2.5-1
  83. - Initial RPM release.