5aee1c7
%if 0%{?fedora}
99c992a
%global with_python3 1
99c992a
%endif
99c992a
99c992a
%global modname sieve
99c992a
99c992a
Name:             python-sieve
99c992a
Version:          0.1.6
df2d028
Release:          14%{?dist}
99c992a
Summary:          XML Comparison Utils
99c992a
99c992a
Group:            Development/Libraries
99c992a
License:          MIT
99c992a
URL:              http://pypi.python.org/pypi/sieve
99c992a
Source0:          http://pypi.python.org/packages/source/s/%{modname}/%{modname}-%{version}.tar.gz
99c992a
99c992a
BuildArch:        noarch
99c992a
99c992a
99c992a
BuildRequires:    python2-devel
99c992a
BuildRequires:    python-six
99c992a
BuildRequires:    python-lxml
99c992a
BuildRequires:    python-nose
99c992a
99c992a
%if 0%{?with_python3}
99c992a
BuildRequires:    python3-devel
99c992a
BuildRequires:    python3-six
99c992a
BuildRequires:    python3-lxml
99c992a
BuildRequires:    python3-nose
99c992a
%endif
99c992a
99c992a
Requires:   python-six
99c992a
Requires:   python-lxml
99c992a
99c992a
99c992a
%description
99c992a
Ripped from FormEncode and strainer just to support Pythons 2 and 3.
99c992a
Intended for use in your webapp test suites.
99c992a
99c992a
Example usage::
99c992a
99c992a
    >>> from sieve.operators import eq_xml, in_xml 
99c992a
    >>> a = "<foo><bar>Value</bar></foo>" 
99c992a
    >>> b = """ 
99c992a
    ... <foo> 
99c992a
    ...     <bar>
99c992a
    ...         Value 
99c992a
    ...     </bar> 
99c992a
    ... </foo> 
99c992a
    ... """
99c992a
    >>> eq_xml(a, b)
99c992a
    True 
99c992a
    >>> c = "<html><body><foo><bar>Value</bar></foo></body>
99c992a
    >>> in_xml(a, c)  # 'needle' in a 'haystack'
99c992a
    True
99c992a
99c992a
99c992a
%if 0%{?with_python3}
99c992a
%package -n python3-sieve
99c992a
Summary:        XML Comparison Utils
99c992a
Group:          Development/Libraries
99c992a
e7151b5
Requires:   python3-six
e7151b5
Requires:   python3-lxml
e7151b5
99c992a
%description -n python3-sieve
99c992a
Ripped from FormEncode and strainer just to support Pythons 2 and 3.
99c992a
Intended for use in your webapp test suites.
99c992a
99c992a
Example usage::
99c992a
99c992a
    >>> from sieve.operators import eq_xml, in_xml 
99c992a
    >>> a = "<foo><bar>Value</bar></foo>" 
99c992a
    >>> b = """ 
99c992a
    ... <foo> 
99c992a
    ...     <bar>
99c992a
    ...         Value 
99c992a
    ...     </bar> 
99c992a
    ... </foo> 
99c992a
    ... """
99c992a
    >>> eq_xml(a, b)
99c992a
    True 
99c992a
    >>> c = "<html><body><foo><bar>Value</bar></foo></body>
99c992a
    >>> in_xml(a, c)  # 'needle' in a 'haystack'
99c992a
    True
99c992a
%endif
99c992a
99c992a
%prep
99c992a
%setup -q -n %{modname}-%{version}
99c992a
99c992a
rm -rf %{modname}.egg-info
99c992a
99c992a
%if 0%{?with_python3}
99c992a
rm -rf %{py3dir}
99c992a
cp -a . %{py3dir}
99c992a
%endif
99c992a
99c992a
99c992a
%build
99c992a
%{__python} setup.py build
99c992a
99c992a
%if 0%{?with_python3}
99c992a
pushd %{py3dir}
99c992a
%{__python3} setup.py build
99c992a
popd
99c992a
%endif
99c992a
99c992a
99c992a
%install
99c992a
%if 0%{?with_python3}
99c992a
pushd %{py3dir}
99c992a
%{__python3} setup.py install -O1 --skip-build --root=%{buildroot}
99c992a
popd
99c992a
%endif
99c992a
99c992a
%{__python} setup.py install -O1 --skip-build --root=%{buildroot}
99c992a
99c992a
%check
99c992a
%{__python} setup.py test
99c992a
99c992a
%if 0%{?with_python3}
99c992a
pushd %{py3dir}
99c992a
%{__python3} setup.py test
99c992a
popd
99c992a
%endif
99c992a
99c992a
99c992a
%files
99c992a
%doc README.rst LICENSE.txt
99c992a
%{python_sitelib}/%{modname}
99c992a
%{python_sitelib}/%{modname}-%{version}*
99c992a
99c992a
%if 0%{?with_python3}
99c992a
%files -n python3-%{modname}
99c992a
%doc LICENSE.txt README.rst
99c992a
%{python3_sitelib}/%{modname}
99c992a
%{python3_sitelib}/%{modname}-%{version}-*
99c992a
99c992a
%endif
99c992a
99c992a
99c992a
%changelog
df2d028
* Tue Nov 10 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.1.6-14
df2d028
- Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5
df2d028
c6ed00c
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.1.6-13
c6ed00c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
c6ed00c
5aee1c7
* Thu Nov 13 2014 Ralph Bean <rbean@redhat.com> - 0.1.6-12
5aee1c7
- Fixed with_python3 conditional.
5aee1c7
e9a3e01
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.1.6-11
e9a3e01
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
e9a3e01
edfc3e2
* Wed May 14 2014 Bohuslav Kabrda <bkabrda@redhat.com> - 0.1.6-10
edfc3e2
- Rebuilt for https://fedoraproject.org/wiki/Changes/Python_3.4
edfc3e2
52b0ca8
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.1.6-9
52b0ca8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
52b0ca8
586ca2d
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.1.6-8
586ca2d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
586ca2d
e7151b5
* Sat Nov 03 2012 Ralph Bean <rbean@redhat.com> - 0.1.6-7
e7151b5
- Move python3 requirements into the correct section.
e7151b5
eb42457
* Tue Oct 30 2012 Ralph Bean <rbean@redhat.com> - 0.1.6-6
eb42457
- Bump release to get around a koji hiccup again.
eb42457
65a4b8d
* Mon Oct 22 2012 Ralph Bean <rbean@redhat.com> - 0.1.6-5
65a4b8d
- Bump release to get around a koji hiccup.
65a4b8d
99c992a
* Tue Sep 25 2012 Ralph Bean <rbean@redhat.com> - 0.1.6-4
99c992a
- Added requirement on python3-six back in since that package has been split.
99c992a
99c992a
* Mon Sep 24 2012 Ralph Bean <rbean@redhat.com> - 0.1.6-3
99c992a
- Removed upstream egg-info in prep section.
99c992a
99c992a
* Fri Jun 22 2012 Ralph Bean <rbean@redhat.com> - 0.1.6-2
99c992a
- Fix to python-six dependencies.  (no python3-six)
99c992a
99c992a
* Fri Jun 22 2012 Ralph Bean <rbean@redhat.com> - 0.1.6-1
99c992a
- Initial package for Fedora