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