%if 0%{?fedora}
%global with_python3 1
%endif
%global modname colander
Name: python-colander
Version: 1.0b1
Release: 4%{?dist}
Summary: A simple schema-based serialization and deserialization library
Group: Development/Libraries
License: BSD
URL: http://pypi.python.org/pypi/colander
Source0: http://pypi.python.org/packages/source/c/%{modname}/%{modname}-%{version}.tar.gz
BuildArch: noarch
BuildRequires: python2-devel
BuildRequires: python-setuptools
BuildRequires: python-translationstring
BuildRequires: python-nose
BuildRequires: python-coverage
Requires: python-translationstring
%if 0%{?with_python3}
BuildRequires: python3-devel
BuildRequires: python3-setuptools
BuildRequires: python3-translationstring
BuildRequires: python3-nose
BuildRequires: python3-coverage
%endif
%description
An extensible package which can be used to:
- deserialize and validate a data structure composed of strings, mappings,
and lists.
- serialize an arbitrary data structure to a data structure composed of
strings, mappings, and lists.
Please see http://docs.pylonsproject.org/projects/colander/en/latest/ for
further documentation.
%if 0%{?with_python3}
%package -n python3-colander
Summary: A simple schema-based serialization and deserialization library
Group: Development/Libraries
Requires: python3-translationstring
%description -n python3-colander
An extensible package which can be used to:
- deserialize and validate a data structure composed of strings, mappings,
and lists.
- serialize an arbitrary data structure to a data structure composed of
strings, mappings, and lists.
Please see http://docs.pylonsproject.org/projects/colander/en/latest/ for
further documentation.
%endif
%prep
%setup -q -n %{modname}-%{version}
# The presence of this file creates an rpmlint error. Remove it.
rm docs/.gitignore
rm -rf docs/.static
# Remove bundled egg-info in case it exists
rm -rf %{modname}.egg-info
%if 0%{?with_python3}
rm -rf %{py3dir}
cp -a . %{py3dir}
%endif
%build
%{__python} setup.py build
%if 0%{?with_python3}
pushd %{py3dir}
%{__python3} setup.py build
popd
%endif
%install
%if 0%{?with_python3}
pushd %{py3dir}
%{__python3} setup.py install -O1 --skip-build --root=%{buildroot}
popd
%endif
%{__python} setup.py install -O1 --skip-build --root=%{buildroot}
%check
%{__python} setup.py test
%if 0%{?with_python3}
pushd %{py3dir}
%{__python3} setup.py test
popd
%endif
%files
%doc README.txt LICENSE.txt COPYRIGHT.txt CONTRIBUTORS.txt CHANGES.txt docs
%{python_sitelib}/%{modname}/
%{python_sitelib}/%{modname}-%{version}*
%if 0%{?with_python3}
%files -n python3-%{modname}
%doc README.txt LICENSE.txt COPYRIGHT.txt CONTRIBUTORS.txt CHANGES.txt docs
%{python3_sitelib}/%{modname}/
%{python3_sitelib}/%{modname}-%{version}-*
%endif
%changelog
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0b1-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0b1-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
* Wed May 14 2014 Bohuslav Kabrda <bkabrda@redhat.com> - 1.0b1-2
- Rebuilt for https://fedoraproject.org/wiki/Changes/Python_3.4
* Wed Jan 29 2014 Ralph Bean <rbean@redhat.com> - 1.0b1-1
- Latest upstream.
- Enabled python3 subpackage.
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0a2-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
* Wed Apr 10 2013 Ralph Bean <rbean@redhat.com> - 1.0a2-1
- Latest upstream.
- Modernized python3 conditional.
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.9-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
* Fri Dec 07 2012 Ralph Bean <rbean@redhat.com> - 0.9.9-2
- Remove the hidden static folder in the docs directory at prep time.
* Fri Dec 07 2012 Ralph Bean <rbean@redhat.com> - 0.9.9-1
- Initial packaging for Fedora