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