d3b30c2
%global srcname pysaml2
dfc0a38
d3b30c2
Name:           python-%{srcname}
354d44e
Version:        6.1.0
c22b30e
Release:        2%{?dist}
d3b30c2
Summary:        Python implementation of SAML Version 2
fbf9a1a
License:        ASL 2.0
d3b30c2
URL:            https://github.com/IdentityPython/%{srcname}
d3b30c2
d3b30c2
%global gittag v%{version}
d3b30c2
d3b30c2
Dan Prince b51143f
d3b30c2
Source0: https://github.com/IdentityPython/%{srcname}/archive/%{gittag}/%{srcname}-%{version}.tar.gz
Alan Pevec 083e919
Dan Prince b51143f
BuildArch:      noarch
Alan Pevec c5cb62c
d3b30c2
BuildRequires:  python3-sphinx
354d44e
BuildRequires:  python3-defusedxml
dfc0a38
dfc0a38
%description
d3b30c2
PySAML2 is a pure python implementation of SAML2. It contains all
d3b30c2
necessary pieces for building a SAML2 service provider or an identity
d3b30c2
provider.  The distribution contains examples of both.  Originally
d3b30c2
written to work in a WSGI environment there are extensions that allow
d3b30c2
you to use it with other frameworks.
dfc0a38
dfc0a38
dfc0a38
d3b30c2
%package -n python3-%{srcname}
d3b30c2
Summary: Python implementation of SAML Version 2
1fdd1ec
Conflicts:  python2-%{srcname} < 4.5.0-6
d3b30c2
%{?python_provide:%python_provide python3-%{srcname}}
d3b30c2
d3b30c2
Requires: python3-requests >= 1.0.0
d3b30c2
Requires: python3-future
d3b30c2
Requires: python3-cryptography
d3b30c2
Requires: python3-pytz
d3b30c2
Requires: python3-pyOpenSSL
d3b30c2
Requires: python3-dateutil
d3b30c2
Requires: python3-defusedxml
d3b30c2
Requires: python3-six
dfc0a38
dfc0a38
BuildRequires:  python3-devel
dfc0a38
BuildRequires:  python3-setuptools
d3b30c2
d3b30c2
%description -n python3-%{srcname}
d3b30c2
PySAML2 is a pure python implementation of SAML2. It contains all
d3b30c2
necessary pieces for building a SAML2 service provider or an identity
d3b30c2
provider.  The distribution contains examples of both.  Originally
d3b30c2
written to work in a WSGI environment there are extensions that allow
d3b30c2
you to use it with other frameworks.
d3b30c2
Alan Pevec 083e919
Alan Pevec 083e919
%package doc
d3b30c2
Summary: Documentation for Python implementation of SAML Version 2
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
%prep
d3b30c2
%setup -qn %{srcname}-%{version}
Alan Pevec 083e919
sed -i '/argparse/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
dfc0a38
d3b30c2
 %py3_build
Dan Prince b51143f
Alan Pevec 083e919
# drop alabaster Sphinx theme, not packaged in Fedora yet
354d44e
#sed -i '/alabaster/d' docs/conf.py
Alan Pevec 083e919
# generate html docs
354d44e
export PYTHONPATH=./src
354d44e
sphinx-build-3 docs html
Alan Pevec 083e919
# remove the sphinx-build leftovers
Alan Pevec 083e919
rm -rf html/.{doctrees,buildinfo}
Dan Prince b51143f
Dan Prince b51143f
%install
d3b30c2
dfc0a38
%py3_install
d3b30c2
dfc0a38
1fdd1ec
1fdd1ec
%files -n python3-%{srcname}
Alan Pevec c5cb62c
%doc README.rst
354d44e
%license LICENSE
Dan Prince b51143f
%{_bindir}/parse_xsd2.py
d3b30c2
%{_bindir}/make_metadata.py
d3b30c2
%{_bindir}/mdexport.py
d3b30c2
%{_bindir}/merge_metadata.py
dfc0a38
%{python3_sitelib}/saml2
dfc0a38
%{python3_sitelib}/*.egg-info
dfc0a38
Alan Pevec 083e919
%files doc
354d44e
%license LICENSE
Alan Pevec 083e919
%doc html
Dan Prince b51143f
Dan Prince b51143f
%changelog
c22b30e
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 6.1.0-2
c22b30e
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
c22b30e
354d44e
* Thu Jul 30 2020 Yatin Karel <ykarel@redhat.com> - 6.1.0-1
354d44e
- Update to 6.1.0 (rhbz#1290944)
354d44e
a6b3835
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 4.5.0-12
a6b3835
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
a6b3835
9de7a0e
* Tue May 26 2020 Miro Hrončok <mhroncok@redhat.com> - 4.5.0-11
9de7a0e
- Rebuilt for Python 3.9
9de7a0e
a8d4c7f
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 4.5.0-10
a8d4c7f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
a8d4c7f
209aae5
* Thu Oct 03 2019 Miro Hrončok <mhroncok@redhat.com> - 4.5.0-9
209aae5
- Rebuilt for Python 3.8.0rc1 (#1748018)
209aae5
55847ec
* Mon Aug 19 2019 Miro Hrončok <mhroncok@redhat.com> - 4.5.0-8
55847ec
- Rebuilt for Python 3.8
55847ec
0fc3b7c
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 4.5.0-7
0fc3b7c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
0fc3b7c
1fdd1ec
* Mon Feb 11 2019 Miro Hrončok <mhroncok@redhat.com> - 4.5.0-6
1fdd1ec
- Subpackage python2-pysaml2 has been removed
1fdd1ec
  See https://fedoraproject.org/wiki/Changes/Mass_Python_2_Package_Removal
1fdd1ec
c8886ac
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 4.5.0-5
c8886ac
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
c8886ac
6550315
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 4.5.0-4
6550315
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
6550315
72d35e6
* Tue Jun 19 2018 Miro Hrončok <mhroncok@redhat.com> - 4.5.0-3
72d35e6
- Rebuilt for Python 3.7
72d35e6
999efa5
* Wed Jun  6 2018  <jdennis@redhat.com> - 4.5.0-2
999efa5
- Resolves: rhbz#1582254 - re-enable python2 support
999efa5
d3b30c2
* Fri May 18 2018  <jdennis@redhat.com> - 4.5.0-1
d3b30c2
- upgrade to current upstream
d3b30c2
- enforce Python packaging standards
d3b30c2
e82f78b
* Fri Feb 09 2018 Iryna Shcherbina <ishcherb@redhat.com> - 3.0.2-10
e82f78b
- Update Python 2 dependency declarations to new packaging standards
e82f78b
  (See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3)
e82f78b
2eeb4d1
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.2-9
2eeb4d1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
2eeb4d1
cf673cd
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.2-8
cf673cd
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
cf673cd
Jason Joyce 5729eff
* Thu Mar 16 2017 Jason Joyce <jjoyce@redhat.com> - 3.0.2-7
Jason Joyce 5729eff
- security fix for entity expansion issue - CVE-2016-10149
Jason Joyce 5729eff
2050f57
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.2-6
2050f57
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
2050f57
b115605
* Mon Dec 19 2016 Miro Hrončok <mhroncok@redhat.com> - 3.0.2-5
b115605
- Rebuild for Python 3.6
b115605
9ead7cf
* Sun Nov 13 2016 Peter Robinson <pbrobinson@fedoraproject.org> 3.0.2-4
9ead7cf
- fix pycrypto dependency
9ead7cf
9db9457
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.0.2-3
9db9457
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
9db9457
61c6278
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.2-2
61c6278
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
61c6278
Alan Pevec 9cd82bc
* Sat Dec 05 2015 Alan Pevec <alan.pevec@redhat.com> 3.0.2-1
Alan Pevec 9cd82bc
- Update to 3.0.2
Alan Pevec 9cd82bc
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.