Blob Blame History Raw
Name:           python-svg
Version:        0.2.2b
Release:        11%{?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
Patch0:         pysvg-python3.patch

BuildArch:      noarch
BuildRequires:  python2-devel,python-setuptools
BuildRequires:  python3-devel,python3-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.

%package -n python3-svg
Summary:        %{sum}
%{?python_provide:%python_provide python3-svg}

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

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


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

%patch0 -p1 -b .python3

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
%py2_build
%py3_build


%install
%py2_install
%py3_install

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

%check
%{__python2} setup.py test
%{__python3} setup.py test

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

%files doc
%doc doc/

%files -n python3-svg
%doc doc/license.txt
%{python3_sitelib}/pysvg


%changelog
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.2.2b-11
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild

* Mon Dec 19 2016 Miro HronĨok <mhroncok@redhat.com> - 0.2.2b-10
- Rebuild for Python 3.6

* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.2.2b-9
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages

* Fri Jul 15 2016 Jon Ciesla <limburgher@gmail.com> - 0.2.2b-8
- Add python3 support.

* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.2.2b-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild

* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.2.2b-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild

* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.2.2b-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild

* 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