Sophie

Sophie

distrib > Fedora > 13 > i386 > media > updates-src > by-pkgid > 04d9b4dfe89cffa23185cfbac7b8f2ac > files > 2

python-Chaco-3.3.1-2.fc13.src.rpm

%global srcname Chaco

Name:		python-Chaco
Version:	3.3.1
Release:	2%{?dist}
Summary:	Interactive 2-Dimensional Plotting
Group:		Development/Libraries
License:	BSD and Public Domain
URL:		http://code.enthought.com/projects/chaco
Source0:	http://www.enthought.com/repo/ETS/%{srcname}-%{version}.tar.gz
BuildRequires:	python2-devel python-setuptools numpy
BuildRequires:	python-setupdocs
Requires:	python-Enable python-EnthoughtBase python-TraitsGUI
Requires:	numpy

%description
Chaco is a Python plotting application toolkit that facilitates writing 
plotting applications at all levels of complexity, from simple scripts with
hard-coded data to large plotting programs with complex data interrelationships
and a multitude of interactive tools. While Chaco generates attractive static
plots for publication and presentation, it also works well for interactive data
visualization and exploration.

%prep
%setup -q -n %{srcname}-%{version}

rm -rf *.egg-info

mv docs/chaco\ talk\ apr_2006 docs/chaco_talk_apr_2006
# Convert encoding to UTF-8
for file in *.txt; do
    iconv -f ISO-8859-1 -t UTF-8 -o $file.new $file && \
    touch -r $file $file.new && \
    mv $file.new $file
done

# Remove DOS line endings
for file in `find -name "*.txt" -o -name "*.py" -o -name "*.js" -o -name "*.htc" \
	-o -name "*.css"`; do
	sed "s|\r||g" $file > $file.new && \
	touch -r $file $file.new && \
	mv $file.new $file
done

# Remove exec permission
find -type f -exec chmod 0644 {} \;

mv docs/chaco_talk_apr_2006 docs/chaco\ talk\ apr_2006

%build
CFLAGS="%{optflags}" python setup.py build

%install
python setup.py install --install-data=%{python_sitearch} -O1 --skip-build --root %{buildroot}

find %{buildroot}%{python_sitearch}/enthought -name "setup.py*" -exec rm {} ";"
rm -f %{buildroot}%{python_sitearch}/enthought/chaco/contour/*.c
rm -rf docs/{source,html.zip,*.doc,*.keynote.tgz,chaco.new}

# Remove DOS line endings
for file in `find build/docs -name "*.txt" -o -name "*.js" -o -name "*.inv" \
	-o -name "*.css"`; do
	sed "s|\r||g" $file > $file.new && \
	touch -r $file $file.new && \
	mv $file.new $file
done

%files
%defattr(-,root,root,-)
%doc *.txt docs/* build/docs/html examples
%{python_sitearch}/*.egg-info
%{python_sitearch}/*.pth
%{python_sitearch}/enthought/chaco
%{python_sitearch}/enthought/chaco2

%changelog
* Mon Aug 02 2010 Chen Lei <supercyper@163.com> - 3.3.1-2
- Remove devel files in package

* Mon Jul 26 2010 Chen Lei <supercyper@163.com> - 3.3.1-1
- Initial package