Dan Prince b51143f
# Created by pyp2rpm-1.1.1
Dan Prince b51143f
%global pypi_name pysaml2
Dan Prince b51143f
Dan Prince af329c7
Name:           python-pysaml2
Alan Pevec 750099a
Version:        3.0.2
Alan Pevec 2f7999a
Release:        1%{?dist}
Alan Pevec 083e919
Summary:        Python implementation of SAML Version 2
Alan Pevec c5cb62c
License:        ASL 2.0
Dan Prince b51143f
URL:            https://github.com/rohe/pysaml2
Alan Pevec 2f7999a
Source0:        https://pypi.python.org/packages/source/p/%{pypi_name}/%{pypi_name}-%{version}.tar.gz
Alan Pevec 083e919
Dan Prince b51143f
BuildArch:      noarch
Alan Pevec c5cb62c
Alan Pevec 43444cf
BuildRequires:  python2-devel
Alan Pevec 43444cf
BuildRequires:  python-setuptools
Alan Pevec 083e919
#mongodict - not in Fedora
Dan Prince b51143f
BuildRequires:  python-pyasn1
Alan Pevec 083e919
#pymongo==3.0.1 - 2.5.2 in Fedora
Alan Pevec 083e919
BuildRequires:  python-pymongo
Dan Prince b51143f
BuildRequires:  pytest
Dan Prince b51143f
BuildRequires:  python-mako
Alan Pevec 083e919
BuildRequires:  python-webob
Alan Pevec c5cb62c
Alan Pevec 083e919
BuildRequires:  python-decorator
Alan Pevec 083e919
BuildRequires:  python-requests >= 1.0.0
Alan Pevec 083e919
BuildRequires:  python-paste
Alan Pevec 083e919
BuildRequires:  python-zope-interface
Alan Pevec 083e919
BuildRequires:  python-repoze-who
Alan Pevec 083e919
BuildRequires:  pycrypto >= 2.5
Alan Pevec 083e919
BuildRequires:  pytz
Alan Pevec 083e919
BuildRequires:  pyOpenSSL
Alan Pevec 083e919
BuildRequires:  python-dateutil
Alan Pevec 083e919
BuildRequires:  python-six
Alan Pevec 083e919
Dan Prince b51143f
Requires:       python-decorator
Dan Prince b51143f
Requires:       python-requests >= 1.0.0
Dan Prince b51143f
Requires:       python-paste
Dan Prince b51143f
Requires:       python-zope-interface
Dan Prince b51143f
Requires:       python-repoze-who
Alan Pevec 083e919
Requires:       pycrypto >= 2.5
Dan Prince b51143f
Requires:       pytz
Dan Prince b51143f
Requires:       pyOpenSSL
Dan Prince b51143f
Requires:       python-dateutil
Alan Pevec 083e919
Requires:       python-six
Dan Prince b51143f
Dan Prince b51143f
%description
Alan Pevec 083e919
PySAML2 implementation of SAML Version 2 to be used in a WSGI environment.
Alan Pevec 083e919
Alan Pevec 083e919
%package doc
Alan Pevec 083e919
Summary:        Documentation for Python implementation of SAML Version 2
Alan Pevec 083e919
Alan Pevec 083e919
BuildRequires:  python-sphinx
Alan Pevec 083e919
Alan Pevec 083e919
%description doc
Alan Pevec 083e919
Documentation for Python implementation of SAML Version 2.
Alan Pevec 083e919
Dan Prince b51143f
Dan Prince b51143f
%prep
Alan Pevec 2f7999a
%setup -qn %{pypi_name}-%{version}
Alan Pevec 083e919
sed -i '/argparse/d' setup.py
Alan Pevec 812024e
sed -i '/python-memcached/d' setup.py
Dan Prince b51143f
Alan Pevec c5cb62c
# Avoid non-executable-script rpmlint while maintaining timestamps
Alan Pevec c5cb62c
find src -name \*.py |
Alan Pevec c5cb62c
while read source; do
Alan Pevec c5cb62c
  if head -n1 "$source" | grep -F '/usr/bin/env'; then
Alan Pevec c5cb62c
    touch --ref="$source" "$source".ts
Alan Pevec c5cb62c
    sed -i '/\/usr\/bin\/env python/{d;q}' "$source"
Alan Pevec c5cb62c
    touch --ref="$source".ts "$source"
Alan Pevec c5cb62c
    rm "$source".ts
Alan Pevec c5cb62c
  fi
Alan Pevec c5cb62c
done
Alan Pevec c5cb62c
# special case for parse_xsd generated file which have lines like:
Alan Pevec c5cb62c
#!!!! 'NoneType' object has no attribute 'py_class'
Alan Pevec c5cb62c
source="src/saml2/schema/wsdl.py"
Alan Pevec c5cb62c
touch --ref="$source" "$source".ts
Alan Pevec c5cb62c
sed -i '1,3{d;q}' "$source"
Alan Pevec c5cb62c
touch --ref="$source".ts "$source"
Alan Pevec c5cb62c
rm "$source".ts
Alan Pevec c5cb62c
Dan Prince b51143f
%build
Dan Prince b51143f
%{__python2} setup.py build
Dan Prince b51143f
Alan Pevec 083e919
# drop alabaster Sphinx theme, not packaged in Fedora yet
Alan Pevec 083e919
sed -i '/alabaster/d' doc/conf.py
Alan Pevec 083e919
# generate html docs
Alan Pevec 083e919
sphinx-build doc html
Alan Pevec 083e919
# remove the sphinx-build leftovers
Alan Pevec 083e919
rm -rf html/.{doctrees,buildinfo}
Dan Prince b51143f
Dan Prince b51143f
%install
Dan Prince b51143f
%{__python2} setup.py install --skip-build --root %{buildroot}
Dan Prince b51143f
Alan Pevec 083e919
# some testdeps are missing in Fedora
Alan Pevec 083e919
#%check
Alan Pevec 083e919
#%{__python2} setup.py test
Dan Prince b51143f
Dan Prince b51143f
%files
Alan Pevec c5cb62c
%doc README.rst
Alan Pevec 083e919
%license LICENSE.txt
Dan Prince b51143f
%{_bindir}/parse_xsd2.py
Dan Prince b51143f
%{_bindir}/make_metadata.py
Dan Prince b51143f
%{_bindir}/mdexport.py
Dan Prince b51143f
%{_bindir}/merge_metadata.py
Dan Prince b51143f
%{python2_sitelib}/saml2
Alan Pevec 083e919
%{python2_sitelib}/*.egg-info
Alan Pevec 083e919
Alan Pevec 083e919
%files doc
Alan Pevec 083e919
%license LICENSE.txt
Alan Pevec 083e919
%doc html
Dan Prince b51143f
Dan Prince b51143f
%changelog
Alan Pevec 750099a
* Sat Dec 05 2015 Alan Pevec <alan.pevec@redhat.com> 3.0.2-1
Alan Pevec 750099a
- Update to 3.0.2
Alan Pevec 750099a
Alan Pevec 2f7999a
* Wed Jul 15 2015 Alan Pevec <apevec@redhat.com> - 3.0.0-1
Alan Pevec 2f7999a
- update to upstream release 3.0.0
Alan Pevec 2f7999a
Alan Pevec 228cda9
* Thu Jun 18 2015 Alan Pevec <apevec@redhat.com> - 3.0.0-0.3.git40603ae
Alan Pevec 083e919
- include unreleased fix for https://github.com/rohe/pysaml2/issues/202
Alan Pevec 43444cf
- review feedback
Alan Pevec c5cb62c
- fix rpmlint errors
Alan Pevec 083e919
Alan Pevec 083e919
* Tue Mar 31 2015 Alan Pevec <apevec@redhat.com> - 2.4.0-1
Alan Pevec 083e919
- Update to 2.4.0
Alan Pevec 083e919
Dan Prince b51143f
* Mon Feb 16 2015 Dan Prince - 2.3.0-1
Dan Prince b51143f
- Initial package.