Blob Blame History Raw
Name:           python-svg
Version:        0.2.2b
Release:        4%{?dist}
Summary:        Python wrapper for svg

Group:          Development/Libraries
License:        BSD
URL:            http://code.google.com/p/pysvg/
Source0:        http://pysvg.googlecode.com/files/pysvg-0.2.2b.zip

BuildArch:      noarch
BuildRequires:  python2-devel,python-setuptools

%description
pySVG is a pure Python library to create/load and manipulate SVG documents.

It's main use is to "code" svg images. 

%package doc
Summary: Documentation for python-syg
Group: Development/Libraries
Requires: %{name} = %{version}-%{release}

%description doc
pySVG is a pure Python library to create/load and manipulate SVG documents.

It's main use is to "code" svg images. 

These are the documentation files.

%prep
%setup -qn pysvg-%{version}

rm -f doc/html/.buildinfo

# Convert to utf-8
for file in `find . -name '*.py'`; do
    iconv -f ISO-8859-1 -t UTF-8 -o $file.new $file && \
    touch -r $file $file.new && \
    mv $file.new $file
done

#Strip bad EOL encodings
for file in `find . -name '*.txt'` doc/html/_static/pygments.css; do
 sed -i "s|\r||g" $file
done
for file in `find . -name '*.py'`; do
 sed -i "s|\r||g" $file
done

#Remove shabangs.
for lib in `find . -name '*.py'`; do
 sed -i '/\/usr\/bin\/python/d' $lib
done

%build
%{__python} setup.py build


%install
%{__python} setup.py install --skip-build --root $RPM_BUILD_ROOT

find $RPM_BUILD_ROOT -name '*.egg-info' | xargs rm -rf

%files
%doc doc/license.txt
%{python_sitelib}/pysvg

%files doc
%doc doc/

%changelog
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.2.2b-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild

* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.2.2b-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild

* Thu Nov 15 2012 Jon Ciesla <limburgher@gmail.com> - 0.2.2b-2
- Remove egg-info, fix EOL encoding, add doc subpackage.

* Thu Nov 15 2012 Jon Ciesla <limburgher@gmail.com> - 0.2.2b-1
- New version with clarified license.

* Thu Jun 07 2012 Jon Ciesla <limburgher@gmail.com> - 0.2.1-1
- Initial package version