rdobuilder 3874ff
%global srcname pysaml2
rdobuilder 3874ff
rdobuilder 3874ff
Name:           python-%{srcname}
rdobuilder 3874ff
Version:        7.0.1
rdobuilder 3874ff
Release:        2%{?dist}
rdobuilder 3874ff
Summary:        Python implementation of SAML Version 2
rdobuilder 3874ff
License:        ASL 2.0
rdobuilder 3874ff
URL:            https://github.com/IdentityPython/%{srcname}
rdobuilder 3874ff
rdobuilder 3874ff
%global gittag v%{version}
rdobuilder 3874ff
rdobuilder 3874ff
rdobuilder 3874ff
rdobuilder 3874ff
Source0: https://github.com/IdentityPython/%{srcname}/archive/%{gittag}/%{srcname}-%{version}.tar.gz
rdobuilder 3874ff
rdobuilder 3874ff
Patch0: 0001-Use-importlib.resources-in-python-3.7.patch
rdobuilder 3874ff
rdobuilder 3874ff
BuildArch:      noarch
rdobuilder 3874ff
rdobuilder 3874ff
BuildRequires:  python3-sphinx
rdobuilder 3874ff
BuildRequires:  python3-defusedxml
rdobuilder 3874ff
rdobuilder 3874ff
%description
rdobuilder 3874ff
PySAML2 is a pure python implementation of SAML2. It contains all
rdobuilder 3874ff
necessary pieces for building a SAML2 service provider or an identity
rdobuilder 3874ff
provider.  The distribution contains examples of both.  Originally
rdobuilder 3874ff
written to work in a WSGI environment there are extensions that allow
rdobuilder 3874ff
you to use it with other frameworks.
rdobuilder 3874ff
rdobuilder 3874ff
rdobuilder 3874ff
rdobuilder 3874ff
%package -n python3-%{srcname}
rdobuilder 3874ff
Summary: Python implementation of SAML Version 2
rdobuilder 3874ff
Conflicts:  python2-%{srcname} < 4.5.0-6
rdobuilder 3874ff
%{?python_provide:%python_provide python3-%{srcname}}
rdobuilder 3874ff
rdobuilder 3874ff
Requires: python3-requests >= 1.0.0
rdobuilder 3874ff
Requires: python3-future
rdobuilder 3874ff
Requires: python3-cryptography
rdobuilder 3874ff
Requires: python3-pytz
rdobuilder 3874ff
Requires: python3-pyOpenSSL
rdobuilder 3874ff
Requires: python3-dateutil
rdobuilder 3874ff
Requires: python3-defusedxml
rdobuilder 3874ff
Requires: python3-six
rdobuilder 3874ff
rdobuilder 3874ff
BuildRequires:  git-core
rdobuilder 3874ff
BuildRequires:  python3-devel
rdobuilder 3874ff
BuildRequires:  python3-setuptools
rdobuilder 3874ff
rdobuilder 3874ff
%description -n python3-%{srcname}
rdobuilder 3874ff
PySAML2 is a pure python implementation of SAML2. It contains all
rdobuilder 3874ff
necessary pieces for building a SAML2 service provider or an identity
rdobuilder 3874ff
provider.  The distribution contains examples of both.  Originally
rdobuilder 3874ff
written to work in a WSGI environment there are extensions that allow
rdobuilder 3874ff
you to use it with other frameworks.
rdobuilder 3874ff
rdobuilder 3874ff
rdobuilder 3874ff
%package doc
rdobuilder 3874ff
Summary: Documentation for Python implementation of SAML Version 2
rdobuilder 3874ff
rdobuilder 3874ff
%description doc
rdobuilder 3874ff
Documentation for Python implementation of SAML Version 2.
rdobuilder 3874ff
rdobuilder 3874ff
%prep
rdobuilder 3874ff
%autosetup -n %{srcname}-%{version} -S git
rdobuilder 3874ff
sed -i '/argparse/d' setup.py
rdobuilder 3874ff
rdobuilder 3874ff
# Avoid non-executable-script rpmlint while maintaining timestamps
rdobuilder 3874ff
find src -name \*.py |
rdobuilder 3874ff
while read source; do
rdobuilder 3874ff
  if head -n1 "$source" | grep -F '/usr/bin/env'; then
rdobuilder 3874ff
    touch --ref="$source" "$source".ts
rdobuilder 3874ff
    sed -i '/\/usr\/bin\/env python/{d;q}' "$source"
rdobuilder 3874ff
    touch --ref="$source".ts "$source"
rdobuilder 3874ff
    rm "$source".ts
rdobuilder 3874ff
  fi
rdobuilder 3874ff
done
rdobuilder 3874ff
# special case for parse_xsd generated file which have lines like:
rdobuilder 3874ff
#!!!! 'NoneType' object has no attribute 'py_class'
rdobuilder 3874ff
source="src/saml2/schema/wsdl.py"
rdobuilder 3874ff
touch --ref="$source" "$source".ts
rdobuilder 3874ff
sed -i '1,3{d;q}' "$source"
rdobuilder 3874ff
touch --ref="$source".ts "$source"
rdobuilder 3874ff
rm "$source".ts
rdobuilder 3874ff
rdobuilder 3874ff
%build
rdobuilder 3874ff
rdobuilder 3874ff
 %py3_build
rdobuilder 3874ff
rdobuilder 3874ff
# drop alabaster Sphinx theme, not packaged in Fedora yet
rdobuilder 3874ff
#sed -i '/alabaster/d' docs/conf.py
rdobuilder 3874ff
# generate html docs
rdobuilder 3874ff
export PYTHONPATH=./src
rdobuilder 3874ff
sphinx-build-3 docs html
rdobuilder 3874ff
# remove the sphinx-build leftovers
rdobuilder 3874ff
rm -rf html/.{doctrees,buildinfo}
rdobuilder 3874ff
rdobuilder 3874ff
%install
rdobuilder 3874ff
rdobuilder 3874ff
%py3_install
rdobuilder 3874ff
rdobuilder 3874ff
rdobuilder 3874ff
rdobuilder 3874ff
%files -n python3-%{srcname}
rdobuilder 3874ff
%doc README.rst
rdobuilder 3874ff
%license LICENSE
rdobuilder 3874ff
%{_bindir}/parse_xsd2.py
rdobuilder 3874ff
%{_bindir}/make_metadata.py
rdobuilder 3874ff
%{_bindir}/mdexport.py
rdobuilder 3874ff
%{_bindir}/merge_metadata.py
rdobuilder 3874ff
%{python3_sitelib}/saml2
rdobuilder 3874ff
%{python3_sitelib}/*.egg-info
rdobuilder 3874ff
rdobuilder 3874ff
%files doc
rdobuilder 3874ff
%license LICENSE
rdobuilder 3874ff
%doc html
rdobuilder 3874ff
rdobuilder 3874ff
%changelog
rdobuilder 3874ff
* Thu Oct 21 2021 Alfredo Moralejo <amoralej@redhat.com> - 7.0.1-2
rdobuilder 3874ff
- Use importlib.resources in python >= 3.7  (rhbz#2008668)
rdobuilder 3874ff
rdobuilder 3874ff
* Fri Sep 24 2021 Joel Capitao <jcapitao@redhat.com> - 7.0.1-1
rdobuilder 3874ff
- Update to 7.0.1 (rhbz#1290944)
rdobuilder 3874ff
rdobuilder 3874ff
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 6.1.0-4
rdobuilder 3874ff
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
rdobuilder 3874ff
rdobuilder 3874ff
* Fri Jun 04 2021 Python Maint <python-maint@redhat.com> - 6.1.0-3
rdobuilder 3874ff
- Rebuilt for Python 3.10
rdobuilder 3874ff
rdobuilder 3874ff
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 6.1.0-2
rdobuilder 3874ff
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
rdobuilder 3874ff
rdobuilder 3874ff
* Thu Jul 30 2020 Yatin Karel <ykarel@redhat.com> - 6.1.0-1
rdobuilder 3874ff
- Update to 6.1.0 (rhbz#1290944)
rdobuilder 3874ff
rdobuilder 3874ff
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 4.5.0-12
rdobuilder 3874ff
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
rdobuilder 3874ff
rdobuilder 3874ff
* Tue May 26 2020 Miro Hrončok <mhroncok@redhat.com> - 4.5.0-11
rdobuilder 3874ff
- Rebuilt for Python 3.9
rdobuilder 3874ff
rdobuilder 3874ff
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 4.5.0-10
rdobuilder 3874ff
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
rdobuilder 3874ff
rdobuilder 3874ff
* Thu Oct 03 2019 Miro Hrončok <mhroncok@redhat.com> - 4.5.0-9
rdobuilder 3874ff
- Rebuilt for Python 3.8.0rc1 (#1748018)
rdobuilder 3874ff
rdobuilder 3874ff
* Mon Aug 19 2019 Miro Hrončok <mhroncok@redhat.com> - 4.5.0-8
rdobuilder 3874ff
- Rebuilt for Python 3.8
rdobuilder 3874ff
rdobuilder 3874ff
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 4.5.0-7
rdobuilder 3874ff
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
rdobuilder 3874ff
rdobuilder 3874ff
* Mon Feb 11 2019 Miro Hrončok <mhroncok@redhat.com> - 4.5.0-6
rdobuilder 3874ff
- Subpackage python2-pysaml2 has been removed
rdobuilder 3874ff
  See https://fedoraproject.org/wiki/Changes/Mass_Python_2_Package_Removal
rdobuilder 3874ff
rdobuilder 3874ff
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 4.5.0-5
rdobuilder 3874ff
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
rdobuilder 3874ff
rdobuilder 3874ff
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 4.5.0-4
rdobuilder 3874ff
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
rdobuilder 3874ff
rdobuilder 3874ff
* Tue Jun 19 2018 Miro Hrončok <mhroncok@redhat.com> - 4.5.0-3
rdobuilder 3874ff
- Rebuilt for Python 3.7
rdobuilder 3874ff
rdobuilder 3874ff
* Wed Jun  6 2018  <jdennis@redhat.com> - 4.5.0-2
rdobuilder 3874ff
- Resolves: rhbz#1582254 - re-enable python2 support
rdobuilder 3874ff
rdobuilder 3874ff
* Fri May 18 2018  <jdennis@redhat.com> - 4.5.0-1
rdobuilder 3874ff
- upgrade to current upstream
rdobuilder 3874ff
- enforce Python packaging standards
rdobuilder 3874ff
rdobuilder 3874ff
* Fri Feb 09 2018 Iryna Shcherbina <ishcherb@redhat.com> - 3.0.2-10
rdobuilder 3874ff
- Update Python 2 dependency declarations to new packaging standards
rdobuilder 3874ff
  (See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3)
rdobuilder 3874ff
rdobuilder 3874ff
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.2-9
rdobuilder 3874ff
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
rdobuilder 3874ff
rdobuilder 3874ff
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.2-8
rdobuilder 3874ff
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
rdobuilder 3874ff
rdobuilder 3874ff
* Thu Mar 16 2017 Jason Joyce <jjoyce@redhat.com> - 3.0.2-7
rdobuilder 3874ff
- security fix for entity expansion issue - CVE-2016-10149
rdobuilder 3874ff
rdobuilder 3874ff
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.2-6
rdobuilder 3874ff
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
rdobuilder 3874ff
rdobuilder 3874ff
* Mon Dec 19 2016 Miro Hrončok <mhroncok@redhat.com> - 3.0.2-5
rdobuilder 3874ff
- Rebuild for Python 3.6
rdobuilder 3874ff
rdobuilder 3874ff
* Sun Nov 13 2016 Peter Robinson <pbrobinson@fedoraproject.org> 3.0.2-4
rdobuilder 3874ff
- fix pycrypto dependency
rdobuilder 3874ff
rdobuilder 3874ff
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.0.2-3
rdobuilder 3874ff
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
rdobuilder 3874ff
rdobuilder 3874ff
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.2-2
rdobuilder 3874ff
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
rdobuilder 3874ff
rdobuilder 3874ff
* Sat Dec 05 2015 Alan Pevec <alan.pevec@redhat.com> 3.0.2-1
rdobuilder 3874ff
- Update to 3.0.2
rdobuilder 3874ff
rdobuilder 3874ff
* Wed Jul 15 2015 Alan Pevec <apevec@redhat.com> - 3.0.0-1
rdobuilder 3874ff
- update to upstream release 3.0.0
rdobuilder 3874ff
rdobuilder 3874ff
* Thu Jun 18 2015 Alan Pevec <apevec@redhat.com> - 3.0.0-0.3.git40603ae
rdobuilder 3874ff
- include unreleased fix for https://github.com/rohe/pysaml2/issues/202
rdobuilder 3874ff
- review feedback
rdobuilder 3874ff
- fix rpmlint errors
rdobuilder 3874ff
rdobuilder 3874ff
* Tue Mar 31 2015 Alan Pevec <apevec@redhat.com> - 2.4.0-1
rdobuilder 3874ff
- Update to 2.4.0
rdobuilder 3874ff
rdobuilder 3874ff
* Mon Feb 16 2015 Dan Prince - 2.3.0-1
rdobuilder 3874ff
- Initial package.