Blob Blame History Raw
# Created by pyp2rpm-1.1.1
%global pypi_name pysaml2

Name:           python-pysaml2
Version:        3.0.2
Release:        1%{?dist}
Summary:        Python implementation of SAML Version 2
License:        ASL 2.0

BuildArch:      noarch

BuildRequires:  python2-devel
BuildRequires:  python-setuptools
#mongodict - not in Fedora
BuildRequires:  python-pyasn1
#pymongo==3.0.1 - 2.5.2 in Fedora
BuildRequires:  python-pymongo
BuildRequires:  pytest
BuildRequires:  python-mako
BuildRequires:  python-webob

BuildRequires:  python-decorator
BuildRequires:  python-requests >= 1.0.0
BuildRequires:  python-paste
BuildRequires:  python-zope-interface
BuildRequires:  python-repoze-who
BuildRequires:  pycrypto >= 2.5
BuildRequires:  pytz
BuildRequires:  pyOpenSSL
BuildRequires:  python-dateutil
BuildRequires:  python-six

Requires:       python-decorator
Requires:       python-requests >= 1.0.0
Requires:       python-paste
Requires:       python-zope-interface
Requires:       python-repoze-who
Requires:       pycrypto >= 2.5
Requires:       pytz
Requires:       pyOpenSSL
Requires:       python-dateutil
Requires:       python-six

PySAML2 implementation of SAML Version 2 to be used in a WSGI environment.

%package doc
Summary:        Documentation for Python implementation of SAML Version 2

BuildRequires:  python-sphinx

%description doc
Documentation for Python implementation of SAML Version 2.

%setup -qn %{pypi_name}-%{version}
sed -i '/argparse/d'
sed -i '/python-memcached/d'

# Avoid non-executable-script rpmlint while maintaining timestamps
find src -name \*.py |
while read source; do
  if head -n1 "$source" | grep -F '/usr/bin/env'; then
    touch --ref="$source" "$source".ts
    sed -i '/\/usr\/bin\/env python/{d;q}' "$source"
    touch --ref="$source".ts "$source"
    rm "$source".ts
# special case for parse_xsd generated file which have lines like:
#!!!! 'NoneType' object has no attribute 'py_class'
touch --ref="$source" "$source".ts
sed -i '1,3{d;q}' "$source"
touch --ref="$source".ts "$source"
rm "$source".ts

%{__python2} build

# drop alabaster Sphinx theme, not packaged in Fedora yet
sed -i '/alabaster/d' doc/
# generate html docs
sphinx-build doc html
# remove the sphinx-build leftovers
rm -rf html/.{doctrees,buildinfo}

%{__python2} install --skip-build --root %{buildroot}

# some testdeps are missing in Fedora
#%{__python2} test

%doc README.rst
%license LICENSE.txt

%files doc
%license LICENSE.txt
%doc html

* Sat Dec 05 2015 Alan Pevec <> 3.0.2-1
- Update to 3.0.2

* Wed Jul 15 2015 Alan Pevec <> - 3.0.0-1
- update to upstream release 3.0.0

* Thu Jun 18 2015 Alan Pevec <> - 3.0.0-0.3.git40603ae
- include unreleased fix for
- review feedback
- fix rpmlint errors

* Tue Mar 31 2015 Alan Pevec <> - 2.4.0-1
- Update to 2.4.0

* Mon Feb 16 2015 Dan Prince - 2.3.0-1
- Initial package.