Blob Blame History Raw
%if 0%{?fedora}
%global with_python3 1
%endif

%global modname colander

Name:               python-colander
Version:            1.2
Release:            1%{?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:      python2-iso8601

BuildRequires:      python-translationstring
BuildRequires:      python-nose
BuildRequires:      python-coverage

%if 0%{?with_python3}
BuildRequires:      python3-devel
BuildRequires:      python3-setuptools
BuildRequires:      python3-iso8601

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.

%package -n python2-colander
Summary:            A simple schema-based serialization and deserialization library
%{?python_provide:%python_provide python2-colander}

Requires:           python-translationstring
Requires:           python2-iso8601

%description -n python2-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.

%if 0%{?with_python3}
%package -n python3-colander
Summary:            A simple schema-based serialization and deserialization library
%{?python_provide:%python_provide python3-colander}

Requires:           python3-translationstring
Requires:           python3-iso8601

%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

%build
%py2_build
%if 0%{?with_python3}
%py3_build
%endif

%install
%py2_install
%if 0%{?with_python3}
%py3_install
%endif

%check
%{__python2} setup.py test
%if 0%{?with_python3}
%{__python3} setup.py test
%endif

%files -n python2-%{modname}
%doc README.rst LICENSE.txt COPYRIGHT.txt CONTRIBUTORS.txt CHANGES.rst docs
%{python2_sitelib}/%{modname}/
%{python2_sitelib}/%{modname}-%{version}*

%if 0%{?with_python3}
%files -n python3-%{modname}
%doc README.rst LICENSE.txt COPYRIGHT.txt CONTRIBUTORS.txt CHANGES.rst docs
%{python3_sitelib}/%{modname}/
%{python3_sitelib}/%{modname}-%{version}-*
%endif

%changelog
* Mon Apr 04 2016 Ralph Bean <rbean@redhat.com> - 1.2-1
- New version
- New dep on python-iso8601
- Fixed doc paths for new upstream.
- Modernized python macros.

* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.0b1-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild

* Tue Nov 10 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0b1-5
- Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5

* 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