rpms/python-elementtree/devel cElementTree-system-expat-setup.py, NONE, 1.1 python-elementtree.spec, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2

Konstantin Ryabitsev (icon) fedora-extras-commits at redhat.com
Wed Mar 30 15:12:00 UTC 2005


Author: icon

Update of /cvs/extras/rpms/python-elementtree/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv10902/devel

Modified Files:
	.cvsignore sources 
Added Files:
	cElementTree-system-expat-setup.py python-elementtree.spec 
Log Message:
auto-import python-elementtree-1.2.6-3 on branch devel from python-elementtree-1.2.6-3.src.rpm


--- NEW FILE cElementTree-system-expat-setup.py ---
#!/usr/bin/env python
#
# Setup script for the cElementTree accelerator
# $Id: setup.py 2294 2005-02-13 12:09:00Z fredrik $
#
# Usage: python setup.py install
#

from distutils.core import setup, Extension
from distutils import sysconfig

# --------------------------------------------------------------------
# identification

NAME = "cElementTree"
VERSION = "1.0.2-20050302"
DESCRIPTION = "A fast C implementation of the ElementTree API."
AUTHOR = "Fredrik Lundh", "fredrik at pythonware.com"
HOMEPAGE = "http://www.effbot.org/zone/celementtree.htm"
DOWNLOAD = "http://effbot.org/downloads#celementtree"

# --------------------------------------------------------------------
# distutils declarations

celementtree_module = Extension(
    "cElementTree", ["cElementTree.c"],
    include_dirs=['/usr/include'],
    libraries=['expat']
    )

try:
    # add classifiers and download_url syntax to distutils
    from distutils.dist import DistributionMetadata
    DistributionMetadata.classifiers = None
    DistributionMetadata.download_url = None
except:
    pass

setup(
    author=AUTHOR[0],
    author_email=AUTHOR[1],
    classifiers=[
        "Development Status :: 5 - Production/Stable",
        "Operating System :: OS Independent",
        "Topic :: Text Processing :: Markup :: XML",
        ],
    description=DESCRIPTION,
    download_url=DOWNLOAD,
    ext_modules = [celementtree_module],
    license="Python (MIT style)",
    long_description=DESCRIPTION,
    name=NAME,
    platforms="Python 2.1 and later.",
    url=HOMEPAGE,
    version=VERSION,
    )


--- NEW FILE python-elementtree.spec ---
%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
%{!?python_sitearch: %define python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}

%define     _upstream_nvr   elementtree-1.2.6-20050316
%define     _upstream_cnvr  cElementTree-1.0.2-20050302    

Name:           python-elementtree
Version:        1.2.6
Release:        3
Summary:        Fast XML parser and writer

Group:          Development/Libraries
License:        PSF
URL:            http://effbot.org/zone/element-index.htm
Source0:        http://effbot.org/downloads/%{_upstream_nvr}.zip
Source1:        http://effbot.org/downloads/%{_upstream_cnvr}.zip
Source2:        cElementTree-system-expat-setup.py
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root

BuildRequires:  expat-devel, python-devel
Requires:       python-abi = %(%{__python} -c "import sys ; print sys.version[:3]")

%description
The Element type is a simple but flexible container object, designed
to store hierarchical data structures, such as simplified XML
infosets, in memory. The element type can be described as a cross
between a Python list and a Python dictionary.

This package also includes the C implementation, %{_upstream_cnvr}.

%prep
%setup -q -n %{_upstream_nvr}
## Take care of cElementTree
%{__unzip} %{SOURCE1}
pushd %{_upstream_cnvr}
mv -f setup.py setup.py-orig
cp -f %{SOURCE2} setup.py
cp -f README ../README-cElementTree
cp -f CHANGES ../CHANGES-cElementTree
popd


%build
%{__python} setup.py build
pushd %{_upstream_cnvr}
CFLAGS="$RPM_OPT_FLAGS" %{__python} setup.py build
popd


%install
rm -rf $RPM_BUILD_ROOT
%{__python} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT
pushd %{_upstream_cnvr}
%{__python} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT
popd


%clean
rm -rf $RPM_BUILD_ROOT


%files
%defattr(-,root,root,-)
%doc docs samples README* CHANGES* benchmark.py
%dir %{python_sitelib}/elementtree
%{python_sitelib}/elementtree/*.py
%{python_sitelib}/elementtree/*.pyc
%ghost %{python_sitelib}/elementtree/*.pyo
%{python_sitearch}/*.so

%changelog
* Tue Mar 30 2005 Konstantin Ryabitsev <icon at linux.duke.edu> - 1.2.6-3
- Use python_sitearch for the C library.

* Tue Mar 29 2005 Konstantin Ryabitsev <icon at linux.duke.edu> - 1.2.6-2
- Use python_sitelib
- Own the elementtree dir in site-packages
- BuildRequire python-devel
- Do not namely require expat
- Do not use INSTALLED_FILES (safer)
- Use ghosting for .pyo

* Thu Mar 17 2005 Konstantin Ryabitsev <icon at linux.duke.edu> - 1.2.6-1
- Version 1.2.6 of ElementTree.

* Thu Mar 10 2005 Konstantin Ryabitsev <icon at linux.duke.edu> - 1.2.5-1
- Rename as python-elementtree.

* Sat Mar  5 2005 Konstantin Ryabitsev <icon at linux.duke.edu> - 1.2.5-1
- Initial RPM release.



Index: .cvsignore
===================================================================
RCS file: /cvs/extras/rpms/python-elementtree/devel/.cvsignore,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- .cvsignore	30 Mar 2005 15:11:34 -0000	1.1
+++ .cvsignore	30 Mar 2005 15:11:58 -0000	1.2
@@ -0,0 +1,2 @@
+cElementTree-1.0.2-20050302.zip
+elementtree-1.2.6-20050316.zip


Index: sources
===================================================================
RCS file: /cvs/extras/rpms/python-elementtree/devel/sources,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- sources	30 Mar 2005 15:11:34 -0000	1.1
+++ sources	30 Mar 2005 15:11:58 -0000	1.2
@@ -0,0 +1,2 @@
+aba87db5932ac46fd7a75cfbc711f6ba  cElementTree-1.0.2-20050302.zip
+6751a9005efbd2c543ef32905d4a0acd  elementtree-1.2.6-20050316.zip




More information about the fedora-extras-commits mailing list